You are here:  » Merchant logos in [pto prices]


Merchant logos in [pto prices]

Submitted by sanniep on Sat, 2016-01-02 19:17 in

Hi David,

Like said, I use Price Tapestry for Wordpress to display price comparison using the shortcode [pto prices]. Is there a way to display merchant logo's instead of names in the first column of the table?

Regards, Sander

Submitted by support on Mon, 2016-01-04 09:25

Hello Sander,

The price comparison table should display merchant logos if they exist and the check for the logo file indicates that it is present (otherwise the merchant name is displayed instead). First check that the Install Path setting under the External section of the PriceTapestry.org configuration (/wp-admin/ > Settings > PriceTapestry.org) is correct - the value should be as displayed under Tools > Support Info of the associated Price Tapestry installation.

If that's all in place and the values match, I recall that you have Price Tapestry on a different domain name to WordPress, and it may be that due to your server configuration that whilst the two domains are able to access the same database, the file_exists() check may not be able to work cross-domain. If this is the case, as long as you will always have logo files present you can bypass this check and simply render the logo URL anyway. To do this, edit the plugin file pto_product.php and look for the following code at line 101:

  if (file_exists($pto_config_externalPath."logos/".$product->merchant))

...and REPLACE with:

  if (TRUE)

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by sanniep on Tue, 2016-01-05 22:35

Hi David, thanks for your extensive response once again!

I have copied the install path and base href from the info tab to the WP PT settings. They where ok before I guess because nothing changed. I do see the logo's in my PT main install btw.\

So I tried to edit pto_prices but I can't find this file in my wp-content>plugins>pto folder. Where should this file be?

Ow, I cloned my PT install to the same domain as where WP is. It's in a subfolder named pt, together with wordpress.

Regards, Sander

Submitted by support on Wed, 2016-01-06 11:53

My apologies Sander, the file is pto_product.php (corrected above)...

Cheers,
David.
--
PriceTapestry.com

Submitted by sanniep on Wed, 2016-01-06 13:19

Hi David, I found the file and code but I think there was something else missing. The code does not contain the file extension (like pt/prices.php does). So I added ".img" to the URL and now the images show.

Regards, Sander