VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: cas on January 08, 2012, 10:21:49 AM

Title: Order Missing Custom Field
Post by: cas on January 08, 2012, 10:21:49 AM
When a customer places an order, the Custom Field option they select is not displaying in the order record in the admin.  I have no way to know what option (custom field) they selected.  FYI, I am using custom field of type image. 



[attachment cleanup by admin]
Title: Re: Order Missing Custom Field
Post by: cas on January 27, 2012, 21:59:17 PM
Is this fixed yet?  I am getting orders, but since the order does not display the Custom Field (color) they selected, I have no way to know what color they ordered.  This is a critical issue.   
Title: Re: Order Missing Custom Field
Post by: cas on February 04, 2012, 08:31:12 AM
Can I please get an update status on this issue? 
Title: Re: Order Missing Custom Field
Post by: sydneyartschool on February 04, 2012, 09:42:43 AM
I have same problem,

just posted it on ...

http://forum.virtuemart.net/index.php?topic=97495.0

Virtuemart 2.0.1.d
Joomla 2.5.1

Title: Re: Order Missing Custom Field
Post by: maxi1973 on February 04, 2012, 10:24:42 AM
I suppose neither in admin confirmation email custom fields are missing, may you check?
Title: Re: Order Missing Custom Field
Post by: Milbo on February 04, 2012, 11:10:44 AM
I am really wondering, this was fine working. Hmmm
Title: Re: Order Missing Custom Field
Post by: maxi1973 on February 04, 2012, 11:49:58 AM
No Max, i'm afraid but the problem still face, both in J 1.7.4 and J 2.5.1. with VM 2.0.1d and with files form SVN.
I will maka anothet test with a fresh new install of J2.5.1 and VM2.0.1.d and i will report images. bye
Title: Re: Order Missing Custom Field
Post by: Milbo on February 04, 2012, 13:20:30 PM
YEEEs
I found it! It was a very small typo. And I tried to find out the reason behind that and I found know a big source of trouble with svn. I am committing soon.
Title: Re: Order Missing Custom Field
Post by: sydneyartschool on February 04, 2012, 14:09:27 PM
Thanks Milbo,
does that mean fix will be in 2.0.1e?

@maxi1973
I am not getting neither admin confirmation emails nor customer confirmation emails - so can't tell you what is in these.

