You are here:  » %ENDIF_IMAGE%


%ENDIF_IMAGE%

Submitted by babrees on Mon, 2021-09-13 17:13 in

Hi David - moved over to the Wordpress installation!

The images on the search, merchant, category and brand pages, and also the related products, are showing %ENDIF_IMAGE% just below them. How can I fix that please

Cheers
Jill

Submitted by support on Tue, 2021-09-14 07:48

Hi Jill,

That sounds like the corresponding %IF_IMAGE% may have been accidentally deleted from the Search Results / Each template (wp-admin > Settings > PriceTapestry.org) - check that it contains as per the original;

%IF_IMAGE%
  <a href='%PRODUCT_URL%'><img src='%IMAGE_URL%' /></a>
%ELSE_IMAGE%
&nbsp;
%ENDIF_IMAGE%

...what's important is that %IF_IMAGE% ... %ELSE_IMAGE% ... %ENDIF_IMAGE% appear in order as they are removed by a regexp replace. That should be all it is...

Cheers,
David.
--
PriceTapestry.com

Submitted by babrees on Tue, 2021-09-14 08:56

Hi David

I haven't even looked at the templates yet so not touched them :)

This is what I have for Search Results > Each

<tr>
<td>
%IF_IMAGE%<img class='pto_search_image' src='%IMAGE_URL%' />%ENDIF_IMAGE%
</td>
<td>
<p class='pto_search_name'><a href='%PRODUCT_URL%'>%PRODUCT_NAME%</a></p>
%IF_DESCRIPTION%<p class='pto_search_description'>%DESCRIPTION%</p>%ENDIF_DESCRIPTION%
</td>
<td class='pto_search_price'>
%IF_COMPARED%
  from</em> %PRICE%
  <br />
  <a href='%PRODUCT_URL%'>Compare Prices</a>
%ELSE_COMPARED%
  %PRICE%
  <br />
  <a href='%PRODUCT_URL%'>More Information</a>
%ENDIF_COMPARED%
</td>
</tr>

Submitted by support on Tue, 2021-09-14 10:38

Hi Jill,

That's strange appears to be a mix of new code / old templates... could you uninstall and make sure that you're using the latest download 3.0 (BETA) which is stable and the templates have a responsive down.

If you are using the latest but the old templates still appear did you previously have an older version of the plugin installed in the same WordPress installation?

Cheers,
David.
--
PriceTapestry.com

Submitted by babrees on Tue, 2021-09-14 10:52

I have just downloaded the beta 3 again, deleted plugin on server, reuploaded by ftp.
Still the same

Yes, I did have older version on, but deleted the plugin prior to uploading the new Beta 3

I don't have any cache on the site.

Submitted by babrees on Wed, 2021-09-15 05:42

Hi David

[update]
Site had a major melt down. Not only did the import not work but no products or merchants showed on front end. So I made a new directory and installed a fresh copy of PT. Same database but using pt1_ Set up automation, ran and imported feeds. All working fine.

However, the %ENDIF_IMAGE% is still showing, despite being a fresh download (3 Beta) and completely new install.

So, out of curiosity, I downloaded the ol' searchExternal.php and entered the php with keywords - nada. Nothing at all displayed. [sigh]

Cheers
Jill

Submitted by support on Wed, 2021-09-15 09:51

Hi Jill,

I just looked at the WordPress code for add_option used during the plugin install function and if the setting already exists it would not be re-created with the new default value which is why you are seeing the old templates.

To fix this, edit pto.php and look for the following code at line 51:

        add_option($setting,$defaults->$setting);

...and REPLACE with:

        delete_option($setting);
        add_option($setting,$defaults->$setting);

And then the following code at (now) line 103:

        add_option($setting,$defaults->$setting);

...and REPLACE with:

        delete_option($setting);
        add_option($setting,$defaults->$setting);

Finally, uninstall and then re-install the plugin and it should be refreshed with the new default responsive templates...

Cheers,
David.
--
PriceTapestry.com

Submitted by babrees on Wed, 2021-09-15 10:40

Thanks David. That did the trick! Everything is working now :)

Cheers
Jill