3.0.6(.2): Quantity Not incrementing on Product Details page

Started by melingmeier, March 03, 2015, 10:37:42 AM

Previous topic - Next topic

Milbo

yeh Patrick and whoever wrote it. In doubt it was you, because you did most of the js in vm2.0. All I did was to notice that it does not work and to adjust it that it works. One part of the work was to create a proper function for it. I just placed the function in the Virtuemart variable. To remove the inline stuff, but the function is mainly a copy of the old stuff with a bit enhancements making it more robust. But the idea for vm3 was to stay BC as best as possible regarding the templates/layouts and there are often more important things todo, so I left it. Btw j3 is even using inline js for all toolbars.

I had to rework a lot js, due the ajax reloading. So I was happy if someone directly worked.
None of my new js is inline. All the js, which I overhauled myself is using the .on .off construction. But actually, inline scripts are shitty to modify ( I know it very well, because I just overhauled the js for j2.5 and j3.4 and then came j3.4.1), but work very well. And you know the rules of this projects, they are still the same.
If you want to modify it and want to remove the inline js, then just create a patch using the jQuery on. off. pattern and it will be implemented at least for vm3.2
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Studio 42

Max,
Many problem come from step checking. This was not existing when i was in team.
The button was working before, because the value was always 1, nothing to check.
A developer has added the step feature(for more then 1 year), from this moment the script have bugs.
You can check yourself the commits, i never wrote one line of the broken code.

I Never said, you have add the "bad" code, but you (the current team) continue to use it so. If you don't understand, i cannot help you.
The ajax loading is a nice feature, but i think it was not mature and was not the moment to add it.

I don't migrate to Virtuemart 3 only because, migration does not full work, all little bugs in vm3 and i cannot re implement my own javascript with the method you use currently. Of course if you don't use any plugins, modules with javascript, all work correctly but for custom shops you can't migrate when you have Zoom script for eg., customfields with javascripts Or you have to rewrite all the Core javascript.

Studio 42

For the inline javascript in joomla, this was a main problem seens year :

You can read this page : https://docs.joomla.org/JavaScript_Working_Group#J.21_and_Beyond_2012 reporting the same problems

you can read in this page:
QuoteStop writing JavaScript in PHP!
Stop
writing inline JavaScript! (causes "flashes") (although Geraint disagrees (and so does Peter (and Danielle)))
Don't code onClick events directly into markup! Use stopPropagation.

But as you can see the Joomla javascript coder do the same, but this not mean they do it right

PS: I was at this meeting and all the people making javascript said the same thing

Milbo

Seems you still do not understand. There are always wishes and the reality. If you want that your wishes become reality, you must priorise. If no one has problems with the code, no one want to change it => no one will change it. Very simple. It has nothing todo if the code could be written better or not. The project has the still the same rules as years before. If you or your customers have a problem with the code, enhance it. Dont come in here and just bitch around.

The ajax stuff is working very great and also with 3rd party plugins, you must just use the correct way. So why the gentle you come in here, not being able to adjust your js to the ajax, which is according to your own words basic knowledge. On the other hand you want that I change a function which works for most people that way and also with the ajax. Just because it is not following the last standard.

The thread is solved. Anyone is happy, even we know it could be better, but you come in here and mainly just bitch around.

Btw you can solve the problem of dynamically loaded js on different ways. So my priority was not to provide a perfect quantity step script. My priority was to get a js working dynamically reloaded by ajax.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/