VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: fing086 on September 23, 2020, 23:19:40 PM

Title: Random 'W' in all product listings!
Post by: fing086 on September 23, 2020, 23:19:40 PM
Can anyone please point me in the direction of how to get rid of the 'W' that is circled in the attached image.
Its in every product but not part of any description text anywhere.
Even appears on fresh new uncloned products!
I just cant see where its coming from, even when looking at the source from within the browser!
Thanks in advance
Title: Re: Random 'W' in all product listings!
Post by: pinochico on September 23, 2020, 23:26:12 PM
Can you send html code or URL adress?
Title: Re: Random 'W' in all product listings!
Post by: fing086 on September 23, 2020, 23:28:01 PM
Sure:
http://www.lasercraftandcommercial.com/index.php/events/christmas-coasters-detail
Title: Re: Random 'W' in all product listings!
Post by: Jörgen on September 24, 2020, 00:12:18 AM
Someone has edited the template files and left an error in the product details file, probably ;
/templates/your template/html/com_virtuemart/productdetails/default.php (http://forum.virtuemart.net/templates/your%20template/html/com_virtuemart/productdetails/default.php)

Jörgen @ Kreativ Fotografi
Title: Re: Random 'W' in all product listings!
Post by: fing086 on September 24, 2020, 00:18:27 AM
Ok, thank you very much for your prompt advise.
Ill take a look at that file, no wonder I couldn't find it... and this is a paid for professional template!
Ill let the template designer know also.

Title: Re: Random 'W' in all product listings!
Post by: pinochico on September 24, 2020, 02:09:55 AM
QuoteSomeone has edited the template files and left an error in the product details file, probably ;
/templates/your template/html/com_virtuemart/productdetails/default.php

Yes, without URL and look inside inspect element code, this is  the first most likely option.

But is possible the error is inside implementation paypal, this, I think, was added later.

Definitelly, the error is between "product-short-description" and solution for paypal (custom code putted inside php code for product default template).

Meybe is in this file or inside plugin which put the Paypal code.
Title: Re: Random 'W' in all product listings!
Post by: Jörgen on September 24, 2020, 07:13:04 AM
From what i see this is inside the Short description container...
Jörgen @ Kreativ Fotografi
Title: Re: Random 'W' in all product listings!
Post by: pinochico on September 24, 2020, 11:39:08 AM
nop, after this or maybe this div is have not end element corectly.

But first time I try find problem in paypal code.
Title: Re: Random 'W' in all product listings!
Post by: fing086 on September 24, 2020, 11:47:31 AM
Yeah, I already disabled the paypal plugin as that was my first thought.
Rather than mess about, im getting the template author to sort it out as no doubt its an error in the originally supplied files.
Also the site is running really slow and they can look at that as well!

Thanks for pointing me in the right direction and letting me know it wasnt something I was missing or doing wrong :)
Very much appreciated.
Title: Re: Random 'W' in all product listings!
Post by: fing086 on September 24, 2020, 16:26:43 PM
A response from the template author:

Using your FTP access we checked the templates files - we checked website without template overrides and a "W" letter is still there. Looking closer into the code generated in web browser a "W" letter comes with PayPal plugin and has nothing to do with the template code.

Where do I go from here as I dont have this issue on other Virtuemart sites I run, both using the authors other templates and by installing Virtuemart separately?
Title: Re: Random 'W' in all product listings!
Post by: Jörgen on September 24, 2020, 19:20:25 PM
If it really disappears with PayPal plugin, even though You have said otherwise:
QuoteYeah, I already disabled the paypal plugin as that was my first thought.

You should check all the settings in backend for the PayPal payment method.

PayPal checkout ? If that is not something controlled from the PayPal settings, You some extra plugin to disable.

Jörgen @ Kreativ Fotografi
Title: Re: Random 'W' in all product listings!
Post by: fing086 on September 30, 2020, 12:39:33 PM
Hi, thanks for the continued advice.
I removed paypal completely and even added another payment method but the W is still there.
In the code for that page (found using Chrome) I found the following

<div class="product-short-description"><span class="module-arrow"></span>
               Acrylic Bookmarks. available in a variety of colours            </div>
                    W<br><div class="product-price" id="productPrice107" data-vm="product-prices">

However, there is no 'W' in the short description as this looks like its pointing to.
All I really need to do (I think) is find the code that controls the product layout pages and hopefully this is where I will find the error, but I dont know which file this could be and 'W' is hard to search for as its not a string of letters!!

The Author is now not responding to my requests to sort this out .
Title: Re: Random 'W' in all product listings!
Post by: pinochico on September 30, 2020, 13:18:31 PM
QuoteAll I really need to do (I think) is find the code

Maybe with login to FTP and some money ? :)
Title: Re: Random 'W' in all product listings!
Post by: jenkinhill on September 30, 2020, 15:02:58 PM
The problem we have here is that your template is using overrides to the standard template files.

From the location of the "w" it is most likely coming from one of two sublayout files, probably templates/coga/html/com_virtuemart/sublayouts/products.php 

Look in that file after <?php // Product Short Description   where you may find that w somewhere before the prices sublayout is called (by echo shopFunctionsF::renderVmSubLayout('prices',  or silimar).

Otherwise check the prices.php sublayout itself.
Title: Re: Random 'W' in all product listings!
Post by: fing086 on September 30, 2020, 15:37:18 PM
I only have addtocart addtocartbar and customfields (php files) and index.html in there and none point to a lone 'W'
Looked in prices.php in com-virtuemart and nothing in there either.

However, what you have said is basically where I am trying to look within code wise.
Title: Re: Random 'W' in all product listings!
Post by: fing086 on September 30, 2020, 15:58:00 PM
Ok, ive overinstalled the Virtuemart component just to see if anything changes.. (I had a backup just in case!)
It has changed... The 'W' now says 'Array'

Does this make more sense to anyone now?

Cheers
Daz
Title: Re: Random 'W' in all product listings!
Post by: jenkinhill on September 30, 2020, 17:15:02 PM
Yes, that confirms a template problem, probably you have out of date override files.  See http://forum.virtuemart.net/index.php?topic=140113.0
Title: Re: Random 'W' in all product listings!
Post by: fing086 on September 30, 2020, 17:55:01 PM
Perfect, Thank you very much for pointing me at the right file and issue.
Very much appreciated

All is now solved.