Hi David,
How do I create a link in prices.php that would link to a different page with coupon code or shipping info?
Something similar to the "Stockist" link (http://mysite.com/merchant/merchantsite.com/) but instead...
http://mysite.com/coupons/merchantsite.com/ or
http://mysite.com/shipping/merchantsite.com/
Thanks for your help,
Jay
Hello Jay,
Within html/prices.php each price is displayed within a foreach loop that you can find beginning on line 9 as follows:
<?php foreach($prices["products"] as $product): ?>
After that point, and before the closing endforeach; (line 16) you can access the merchant name through the variable $product["merchant"]. As the script is in HTML mode at this point, all you need to do to generate links as above would be something like:
<a href='/coupons/<?php print $product["merchant"]; ?>/'>Coupons</a>
Cheers,
David.