Author Topic: customfield dropdown only working on first displayed product  (Read 2704 times)

cfrunningman

  • Beginner
  • *
  • Posts: 3
  • A beginner
Virtuemart version 3.0.16 Joomla 3.5.1 PHP 5.6.22
Hello,
not sure when this started to happen but I'm sure it was working at some stage.
I have a custom field that displays on the browse product page and the product detail page. On the first product if I change the select then I 'm taken to the product page of that selection (its a child of the master) this is working as expected.
However if I do the same on any other product then I'm taken to the master record and not the child. I've looked at the generated js in the browser and can see no problems. I know its not the product as they will all work as expected if they are in position 1.
I do see an exception in Chrome (but not always) pointing to " jquery.min.js:4 Uncaught TypeError: ((m.event.special[e.origType] || (intermediate value)).handle || e.handler).apply is not a function" this stops the page from going to the product when the selection is changed so not quite the same issue but possibly related.
I'm all googled out and stuck, if anyone has any suggestions I'd welcome them

Thanks
Mark

dirkb

  • Jr. Member
  • **
  • Posts: 75
Re: customfield dropdown only working on first displayed product
« Reply #1 on: July 24, 2016, 12:51:49 pm »
We actually have the same or similar problem.

Using J 3.5.1 and VM 3.016

Creating child / parent and use costomfield multivariant - the first product created works (use dropdown to select, you go to the selected child)

If you create another product, completely new with parent / child the same way, really, the same steps, the new product does not work like the first one. If you use the dropdown to select the child, its not going to the detail view and if you click "add to basket" it actually only add the parent, not the child, even so its selected in the dropdown.

I tried to use the VM 3.17.4 version Milbo posted in one thread - this actually kills my browser and I get a "do you want to stop or debug script" message.

We updated from VM 3.0.12 to fix a few bugs, thinking 3.0.16 is stable. We use VMuikit the latest, but I turned that off, same behaviour with the core files. We have no template overrides.

Whats up with that ?

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10153
  • VM3.9 Eagle Owl
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: customfield dropdown only working on first displayed product
« Reply #2 on: July 25, 2016, 09:20:52 am »
The basic problem is a wrong line in vm3.0.16 in the category layout file default.php. Just remove the vmJsApi::addJScript('ajaxContent',$j);

I tried to use the VM 3.17.4 version Milbo posted in one thread - this actually kills my browser and I get a "do you want to stop or debug script" message.

That is very important to understand why you got that. Because you are the only one who got it, so if we dont find the problem, it will be in the new release.

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

cfrunningman

  • Beginner
  • *
  • Posts: 3
  • A beginner
Re: customfield dropdown only working on first displayed product
« Reply #3 on: July 25, 2016, 12:39:34 pm »
Thank you Milbo for your suggestion I removed the line
vmJsApi::addJScript('ajaxContent',$j);
from the file
/httpdocs/components/com_virtuemart/views/category/tmpl
cleared cache etc but still the drop down only works for the first product, all others being sent to the master and not the selected child.

Any pointers appreciated
Thanks
Mark

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10153
  • VM3.9 Eagle Owl
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: customfield dropdown only working on first displayed product
« Reply #4 on: July 25, 2016, 12:44:09 pm »
Please directly use the most recent vm3.0.17.4, a lot changed so, I hate to search old bugs. Maybe it is even fixed already.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

cfrunningman

  • Beginner
  • *
  • Posts: 3
  • A beginner
Re: customfield dropdown only working on first displayed product
« Reply #5 on: July 25, 2016, 14:21:16 pm »
Hello Milbo,
thank you for the pointer using vm3.0.17.4 has fixed the problem.
FYI The product layout .vm-col-3 at 33.333% causes the 3rd product to wrap to the next line, thats also true of .vm-col2 at 50% but that's easy to fix in the css.

Thanks
Mark

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10153
  • VM3.9 Eagle Owl
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: customfield dropdown only working on first displayed product
« Reply #6 on: July 25, 2016, 15:38:00 pm »
Nice to read.

