Hi David
How do you create a buy now button? or can you remove product review and more information link and replace it with a buy now button and the voucher code for that merchant?
Kind regards
Andrew
Hi David
Which Code is for the buy now button ?
Cheers
Sorry Andrew,
...the replacement described above will just display "Buy Now" as text, from this line:
<span class='nobr'><a href='<?php print tapestry_buyURL($product); ?>'>Buy Now</a></span>
...but if you want that to be a button (image link), first upload a suitable image to your /images/ folder e.g.
/images/buynow.gif
...and then replace that line with:
<span class='nobr'><a href='<?php print tapestry_buyURL($product); ?>'><img border='0' src='<?php print $config_baseHREF."images/buynow,gif"; ?>' /></a></span>
Cheers,
David.
--
PriceTapestry.com
Hi David
Were do I put the buy now code? is it in Index.php
Cheers
Andrew
Hi Andrew,
The changes above all relate to html/searchresults.php
Cheers,
David.
--
PriceTapestry.com
Hi Andrew,
I've merged the image Buy Now button instead of text link with the original replacement described in the first reply - use the following code to replace the section described. If you're not sure; email me your existing html/searchresults.php and I'll add the code for you...
<?php else: ?>
<?php if ($product["voucher_code"]): ?>
Voucher Code: <strong><?php print $product["voucher_code"]; ?></strong>
<br />
<?php endif; ?>
<strong><?php print $config_currencyHTML.$product["price"]; ?></strong><br />
<span class='nobr'><a href='<?php print tapestry_buyURL($product); ?>'><img border='0' src='<?php print $config_baseHREF."images/buynow,gif"; ?>' /></a></span>
<?php endif; ?>
Cheers,
David.
--
PriceTapestry.com
Hello Andrew,
Sure - the first thing you will need to do is enable level 2 voucher codes integration; where discounts are calculated and the voucher code field in the database populated at import time. To do this, changed line 41 in config.advanced.php as follows:
$config_useVoucherCodes = 2;
With that in place, you can change the single merchant case in html/searchresults.php as follows - look for the following code beginning at line 27:
<?php else: ?>
<strong><?php print $config_currencyHTML.$product["price"]; ?></strong><br />
<span class='nobr'><a href='<?php print $product["productHREF"]; ?>'><?php print translate("More Information"); ?></a></span>
<?php endif; ?>
...and REPLACE with something like this; adjustable of course depending on how you wish to lay it out:
<?php else: ?>
<?php if ($product["voucher_code"]): ?>
Voucher Code: <strong><?php print $product["voucher_code"]; ?></strong>
<br />
<?php endif; ?>
<strong><?php print $config_currencyHTML.$product["price"]; ?></strong><br />
<span class='nobr'><a href='<?php print tapestry_buyURL($product); ?>'>Buy Now</a>
</span>
<?php endif; ?>
Hope this helps!
Cheers,
David.
--
PriceTapestry.com