Author Topic: (Solved) Custom Fields (Cart Variant) checkout, Incorrect Custom Value in Order  (Read 42286 times)

lipes

  • Full Member
  • ***
  • Posts: 720
 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

  • Jr. Member
  • **
  • Posts: 108
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.

Chris D

  • Beginner
  • *
  • Posts: 3
Updated to 2.0.7e and same result.

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10094
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
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
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

gkolomvos

  • Beginner
  • *
  • Posts: 45
Ended up finding the fault on line 802 in administrator/components/com_virtuemart/models/orders.php, changed this
Code: [Select]
foreach($variantmods as $variant=>$selected){to
Code: [Select]
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

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10094
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
gkolomvos, this is not all, pleasee check the svn and search for TODO productCartId. Version F is coming soon. :-)
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

gkolomvos

  • Beginner
  • *
  • Posts: 45
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

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10094
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
That is exactly what I would like to have tested before.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

lipes

  • Full Member
  • ***
  • Posts: 720
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

  • Guest
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

  • Full Member
  • ***
  • Posts: 720
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

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10094
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
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]
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

lipes

  • Full Member
  • ***
  • Posts: 720
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

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10094
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
I think that was too early
Please try the svn, I did some changes again,  and I am not sure about it,...
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

lipes

  • Full Member
  • ***
  • Posts: 720
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