You are here:  » %PRODUCT_URL% doesn't work in Prices Each


%PRODUCT_URL% doesn't work in Prices Each

Submitted by marco@flapper on Fri, 2012-02-10 08:06 in

Hi,
%PRODUCT_URL% works in search results but I tried to use it as following in Prices Each:

<tr>
<td><a href='%BUY_URL%'><nobr>%MERCHANT%</nobr></a></td>
<td><a href='%PRODUCT_URL%'><nobr>%ORIGINAL_NAME%</nobr></a></td>
<td>%PRICE%</td>
%IF_VOUCHER_CODES%<td>%VOUCHER_CODE%</td>%ENDIF_VOUCHER_CODES%
<td><a href='%PRODUCT_URL%'><nobr>See more</nobr></a></td>
</tr>

But then I get the following non-working link:
http://www.example.com/the-wordpresspage-where-the-shortcode-is-used/%PRODUCT_URL%

I'm using the [pto prices=""] shortcode.

Submitted by support on Fri, 2012-02-10 09:16

Hi Marco,

To add support for %PRODUCT_URL% to Prices / Each, edit pto_product.php and look for the following code at line 83:

    $each = str_replace("%BUY_URL%",pto_common_buyURL($product),$each);

...and REPLACE with:

    $each = str_replace("%BUY_URL%",pto_common_buyURL($product),$each);
    $each = str_replace("%PRODUCT_URL%",pto_common_productHREF($product),$each);

Cheers!
David.
--
PriceTapestry.com

Submitted by marco@flapper on Mon, 2012-02-13 09:25

Thanks, works nicely.