You are here:  » Retailers page and Visit store pages

Support Forum



Retailers page and Visit store pages

Submitted by JasonG on Wed, 2011-11-30 15:21 in

Hi David

I have created a retailers page, thank you for you help with that code. {link saved}

I want to find an easy way to display the relevant percentage (%) under each of the visit store buttons relevant to each retailer, {link saved}
What would be the best way to do this?

Regards
Stuart

Submitted by support on Thu, 2011-12-01 09:33

Hi Stuart,

Simplest way would be to maintain an array containing the percentages for each merchant at the top of html/prices.php. Add the following code right at the top:

<?php
  $percentages
["A Coombes Pet Center"] = "2.5";
  
$percentages["Amazon"] = "2.5";
  
// complete the array for all other merchants
?>

Then, to display the percentage go to the code that displays your Visit Store button, (look for the img tag) and immediately afterwards, add something like:

<br />
<?php print $percentages[$product["merchant"]]; ?>% Donation

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by JasonG on Thu, 2011-12-01 10:03

Hi David

Fantastic, thank you so much!

Regards
Stuart