hi david
is it possible to display merchant content using a specific calling code. so for example if you look at {link saved} i would like to display content from a html file above the results.
thanks
Paul
hi david
i have tried the above on {link saved} but it isnt showing the content from {link saved}
any ideas?
thanks
paul
Hello Paul,
The mod relies on the setting "Install Path" under the External section of wp-admin > Settings > PriceTapestry.org. Double check that this is set correctly - it should contain the value as shown on the /pt/admin/ Support Info page.
That should be all it is...
Cheers,
David.
--
PriceTapestry.com
Hi David,
I want to display extra info for some featured products on the featured page. May I know what code to add to the featured page?
I have tried the ones from product.php and search.php, but they won't work on featured pages.
Hi,
Based on the same principal, start by creating the folder "featuredinfo" within the Price Tapestry installation (e.g. /pt/featuredinfo) and create the info filenames as
/pt/merchantinfo/Product Name.html
Then in pto_featured.php look for the following code at line 172:
$html .= $each;
...and REPLACE with:
global $pto_config_externalPath;
$featuredinfo = "";
$featuredinfoFilename = $pto_config_externalPath."featuredinfo/".$row->name.".html";
if (file_exists($featuredinfoFilename))
{
$featuredinfo = file_get_contents($featuredinfoFilename);
}
$each = str_replace("%INFO%",$featuredinfo,$each);
$html .= $each;
Finally, in your Featured Products / Each template (wp-admin > Settings > PriceTapestry.org ), insert the plaeholder %INFO% at the point at which you want to pull the contents of the info .html file in...
Hope this helps!
Cheers,
David.
--
PriceTapestry.com
Hi David,
I assume that $merchantinfoFilename should be $featuredinfoFilename in your code. I've created a folder "featuredinfo" with a product.html but it only shows the word "featuredinfo" instead of the content of the file.
Hi,
Sorry about that - replacement corrected above - you're correct regarding $merchantinfoFilename but also featuredinfo should be $featuredinfo...
Cheers,
David.
--
PriceTapestry.com
Hello Paul,
Sure - a plugin equivalent of this mod - create the same folder "merchantinfo" within the Price Tapestry installation (e.g. /pt.merchantinfo) and create the merchant info filenames as
/pt/merchantinfo/Merchant Name.html
Then in pto_search.php look for the following code at line 439:
$html = "";
...and REPLACE with:
$html = "";
global $pto_q;
global $pto_page;
global $pto_config_externalPath;
$parts = explode(":",$pto_q);
if (($parts[0]=="merchant") && ($pto_page==1))
{
$merchantinfoFilename = $pto_config_externalPath."merchantinfo/".$parts[1].".html";
if (file_exists($merchantinfoFilename))
{
$html .= file_get_contents($merchantinfoFilename);
}
}
Cheers,
David.
--
PriceTapestry.com