Datafeedr Support Forums

Datafeedr Support Forums (/index.php)
-   Questions (/forumdisplay.php?f=67)
-   -   How To Display Discounted Sale Price In Related Products - Custom View (/showthread.php?t=5256)

erin September 24th, 2011 10:09 AM

How To Display Discounted Sale Price In Related Products - Custom View
 
I would like to know how to include the discounted sale price in my Related Products Custom View to show in my posts please.

Here is the code I've entered into my Related Products Custom View but it's not displaying the sale price of some products which have gone on sale at the merchants store.

https://www.erinsecolist.com/?p=4162&preview=true

<div class="pl">
[product.each]
<div class="t2 col1">
<div class="bdr">
<h2><a href= "[product.url]" title="[product.name]" target="_blank" rel="nofollow">[product.name]</a></h2>
<div class="lc">
<div class="thmb"><a href="[product.url]" title="[product.name]" target="_blank" rel="nofollow">[product.image tag='1']</a></div>
</div>
<div class="rc">
<p class="desc">[product.description]</p>
<div class="prc_btns">
<table>
<tr>
<td class="prc" >
[product.currency mode='sign'][product.price]
<?php if ($product->saleprice > 0 && $product->saleprice < $product->price) { ?>
<div class="prc">
<small>
Was: <span style="text-decoration: line-through;">[product.currency mode='sign'][product.price]</span>
Now: <span style="font-weight: bold; color:red;">[product.currency mode='sign'][product.saleprice]</span>
</small>
</div>
<?php } else { ?>
<div class="prc">
<small>
[product.currency mode='sign'][product.price]
</small>
</div>
<?php } ?>
</td>
<td class="btns">
<a href="[product.url direct='0']" title="Buy [product.name]" target="_blank" rel="nofollow"class="dfbutton dfgreen dflarge">Buy</a>
</td>
</tr>
</table>
</div>
</div>
<div class="clearingdiv"> </div>
</div>
</div>
[product.end]
<div class="clearingdiv"> </div>
</div>

Eric September 24th, 2011 12:02 PM

Hi

It appears that none of those items are on sale. That's why there is no sale price to display.

Eric

erin September 24th, 2011 08:42 PM

Hi Eric,

The alpaca cushions were on sale but didn't show as being marked down on my post. Now they are back to their original price. Was I supposed to update my products and settings or do these prices change automatically? Is the following code I wrote above correct...if I would like to show items marked down in my Related Products Field? I saw your other thread. I will take a look at that too.

Thanks,
Erin

Eric September 25th, 2011 08:54 AM

Hi

Yes, your code looks fine. But those products don't to appear to be on sale at the moment... at least not in the data feed the merchant provided.

Eric


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

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