Datafeedr Support Forums

Datafeedr Support Forums (/index.php)
-   Questions (/forumdisplay.php?f=67)
-   -   Custom Widget Problems (/showthread.php?t=7827)

shopucfnation October 3rd, 2012 09:50 AM

Custom Widget Problems
 
Hey all,

We're having some trouble with the widget views on our homepage. We created several custom widget views and put them in the sidebar of our Wordpress site.

However, no matter what template we use for each of them, the images come through in their natural size and impair the structure of the columns we have set up.

Please take a look at http://lanceem.com at the section that lists the 4 columns of: Featured Products (default products widget), Sale Items (custom widget), Hot Products (custom widget), and Recently Viewed Products (custom widget) to see this problem in the wild.

You will notice that the default widget (on the left) is fine and the custom ones we made are generating the problems.

PS - Similar, but somewhat unrelated, you might notice that we have some products that repeat in each row. How do we stop that from happening? We also wouldn't mind shortening the length of each column, but the widget settings don't seem to be abiding by our changes.

Store ID: shopucfnation
Website URL: http://lanceem.com
URL to page in question: http://lanceem.com

Thanks in advance for the help and guidance!

-Logan

Eric October 3rd, 2012 10:15 AM

Hi

Try adding the CSS ID wdgt_pl to your custom widgets here:

The Factory > Your Store > VIEWS > CUSTOM VIEWS > Sale Items > View menu > View Properties > Custom CSS ID

The Factory > Your Store > VIEWS > CUSTOM VIEWS > Hot Products > View menu > View Properties > Custom CSS ID

The Factory > Your Store > VIEWS > CUSTOM VIEWS > Recently Viewed Products > View menu > View Properties > Custom CSS ID

Also, change the Widget name (not the Widget title) to something other than Sale Items here: The Factory > Your Store > VIEWS > CUSTOM VIEWS > Sale Items > View menu > View Properties > Widget name

The title "Sale Items" is already in use by another view.

Lastly, the reason you are seeing products in duplicate and triplicate is because you have duplicated the template code in your views. For example, in your Sale Items view you have this:

HTML Code:

<div class="pl">
  [product.each]
  <div class="t1 col4">
  <div class="bdr">
    <h2><a href="[product.link]" title="[product.name]">[product.name]</a></h2>
    <div class="thmb"><a href="[product.link]" title="[product.name]">[product.image tag='1']</a></div>
    <div class="prc">[product.currency mode='sign'][product.price]</div>
    <p class="desc">[product.description]</p>
    <div class="btns">
    <a href="[product.link]" title="View details [product.name]" class="dfbutton dforange dfmedium">Details</a>
    <a href="[product.url direct='0']" title="Buy [product.name]" class="dfbutton dforange dfmedium" rel="nofollow">Buy</a>
    </div>
    <div class="clearingdiv"> </div>
  </div>
  </div>
  [/product.each]
  <div class="clearingdiv"> </div>
</div><div class="pl">
  [product.each]
  <div class="t1 col1">
  <div class="bdr">
    <h2><a href="[product.link]" title="[product.name]">[product.name]</a></h2>
    <div class="thmb"><a href="[product.link]" title="[product.name]">[product.image tag='1']</a></div>
    <div class="prc">[product.currency mode='sign'][product.price]</div>
    <p class="desc">[product.description]</p>
    <div class="btns">
    <a href="[product.link]" title="View details [product.name]" class="dfbutton dforange dfmedium">Details</a>
    <a href="[product.url direct='0']" title="Buy [product.name]" class="dfbutton dforange dfmedium" rel="nofollow">Buy</a>
    </div>
    <div class="clearingdiv"> </div>
  </div>
  </div>
  [/product.each]
  <div class="clearingdiv"> </div>
</div><div class="pl">
  [product.each]
  <div class="t1 col4">
  <div class="bdr">
    <h2><a href="[product.link]" title="[product.name]">[product.name]</a></h2>
    <div class="thmb"><a href="[product.link]" title="[product.name]">[product.image tag='1']</a></div>
    <div class="prc">[product.currency mode='sign'][product.price]</div>
    <p class="desc">[product.description]</p>
    <div class="btns">
    <a href="[product.link]" title="View details [product.name]" class="dfbutton dforange dfmedium">Details</a>
    <a href="[product.url direct='0']" title="Buy [product.name]" class="dfbutton dforange dfmedium" rel="nofollow">Buy</a>
    </div>
    <div class="clearingdiv"> </div>
  </div>
  </div>
  [/product.each]
  <div class="clearingdiv"> </div>