When I do status update to the order customer and admin gets the emails ok.  When you click the link to see order online the custom fields are not displaying.
Title: Re: Order Missing Custom Field
Post by: maxi1973 on February 04, 2012, 17:55:21 PM
I've tryed the svn release. It fixed the webpage order visualization but in the email (administrtion and client) custom field are still not shonw.
There is still the problem of the link of the product... for example if in the order there is an Hammer in HTML email it link is reported as
http://index.php ........   but it will be http://www.website.xxx/index,php .....  or not??
Title: Re: Order Missing Custom Field
Post by: Milbo on February 04, 2012, 18:11:36 PM
htm or raw email? Raw email is atm not supporting it. But html should
Title: Re: Order Missing Custom Field
Post by: maxi1973 on February 04, 2012, 18:46:52 PM
HTML , standard view in gmail webpage view, if you want you can access to my account to check personally
Title: Re: Order Missing Custom Field
Post by: cas on February 04, 2012, 20:31:23 PM
[quote author=
Quote from: sydneyartschool on February 04, 2012, 14:09:27 PM
@maxi1973
I am not getting neither admin confirmation emails nor customer confirmation emails - so can't tell you what is in these.

I'm still using VM2.0.0 in production and I also didn't get the admin confirmation email when an order occurred.   I had gotten this email before when I did a test, so not sure what happened.
Title: Re: Order Missing Custom Field
Post by: maxi1973 on February 07, 2012, 09:38:51 AM
Someone tryed if the problem was fixed? At my side is still present. Thanks
Title: Re: Order Missing Custom Field
Post by: sydneyartschool on February 07, 2012, 10:45:51 AM
2.0.1.e did not solve my problem either problem is now worse
a. Can't see any orders in order list view
b. Can't add items to cart
c.  User forced to log in at checkout ( no guest checkout)
Title: Re: Order Missing Custom Field
Post by: maxi1973 on February 07, 2012, 10:51:42 AM
I'm referring to customfields not sent in emails both to admin and customers... tryed both with svn and 2.0.1e version and it doesn't work. Any idea?
Title: Re: Order Missing Custom Field
Post by: sydneyartschool on February 07, 2012, 10:57:42 AM
I should point out it works ok on my prod which I think is 2.0.1.b as bug seems to appear when I use 2.0.1.c and later.. Extension the reports version as 2.0.0 though.
Title: Re: Order Missing Custom Field
Post by: cas on February 11, 2012, 08:18:59 AM
Upgraded to VM 2.0.1.F with Joomla 2.5.1, and now in the order display the line item is repeating 5 times.  Only one item was purchased.  See attachment.

[attachment cleanup by admin]
Title: Re: Order Missing Custom Field
Post by: maxi1973 on February 11, 2012, 13:25:43 PM
i've done as suggested by you in other post. i've installed 2.0.0 vesrion and it works fine with some hacks on J 1.7.x.
any other VM 2.0.1 version create me some other problems. from C to F versions have changed order management.
I don't know now why at your side one order is shown 5 times... it's really strange, is it possible the client sent order more then one time? just check time of the orders.
Title: Re: Order Missing Custom Field
Post by: cas on February 11, 2012, 20:01:19 PM
Hi maxi,

No, it's just one order and one line item in the order, but the order display has 5 duplicated line items for the same order.  The database is correct. It has only one attribute in the record for the order_items table, so the bug is in the order user interface display.   I have several orders and they all do the same thing.  Before VM2.0.1.f, it correctly displayed only one line item for the order, but that line item was not showing the custom field, so I did not know what color the customer selected, but now with VM2.0.1.f, it shows the custom field correctly, but it then duplicates the one line item 5 times. 
Title: Re: Order Missing Custom Field
Post by: design609 on February 13, 2012, 10:55:45 AM
J1.5.25 VM2.0.1F

No show of custom filed type image
http://forum.virtuemart.net/index.php?topic=97011.msg319874#msg319874
No show of custom filed type customer inputfield


In emails, so admin has to go to order list and manually inspect...
Please someone respond with at solution if they have one.

This IS essential to a shop that the customer can see what he have bought.
(even if this means broken image urls in the mail eg: http://forum.virtuemart.net/index.php?topic=97723.msg322059#msg322059 )

Title: Re: Order Missing Custom Field
Post by: maxi1973 on February 13, 2012, 11:10:25 AM
You're right. i also have problems with custom fields in email, notified in different posts.
Seem they are not correctly shown in all version after 2.0.0.
I'm now using VM 2.0.0 with administrator/components/com_virtuemart/models/costomfields.php and administrator/components/com_virtuemart/plugins/vmcustomplugin.php exctracted from 2.0.1f with a modification to make it works!

Any other version after 2.0.0 changed email layout, modifying the structure and also the visualization of customfields.
It's impossible for an admin to check any order to see if there are some particular customfields to satisfy client order, it MUST be checked immediately in the email, it's a basic rule!!!.
Waiting for developers considerations in matter.
Title: Re: Order Missing Custom Field
Post by: delroy on February 20, 2012, 11:37:57 AM
Have just installed VM201N and multiple orders on same product using different custom field, order both on email, frontend and backend shows correct $$$ amount but only displays first product. eg if you order xyz red and order xyz blue and xyz yellow, only the first one shows up but the correct $$$ value shows up for the order.  have to query sql to find what the order actually is. Note, this seemed to be working ok in 201a,b,c. fix urgently needed as neither the customer nor shop owner can see the product of their order after they checkout.
Title: Re: Order Missing Custom Field
Post by: bbw on March 16, 2012, 17:21:17 PM
I also am not seeing any custom fields coming thru in the confirmation emails...  Of course I need to know color etc the person wants....  How do we fix this?
Title: Re: Order Missing Custom Field
Post by: bob30 on March 29, 2012, 02:34:55 AM
Still having this problem, any idea when this might be fixed?
Title: Re: Order Missing Custom Field
Post by: kg on March 29, 2012, 16:17:11 PM
Having the same problem here with custom fields not showing in emails and order admin.

The only ones that shows up are custom fields of type "Cart Variant".
The other types do not show up.
We are using type "Plug-in" a lot and they do not show up in orders in backend admin, nor in emails to customers or to vendor.
Tested with a number of different types and only Cart Variant shows up.

Having them in the email will solve the issue for now, so if someone would just point me in the right direction (what file to change) I can give it a try.

// kg
Title: Re: Order Missing Custom Field
Post by: kg on March 29, 2012, 17:00:26 PM
I have now narrowed it down to the following:

When adding an order the data is added to database table virtuemart_order_items.

The column product_attributes in that table contains the custom fields.

Ex:
We have 2 Cart Variant attributes and 4 Plug-in attributes.

The data in product_attributes looks like this:

{"359":" <span>Text : <\/span>Gold","299":" <span>Qty : <\/span>25 pc","179":"179","149":"149","119":"119","389":"389"}

So the Cart Variants are there in plain text, but the other 4 custom fields (plug in) are there with the virtuemart_customfield_id from the table virtuemart_products_customfields

But it is only the id, and no data for this so the error has to be when adding the data to the database for the order.

OK, this is one step ahead. Anyone who can give me some hints to where to find the script where the order data for custom fields is added to the database?

// kg

Title: Re: Order Missing Custom Field
Post by: kg on March 29, 2012, 17:23:04 PM
OK, next step
I have now found where the data is added (or to be correct, where the data is not added)

It is in /administrator/components/com_virtuemart/models/orders.php line 760 - 860

Seems the error is after line 780, and it seems the VM-people already knows about this since almost all the coding is commented out for field_type == "E" so nothing is added (except for the ids)

Now I reached my limit for this today so if anyone else has a suggestion how to fix the code, I would appreciate it.

// kg
Title: Re: Order Missing Custom Field
Post by: kg on March 30, 2012, 11:44:04 AM
When checking the 2.0.3H I find that the commented lines are now back - with some minor changes.

Added the following lines to the file /administrator/components/com_virtuemart/models/orders.php line 800 solved the issue for now. The 2.0.3H version is still work in progress so I can't use that one yet because of other problems with that version:


if(!empty($_prod->param)){
foreach($_prod->param as $k => $plg){
if ($k == $variant){
$product_attribute[$selected] = $plg ;
}
}
}


Now I get the custom fields data in teh emails and also in admin orders (and the customer also sees them when checking his order)
The data is not formatted OK, but that is a minor problem.