You are here:  » Inserting dynamic text in product.php file

Support Forum



Inserting dynamic text in product.php file

Submitted by beverleydunster on Sun, 2012-03-04 12:48 in

Hi

I'm looking to be able to insert certain product data dynamically in to a product detail page. For instance - a sentence of text, which I have placed in product.php reading... "View more information about this [productname] from [merchant] by clicking here". Is there a way to do this?

Furthermore, with the 'clicking here' bit, I'm trying to make this a 'visit store' links - and have used the following code in the a tag...
href='<?php print tapestry_buyURL($product); ?>'

but it does not pull in the jump ID, so therefore does not work. Example of a page where I'm trying to achieve all this is:
{link saved}

Many thanks!

Submitted by support on Sun, 2012-03-04 13:45

Hello Beverly;

Welcome to the forum!

Within html/product.php you actually need to use $mainProduct rather than $product, that should be all it is, so for example you could use:

<p><a href='<?php print tapestry_buyURL($mainProduct); ?>'>View more information about this <?php print $mainProduct["name"]; ?> from <?php print $mainProduct["merchant"]; ?> by clicking here!</a></p>

Cheers,
David.
--
PriceTapestry.com