News:

Looking for documentation? Take a look on our wiki

Main Menu

Order Missing Custom Field

Started by cas, January 08, 2012, 10:21:49 AM

Previous topic - Next topic

maxi1973

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?

sydneyartschool

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.

cas

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]

maxi1973

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.

cas

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. 

design609

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 )


maxi1973

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.

delroy

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.

bbw

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?

bob30

Still having this problem, any idea when this might be fixed?

kg

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

kg

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


kg

#27
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

kg

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.