Greetings David,
I looked but only found a topic that I started 7 years ago which I think may be dated a tad... :)
Can you advise me how to get the following to work with the plugin. It works with the standalone version just fine.
{code saved}
Where else would this code be? I checked my PTO file and one from the zip but I don't have a string like that.
I dumbed it down to searching for $html_product with no results still.
Thanks!
Tommy
Hello Tommy,
My apologies, it's file pto_product.php - corrected above...
Cheers,
David.
--
PriceTapestry.com
You my friend are still the best support for any product I've ever purchased. I don't know how you maintain the same level of performance over the years but you have once again fixed my issue.
Thank you!
Tommy
Hi,
Try something like this to get started - edit the plugin file pto_product.php and look for the following code at line 490:
$html_product = str_replace("%PRICE%",$pto_config_currencyHTML.$product->price,$html_product);
...and REPLACE with:
$url = urlencode("http".(isset($_SERVER["HTTPS"])&&$_SERVER["HTTPS"]?"s":"")."://".$_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"]);
$social = "
<a target='_blank' href='https://www.facebook.com/sharer/sharer.php?u=".$url."&t=".urlencode($product->name)."'>Facebook</a><br />
<a target='_blank' href='https://twitter.com/share?url=".$url."&text=".urlencode($product->name)."'>Twitter</a><br />
<a target='_blank' href='https://plus.google.com/share?url=".$url."&t=".urlencode($product->name)."'>Google+</a><br />
";
if ($product->image_url)
{
$social .= "
<a target='_blank' href='http://pinterest.com/pin/create/button/?url=".$url."&media=".urlencode($product->image_url)."&description=".urlencode($product->name)."'>Pintrest</a>
";
}
$html_product = str_replace("%SOCIAL%",$social,$html_product);
$html_product = str_replace("%PRICE%",$pto_config_currencyHTML.$product->price,$html_product);
And then add where required to your Product / Main template (wp-admin > Settings > PriceTapestry.org) for example;
<p>%SOCIAL%</p>
Hope this helps!
Cheers,
David.
--
PriceTapestry.com