</div><div class="pl">
  [product.each]
  <div class="t1 col1">
  <div class="bdr">
    <h2><a href="[product.link]" title="[product.name]">[product.name]</a></h2>
    <div class="thmb"><a href="[product.link]" title="[product.name]">[product.image tag='1']</a></div>
    <div class="prc">[product.currency mode='sign'][product.price]</div>
    <p class="desc">[product.description]</p>
    <div class="btns">
    <a href="[product.link]" title="View details [product.name]" class="dfbutton dforange dfmedium">Details</a>
    <a href="[product.url direct='0']" title="Buy [product.name]" class="dfbutton dforange dfmedium" rel="nofollow">Buy</a>
    </div>
    <div class="clearingdiv"> </div>
  </div>
  </div>
  [/product.each]
  <div class="clearingdiv"> </div>
</div><div class="pl">
  [product.each]
  <div class="t1 col2">
  <div class="bdr">
    <h2><a href="[product.link]" title="[product.name]">[product.name]</a></h2>
    <div class="thmb"><a href="[product.link]" title="[product.name]">[product.image tag='1']</a></div>
    <div class="prc">[product.currency mode='sign'][product.price]</div>
    <p class="desc">[product.description]</p>
    <div class="btns">
    <a href="[product.link]" title="View details [product.name]" class="dfbutton dforange dfmedium">Details</a>
    <a href="[product.url direct='0']" title="Buy [product.name]" class="dfbutton dforange dfmedium" rel="nofollow">Buy</a>
    </div>
    <div class="clearingdiv"> </div>
  </div>
  </div>
  [/product.each]
  <div class="clearingdiv"> </div>
</div><div class="pl">
  [product.each]
  <div class="t1 col4">
  <div class="bdr">
    <h2><a href="[product.link]" title="[product.name]">[product.name]</a></h2>
    <div class="thmb"><a href="[product.link]" title="[product.name]">[product.image tag='1']</a></div>
    <div class="prc">[product.currency mode='sign'][product.price]</div>
    <p class="desc">[product.description]</p>
    <div class="btns">
    <a href="[product.link]" title="View details [product.name]" class="dfbutton dforange dfmedium">Details</a>
    <a href="[product.url direct='0']" title="Buy [product.name]" class="dfbutton dforange dfmedium" rel="nofollow">Buy</a>
    </div>
    <div class="clearingdiv"> </div>
  </div>
  </div>
  [/product.each]
  <div class="clearingdiv"> </div>
</div><div class="pl">
  [product.each]
  <div class="t1 col1">
  <div class="bdr">
    <h2><a href="[product.link]" title="[product.name]">[product.name]</a></h2>
    <div class="thmb"><a href="[product.link]" title="[product.name]">[product.image tag='1']</a></div>
    <div class="prc">[product.currency mode='sign'][product.price]</div>
    <div class="btns">
    <a href="[product.link]" title="View details [product.name]" class="dfbutton dforange dfmedium">Details</a>
    <a href="[product.url direct='0']" title="Buy [product.name]" class="dfbutton dfblack dflarge">Buy</a>
    </div>
    <div class="clearingdiv"> </div>
  </div>
  </div>
  [product.end]
  <div class="clearingdiv"> </div>
</div><div class="pl">
  [product.each]
  <div class="bdr">
    <h2><a href="[product.link]" title="[product.name]">[product.name]</a></h2>
    <div class="thmb"><a href="[product.link]" title="[product.name]">[product.thumbnail tag='1']</a></div>
    <div class="prc">[product.currency mode="sign"][product.price]</div>
    <div class="btns">
      <a href="[product.link]" title="View [product.name]" class="dfbutton dforange dfmedium dfrounded">more details</a>
    </div>
  </div>
  [product.end]
</div>

But it only needs to be this:
HTML Code:

<div class="pl">
  [product.each]
  <div class="t1 col4">
  <div class="bdr">
    <h2><a href="[product.link]" title="[product.name]">[product.name]</a></h2>
    <div class="thmb"><a href="[product.link]" title="[product.name]">[product.image tag='1']</a></div>
    <div class="prc">[product.currency mode='sign'][product.price]</div>
    <p class="desc">[product.description]</p>
    <div class="btns">
    <a href="[product.link]" title="View details [product.name]" class="dfbutton dforange dfmedium">Details</a>
    <a href="[product.url direct='0']" title="Buy [product.name]" class="dfbutton dforange dfmedium" rel="nofollow">Buy</a>
    </div>
    <div class="clearingdiv"> </div>
  </div>
  </div>
  [/product.each]
  <div class="clearingdiv"> </div>
</div>

Eric

shopucfnation October 3rd, 2012 10:33 AM

Wow! That was a simple fix.

Thanks so much for the detailed response, Eric!


All times are GMT -5. The time now is 01:11 PM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.