VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product creation => Topic started by: Adwans on November 02, 2016, 22:38:07 PM

Title: recalculated (XHR/Json) Post Data - needed.
Post by: Adwans on November 02, 2016, 22:38:07 PM
Hello,
I have a problem, 
Need this what is sent by "recalculate" function  during Price update via XHR.
CustomProductData[199][24]:"227"
In JS/Jquery not a problem. But
I need it in PHP - in custom plugin to modify $modificatorSum with another Customfield's data (from select).
OR:
Last post data sent to server via json/xhr.

Simply: I must have selected option value (from product page) transmitted to plugin in order to correct $modificatorSum.
WHY?: My plugin add some "%" but i have a customfield (select) with product dimensions ("100 x 100 +20USD" for example) and don't want to modify only "product-price" but whole price with this "100 x 100 +20USD". ( price + dimensions_that_added_some_value ) * Some_feature_in_%
Any suggestion will be great.
Is this somewhere in table, object? joomla post data?

Title: Re: recalculated (XHR/Json) Post Data - needed.
Post by: Milbo on November 07, 2016, 11:49:50 AM
Beware that you must have a filter method in the trigger, which adds the product for the cart. Because form values must be validated, else they removed (whitelisted). I did want to you want already with our customsize plugin http://extensions.virtuemart.net/products/custom-size-detail
Title: Re: recalculated (XHR/Json) Post Data - needed.
Post by: Adwans on March 06, 2017, 11:36:59 AM
Sorry not responding,
Hello Milbo, Thank You.
Solution  was to write a Custom plugin for window dimensions which is now carefully being tested :).  Far less difficult than my initial idea.
Best Regards, Z
Title: Re: recalculated (XHR/Json) Post Data - needed.
Post by: Milbo on March 06, 2017, 18:49:56 PM
Did you take a look on our customsize plugin?