Author Topic: Dependent options not loading (ajax issue?)  (Read 383 times)

pixelperfectcreative

  • Beginner
  • *
  • Posts: 2
  • A beginner
Dependent options not loading (ajax issue?)
« on: February 21, 2018, 00:31:27 am »
I have a site that is complete except for one big problem. If you go to a product and select an option from the first box, it should populate the other option boxes. However about half the time it will not... unless you refresh the page.

Watch this video for an example of the problem: https://screencast-o-matic.com/watch/cFn23boKAF

Notice that I go to a product, select the first option and nothing happens (ajax issue?). Then, if I refresh the page, make a selection in that first box, the other options are then loaded.

I am desperate for an answer on this. Thanks in advance to anyone that has any help for me.

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9674
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Dependent options not loading (ajax issue?)
« Reply #1 on: February 25, 2018, 18:18:42 pm »
use in your browser with right click the "examine" or some other method to get the console, then click on js console and try the dropdown. You should now see below in the console how the js is working. and when it does not work, you will see an error there.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 3402
  • Joomla & Virtuemart addon developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3.0.x.y
Re: Dependent options not loading (ajax issue?)
« Reply #2 on: February 26, 2018, 13:41:51 pm »
This is typical an obsolete template not loading Vm scripts.
You need to add in your template file YOURSHOP/templates/YOURTEMPLATE/html/com_virtuemart/productdetails/default.php
echo vmJsApi::writeJS();
at end of file but before closing </div>

Note that in some case other JavaScripts are not load, but it work with this change 80% of time.