You are here:  » Featured products mod


Featured products mod

Submitted by thelegacy on Thu, 2018-01-11 14:29 in

Hi David,

Working on a loop for featured products so it fits in my newest layout I'm building here, you'll see the heading Featured Products: {link saved}

Having troubles implementing the pt code into this layout as I have it, keep getting either a foreach error or end of file error, wondering if you could give me a hand with it, so stuck the html here without pt coding.

{code saved}

Thanks a million for this one!
Ray

Submitted by support on Thu, 2018-01-11 14:47

Hello Ray,

For your comment;

<!-- start pt featured product loop -->

...use:

<?php foreach($featured["products"] as $k=> $product): ?>

...and for comment:

<!-- end pt featured product loop -->

...use:

<?php endforeach; ?>

And within the loop; for the link href:

href='<?php print $product["productHREF"]; ?>'

...for the img src:

src='<?php print htmlspecialchars($product["image_url"],ENT_QUOTES,$config_charset); ?>'

...for the product name:

<?php print $product["name"]; ?>

...and for the price span;

<span class='normal'><?php print tapestry_price($product["minPrice"]); ?></span>

Hope this helps!

Cheers,
David.
--
PriceTapestry.com