(Solved) Custom Fields (Cart Variant) checkout, Incorrect Custom Value in Order

Started by lipes, May 25, 2012, 14:46:16 PM

Previous topic - Next topic

lipes

 o_O  But i always install the AIO file..
it's the 2nd needed file in the instalation like the instructions tell :-|
you could confirm in the website that it's instaled  :-/

VM V. online: J2.5.14 | VM 2.0.20a | SQL 5.1.70 | PHP 5.3.25

uschmi

Not working for me too! Tested with all versions of 2.0.7a-e...
Double checked, that AIO is correctly installed, but it doesn´t work.
It works fine with 2.0.6.


Milbo

Thank you.

There is also another error, which has the same root. There are several places in the code, which must work the same direction and it seems there was a mix before. The orders store selectedCustomfield:value, the plugins stored selectedCustomfield:selectedCustomfield,  from my point it would be logical to have custom:selectedCustomfield:value. But I didnt write that part. Anyway we must atm use what is there. For the version 2.2 we may redesign this part of the core. We use now everywhere selectedCustomfield:value or for plugins selectedCustomfield:custom. Should be backward compatible, but better for writing new plugins.

When you wanna help me in this area further, I added tags to the code "TODO productCartId" for easier finding the different places and understanding of the complex. Maybe I missed another occurence in the code, which is important. thanks for your help

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

Georgios Kolomvos

Quote from: Chris D on June 11, 2012, 09:30:39 AM
Ended up finding the fault on line 802 in administrator/components/com_virtuemart/models/orders.php, changed this
foreach($variantmods as $variant=>$selected){
to
foreach($variantmods as $selected=>$variant){

Your correction worked fine for me (VM 2.0.7.e).
Thank you very much.
Georgios Kolomvos
Patras, Greece

Milbo

gkolomvos, this is not all, pleasee check the svn and search for TODO productCartId. Version F is coming soon. :-)
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Georgios Kolomvos

Quote from: Milbo on June 13, 2012, 16:16:54 PM
gkolomvos, this is not all, pleasee check the svn and search for TODO productCartId. Version F is coming soon. :-)
Milbo thank you for your suggestion,
I see from the SVN that you have added the //TODO productCartId code at
administrator/components/com_virtuemart/helpers/calculationh.php (line 1311)
administrator/components/com_virtuemart/models/orders.php (line 818)
components/com_virtuemart/helpers/cart.php (line 418)

Our VM2 site is still in development and since it looks like there is no problem with the current version and configuration, i will just wait for version 2.0.7.f
Georgios Kolomvos
Patras, Greece

Milbo

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

lipes

Solved: custom fields are working Good in 2.0.7 F :)
approved!

with no price and with price.. when add to the cart as well and in the checkout cart area!
100% working fine.

Admin / Moderator: could remove the solved topics.
VM V. online: J2.5.14 | VM 2.0.20a | SQL 5.1.70 | PHP 5.3.25

patrik60

No, it's not really solved. Price is now ok. But there are now problems with the names of the custom fields: e.g.

red, no additional amount
yellow, +10 €

When choosing yellow, red will be put in the cart with the additional amount of 10 €

lipes

patbe absolute correct! you're right i didnt check with names value only the with +/- price values.

it's not done yet. But before 2.0.7 E the text value was working and the price wasnt.. lol :)
VM V. online: J2.5.14 | VM 2.0.20a | SQL 5.1.70 | PHP 5.3.25

Milbo

Please try the attached model

or use the latest svn, should work now, question is, if it still works with the orders.


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

lipes

Yep Milbo. It's solved!
I've download and instaled the file right now in ' \administrator\components\com_virtuemart\models' folder
and it's working 100%
VM V. online: J2.5.14 | VM 2.0.20a | SQL 5.1.70 | PHP 5.3.25

Milbo

I think that was too early
Please try the svn, I did some changes again,  and I am not sure about it,...
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

lipes

i dont know how to work with the svn ( https://dev.virtuemart.net/svn/virtuemart/trunk/virtuemart/ )
we can download the files directly from the browser window ?! or we need to use the tools like SmartSVN or TortoiseSVN ?!

this rules: http://virtuemart.net/documentation/Developer_Manual/SVN_Access.html  are valid for VM 2 ?
VM V. online: J2.5.14 | VM 2.0.20a | SQL 5.1.70 | PHP 5.3.25