VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: jarlu on May 22, 2020, 15:48:22 PM

Title: Issue with product reloaded
Post by: jarlu on May 22, 2020, 15:48:22 PM
Hello, I updated VM for the newest version (3.8.2) and after update in categories if I chose some variant of product, product don't reloaded and still show only parent product (not update product price, image, and availability). This issue is only in categories, on frontpage and product views is OK. For product variants I use "Custom Fields For All" and in official support told me, that problem is with this script:
<script   id="ajax_category-js" type="text/javascript" >//<![CDAT[
Virtuemart.container = jQuery('.category-view');
Virtuemart.containerSelector = '.category-view'; //]]>
</script>

When I uncheck in VM administration "Use ajax for category content" everything is OK. The Support of Custom Fields For All suggested me that I have to write about this issue here.
Title: Re: Issue with product reloaded
Post by: pinochico on May 22, 2020, 16:31:30 PM
we use ajax too in payment Gopay plugin and we must add some code for loading VMConfig, because ajax is calling outside virtuemart.

maybe is the same problem, if you call ajax and use 3party extensions (outside VirtueMart)?
Title: Re: Issue with product reloaded
Post by: Studio 42 on May 22, 2020, 22:31:46 PM
The problem is your container
Virtuemart.container = jQuery('.category-view');
Need to find the element with class="category-view"
If you dont have no elemnt with this class, then Vm cannot inject the reloaded products in the HTML dom
Title: Re: Issue with product reloaded
Post by: jarlu on June 05, 2020, 19:03:13 PM
Hello, but I have category-view container in my template. Problem is on my template and all other templates (include Beez3 - Default or protostar - Default)
Title: Re: Issue with product reloaded
Post by: GJC Web Design on June 05, 2020, 23:25:47 PM
try switching off "Use ajax for category content" in the VM config->template & layouts tab
Title: Re: Issue with product reloaded
Post by: Milbo on June 15, 2020, 17:41:53 PM
GJC he started with that. The interesting point is, why it does not work for him. From begin? or only when the ajax was executed?
Title: Re: Issue with product reloaded
Post by: jarlu on June 18, 2020, 16:33:39 PM
Yes it works fine only when I is switch off "Use ajax for category content"