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

John2400

  • Virtuemart - the Future is ever Changing
  • Global Moderator
  • Full Member
  • *
  • Posts: 1568
  • VirtueMart Version: Use VM3.6+
Hi every one,

Is this what you are talking about ?

In my cart variants for a simple product - when I change the variant and then add to cart as seen in my image - the variant is not added.

only the first variant is added to the cart .

* And if someone replies - could you be exact in what solution - I cannot use the SVN as I am not familiar with this.

Version 2.0.7 F

Changing these lines? in 2.0.7 F  back makes no difference: for me.
            //foreach($variantmods as $variant=>$selected){
            foreach($variantmods as $selected=>$variant){
            

[attachment cleanup by admin]

lipes

  • Full Member
  • ***
  • Posts: 720
did you download and change the file with the new file that milbo attached ?
for me it's working now :|
using Joomla 2.5.5 and the last "test version" VM2
VM V. online: J2.5.14 | VM 2.0.20a | SQL 5.1.70 | PHP 5.3.25

John2400

  • Virtuemart - the Future is ever Changing
  • Global Moderator
  • Full Member
  • *
  • Posts: 1568
  • VirtueMart Version: Use VM3.6+
I see the txt file but what exactly do I do with it.

* could you write exactly what you did - over write the file ( what file)? exactly where.

Milbo

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

John2400

  • Virtuemart - the Future is ever Changing
  • Global Moderator
  • Full Member
  • *
  • Posts: 1568
  • VirtueMart Version: Use VM3.6+
mmm,

updated version g image attached
I think it explains itself - The variant is not adding to the cart.

I have no hacks in my codes - straight upload and test.

[attachment cleanup by admin]

Zer0g

  • Beginner
  • *
  • Posts: 32
Hi,

i've got the same problem like John2400

Joomla 2.5.6 Virtuemart 2.0.7G on php 5.2.17

EDIT: I've updated my customfields.php with Milbos version posted early in this thread and now everything seems to be working correctly

John2400

  • Virtuemart - the Future is ever Changing
  • Global Moderator
  • Full Member
  • *
  • Posts: 1568
  • VirtueMart Version: Use VM3.6+
Thanks ,

I have updated with the text - custom field and it works.

lipes

  • Full Member
  • ***
  • Posts: 720
yep.. like i said the CF is 100% full working in 2.0.7.f with the Milbo customfield.txt (php)

i havent updated yet to point G version because i am searching also for a solution to display "children category" .. isnt working in all my instalations when anyone add products...

I was thinking that .G version was done about CF.... and we dont need to add/update the .txt file again..
But please anyone tell Milbo that is working with the file!
He's getting "Crazy" :P   PS: But i am much more crazy... @ many time ago.. with the children category.. ::) 
https://github.com/VirtueMart/virtuemart/commit/66b1ec30d7021506e2437942f76c62aa100d059f
...
it's working 100%
let's move on :)
VM V. online: J2.5.14 | VM 2.0.20a | SQL 5.1.70 | PHP 5.3.25

John2400

  • Virtuemart - the Future is ever Changing
  • Global Moderator
  • Full Member
  • *
  • Posts: 1568
  • VirtueMart Version: Use VM3.6+
lipes,

Hi I updated to G and it was not fixed for me in that version.

then I copied the text file provided in this post and replaced all the files in G custom field with it and then it worked.

* so for me "G" on it's own did not fix it.

lipes

  • Full Member
  • ***
  • Posts: 720
VM V. online: J2.5.14 | VM 2.0.20a | SQL 5.1.70 | PHP 5.3.25

John2400

  • Virtuemart - the Future is ever Changing
  • Global Moderator
  • Full Member
  • *
  • Posts: 1568
  • VirtueMart Version: Use VM3.6+
No sorry I have a problem,  version H

Yes the variant is now in the cart:

* the Variant does not go to the email of  the seller or buyer -

* and I need this confirmed But the emails to the buyer and seller are exactly the same? two emails but with two different email addresses. The one that is missing is the vendors (it is an exact copy of the buyers)
* I'm sure the vendors email said something like - dear (my website ) you have an order etc . - I've checked them twice and the  Hello ( someone is exactly the same name to the seller and vendor) -please some one check that for me .

* extra -  now the problem with the emails is that the software is sending the email to the vendors -email and thinks he is a buyer -  thus now not only do I get two emails but I also get an order in the 'order form' BE that I cannot delete- the orders do not contain a name of a buyer or his details and get stuck in the data Base.

* Now if I get - into my MYSQL -  I have orders in there that I cannot delete ( from with in VM2 orders) -as they are not connected to any buyer.    I will need a little help in making sure that I do not delete the wrong thing in the data base.

I have a site that has 2.0.6 and the email are completely different - (I know there has been a small change) in headers etc but..  I updated my 2.0.6 - to 2.0.7 h and the issue or no variants and the , emails being the same are there. ( this site has the original products and settings of VM productions site)


The Cart
 I think it hangs because it is looking for the variant and the email configuration.   

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
When I get to the cart : and confirm the order - If and only if it has a variant in the order.
Then the  page freezes and does not redirect to confirm the order goes through It says :
 http://mywebsite.com.au/index.php/cart/confirm
   

It does not show the image below if there is a variant in the product /attached ( if it is a product with no variants it does show it)

[attachment cleanup by admin]

Zer0g

  • Beginner
  • *
  • Posts: 32
Hmm, your post made me think about this one more time... I never completed an order with attributes.

So i've tried it. And there it is... just after hitting the confirm order button:
white page with an error: Fatal error: Call to undefined method VirtueMartModelCustomfields::getProductCustomField() in /administrator/components/com_virtuemart/models/orders.php on line 805

btw: i am still on 2.0.7G

EDIT: Just upgraded to 2.0.7 H
I can confirm the problem with custom fields of John2400 - no notification in the email, just "Couldnt find customfield" is displayed


Zer0g

  • Beginner
  • *
  • Posts: 32
Any news on this issue? I need to know...
Otherwise i have to downgrade to 2.0.6a

Maybe this helps... Debug messages from cart, order confirmed:

vmdebug vmTime: loadConfig db no: 0.0087659358978271
vmdebug Start used Ram 6M
vmdebug $_prod,$productCustom
vmdebug CustomsFieldOrderDisplay, $item->productCustom empty? 18
vmdebug customFieldDisplay, $productCustom is EMPTY
vmdebug CustomsFieldOrderDisplay, $item->productCustom empty? 18
vmdebug customFieldDisplay, $productCustom is EMPTY
vmdebug vmTime: VirtuemartControllerCart Finished task confirm: 1.2433528900146
vmdebug End used Ram 22.5M
vmdebug Peak memory peak 22.5M

John2400

  • Virtuemart - the Future is ever Changing
  • Global Moderator
  • Full Member
  • *
  • Posts: 1568
  • VirtueMart Version: Use VM3.6+
As you can see,

For me the issue got bigger as one issue affects another-

* I presume the team really want to put out a good clean update that fixes quite a few issues - and then. Then again one small fix might solve quite a few issues.

* I do wonder that at the same time Joomla updated twice and that could cause a few problems.  I other places in the world it is only just Monday morning so we will wait. For me it is Monday Night. late.

just wait - If the issue of variants is solved then - I think my own site could run and survive - the Invoices would be Ok, and the rest I could do in the background of the site.

srseale

  • Beginner
  • *
  • Posts: 47
First time posting to the Forum.

Joomla 2.5.6
VM 2.0.7g
PHP 5.3.14

I have been following this thread very closely as it has a direct impact on my site.  I will only have a couple of products but there are many variations possible with them (23 custom fields and counting).  I think I have developed a reasonable understanding of Custom Fields and how they are to be used.  I've had them working and doing as predicted but have hit all of the same snags that have been reported in this thread.  John2400 has identified some problems and there appear to be others as well.  This reply is simply to add more detail.  I hope it proves useful...

After upgrading to 2.0.7g and applying Milo's new customfields.php file, all appeared to be working (btw, that file lays out the custom fields very nicely, much better than they were before; thank you Milo).  Now, however, there are more problems with Customfields.  I can't add any new customfields to a product.  I can't edit any existing customfields in a product.  I can create custom fields and change them but I can't use them.  The "Couldn't find customfield" error occurs in both the e-mail and the Order.

I am developing a better understanding of VM but I am still a Beginner.  I await further developments (which I am certain are underway).  No reply necessary.  I am just trying to add clarity to the breadth of the problem.

Thank you and keep up the excellent work.