VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: sandomatyas on January 31, 2017, 16:04:35 PM

Title: Adding new product with multiple price
Post by: sandomatyas on January 31, 2017, 16:04:35 PM
I have a bit problem with adding new product with multiple prices.
I created a screencast video to show you but the problem is that I add a new product and everything is okay until I try to add new price. VM displays the new price block but I can't open the shopper group or any other dropdowns. Calculator fields are fine.
https://www.screencast.com/t/mOjaN2PI1Yk
It's the very latest 3.0.19.3 version but it was in 3.0.16 and 3.0.18 too.
There aren't any javascript errors on the console.
Title: Re: Adding new product with multiple price
Post by: Milbo on January 31, 2017, 16:16:56 PM
That is "normal", the js is not bound to the new appeared doms. Similar to the payment/shipment plugins when it says "store first".

No problem to change that, but costs time=money. When you handle a lot products with multiple prices you may say "Storing after any price takes too much time, costs me too much money", then you may consider to buy a membership and we do our best https://extensions.virtuemart.net/support/virtuemart-supporter-membership-silver-detail
Title: Re: Adding new product with multiple price
Post by: sandomatyas on January 31, 2017, 16:50:23 PM
I think this is the right time to spend some money for a good investment :)
I purchased a membership and opened a ticket
Title: Re: Adding new product with multiple price
Post by: Studio 42 on January 31, 2017, 23:51:47 PM
Max, simply bind the javascript in the main product form and javascript events are dynamic added to each price And perhaps remove the select choosen script, it's not very usefull for price tax and shoppergroups
Title: Re: Adding new product with multiple price
Post by: Milbo on February 01, 2017, 10:41:00 AM
The js is bind always and the problem is only chosen. There is no js in teh product_edit_price.php. The normal way seems to be to destroy chosen and to reinitialise it. At the moment it is half bounded. The changed css and all that is there, but the dropdowns do not open. We use a chosen version before the version 1.0.0. The reason is that they changed the classes and so we did not update it to prevent BC problems. So I assuem the fix is to update chosen. I played a bit with this

onRowAdd:function () {
                $('select').chosen('destroy');
                //Virtuemart.updateChosenDropdownLayout($);
                //$(".chzn-single").chosen();
               // $('select').trigger('chosen:updated');
            },

in product_edit_information.php