"FYI The product layout .vm-col-3"
because another part of your css does not correctly fit. See committ
http://dev.virtuemart.net/projects/virtuemart/repository/revisions/9264
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

dirkb

  • Jr. Member
  • **
  • Posts: 75
Re: customfield dropdown only working on first displayed product
« Reply #7 on: July 25, 2016, 19:26:56 pm »
Hi Milbo ...

I'm getting the non-responsive script error with 3.0.74. See attached screens, second is debug window (not really sure what to do here).

I turned off our template and tried it with protostar, still the same ... Ideas ? I know the first response with jquery is "template" but with protostar its probably not our template, correct ?

We run Joomla 3.6

dirkb

  • Jr. Member
  • **
  • Posts: 75
Re: customfield dropdown only working on first displayed product
« Reply #8 on: July 25, 2016, 19:37:49 pm »
and additional info ... its probably the latest vmuikit we use (3.2.3) ... damn ... hope I can figure that out. I guess they support only 3.0.16 and with 3.0.16 we have the problems with the mulitvariant/child behaviour

dirkb

  • Jr. Member
  • **
  • Posts: 75
Re: customfield dropdown only working on first displayed product
« Reply #9 on: July 25, 2016, 20:09:19 pm »
just saw the releases 3.2.4 (tested with vm 3.0.17.2) ... still having the same issue, non-responsive script. have to contact them directly.

Thanasis

  • Beginner
  • *
  • Posts: 22
  • netadmin.gr
Re: customfield dropdown only working on first displayed product
« Reply #10 on: July 25, 2016, 21:48:47 pm »
I have the same problem with multi variant. When i change something the page not reload/refreshed. I use vm3.0.16 with joomla 3.6.0. I updated to vm3.0.17.4 and the problem exists. If i select the "Select" from parent the page reloads and everything is ok.

Thanasis

  • Beginner
  • *
  • Posts: 22
  • netadmin.gr
Re: customfield dropdown only working on first displayed product
« Reply #11 on: July 25, 2016, 21:55:07 pm »
Ok, i found the problem. The problem to my site is the  Flexible - Virtuemart Zoom Effect.

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10153
  • VM3.9 Eagle Owl
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: customfield dropdown only working on first displayed product
« Reply #12 on: July 26, 2016, 09:43:59 am »
and can we change something that vm is more compatible?
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

vlasterx

  • Beginner
  • *
  • Posts: 3
  • Web designer and frontend developer
    • Webdizajn.org
Re: customfield dropdown only working on first displayed product
« Reply #13 on: August 26, 2016, 09:14:18 am »
Just wanted to report that this happens to me as well in all webkit based browsers. VirtueMart 3.0.16 and Joomla 3.6.2

Code: [Select]
jquery.min.js:3 Uncaught TypeError: ((n.event.special[g.origType] || (intermediate value)).handle || g.handler).apply is not a function
It happens first time when I come to that page. After page reload everything works, problem is somewhere here:


components\com_virtuemart\sublayouts\customfield.php

Code: [Select]
$j = "jQuery(document).ready(function() {
  jQuery('#".implode(',#',$tags)."').off('change',Virtuemart.cvFind);
  jQuery('#".implode(',#',$tags)."').on('change', { variants:[".$jsVariants."] },Virtuemart.cvFind);
});";

Personal portfolio web-site
http://www.webdizajn.org

My own frontend framework
https://github.com/Vlasterx/nexus-framework

vlasterx

  • Beginner
  • *
  • Posts: 3
  • Web designer and frontend developer
    • Webdizajn.org
Re: customfield dropdown only working on first displayed product
« Reply #14 on: August 26, 2016, 10:56:24 am »
After update to 3.0.17.6 - browser just blocks because of unresponsive script.
Personal portfolio web-site
http://www.webdizajn.org

My own frontend framework
https://github.com/Vlasterx/nexus-framework