News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Values from customer text inputs not saved to product attributes in order_items

Started by vigier, February 28, 2012, 22:55:40 PM

Previous topic - Next topic

vigier

Hi,

I got the first part of the customer text input working. A customer can input the width and the height of the article and select some other options.
If you look at the shopping cart, it shows the values, but without the title of the field and the values aren't separated by a space of something else. That's the first problem. All the other selections (from dropdowns) do show up as they should. When the customer places the order and I look at the order, the values from the input boxes are gone. The aren't in the description anymore. That's the second problem.

I attached an image with screencaptures of the process.


I looked in the virtuemart_order_items table and the value from product_attributes of the item shown in the picture above was:
"{""29"":""29"",""28"":""28"",""19"":"" <span>Raamsluiting : <\/span>Handgreep"",""21"":"" <span>Raamuitzetter : <\/span>Geen"",""24"":"" <span>Uitzetterpen : <\/span>Geen"",""26"":"" <span>Oplegslot : <\/span>Geen""}"

As you can see in the first part (around the red text "Selecting") of the above picture, the options from the dropdownboxes haven been saved correctly (only Raamsluiting has an other selection than "Geen", that's correct), but the values from Breedte and Hoogte haven't been saved. The weird thing is that they do show up in the shopping cart before checking out. After checking out, they are gone.
I hope you can fix this! Where this means: adding the fieldtitle to the description and the values of the customer_text_inputs to the product_attributes...

Kind regards,
Vigier

P.S. This is a better and more complete description of topic http://forum.virtuemart.net/index.php?topic=98714.0. Maybe we should close that topic.

vigier

In the meantime I found out something else. This is another product with 2 customer_text_inputs and one dropdown box. This generates the following product_attribute in the database:
{"15":"15","14":"14","16":" <span>Profielkeuze : <\/span>Enkel glas (38x67mm)"}

If I add another customer_text_input to my product, after the dropdown box, a saved product_attribute looks like this:
{"15":"15","14":"14","16":" <span>Profielkeuze : <\/span>Enkel glas (38x67mm)","47":"47"}

It looks to me that the product_attribute consists of pairs of options. Field 16 contains the value of dropdownbox Profielkeuze. I checked it when I looked at a product that uses more dropdownboxes.
For the customer_text_inputs, it writes the field_id (or somehting) and instead of the user value after the colon, it writes the field_id again.
So if I can find the script that creates the product_attribute, I can do two things:

  • Check if it "asks" the user input from the submitted form info
  • Check if the writing procedure writes the field id or the requested user input
So who knows where I can find that procedure/script? Or is this something I should leave to the VirtueMart programmers?
Edit: I've looked at the plugin-code and I think I better leave this to the programmers...

vigier

Nobody any idea? Did anyone get this to work on his/her own site? Any help would be appreciated.

Kind regards,
Vigier

vigier

Does this mean that there's no one that uses custom_text_plugin for user input for the product?

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/

osp

Hello vigier,

try the patch attached...should work after apply...

Ondra

[attachment cleanup by admin]

vigier

Hi,

@Milbo: good to know! Thnx :)
@ondrejspilka: thnx, this is getting better, but not perfect. What happens with your patch:

  • General: the fieldname is still not shown in the minicart&cart&order&order administration.
  • If the product only has this inputbox and no other options, it shows the text of the input field on all necessary places, even the confirmation mail.
    The product_attribute from the database: {"2063":{"textinput":{"comment":"123456789"}}}
  • If the product also has other options, for example some dropdowns, the old problem is still there, no idea why!
    Some examples of product_attributes that don't show up well in the orderadministration, cart or anywhere else:
    {"15":{"textinput":{"comment":"4444"}},"14":{"textinput":{"comment":"5555"}},"17":" <span>Profielkeuze : <\/span>Dubbel glas (54x67mm)"}
    {"29":{"textinput":{"comment":"123"}},"28":{"textinput":{"comment":"456"}},"19":" <span>Raamsluiting : <\/span>Handgreep","22":" <span>Raamuitzetter : <\/span>Vaste standen","25":" <span>Uitzetterpen : <\/span>Twee uitzetterpennen","27":" <span>Oplegslot...
  • General: the good part is that in all the versions I tried, it writes the types value to the database!

Kind regards,
Vigier

osp

Well good to know is all values are stored in database, it was the intent of the fix..

Combo customfields and their  names are shown  correctly for me.
Are you talking about default lists or your own plugin?

vigier

These are standard comboboxes, Cart variant if I name them correctly. Those are shown as they should. The custom_text_input works as well, as long as I don't combine them with the comboboxes. Then only the selection of the combobox are shown, the content of the custom_text_input is not shown on the order.

osp

Try next release 203b, I suppose will be released soon in the forum.
Milbo already incorporated this fix and some others...

vigier


vigier

Hi,

with 2.0.3b I still have my problem. The values are written to the database:
{"15":{"textinput":{"comment":"1234"}},"14":{"textinput":{"comment":"4567"}},"17":" <span>Profielkeuze : <\/span>Dubbel glas (54x67mm)"}

But still as a comment and it's not visible if I show my orders, so there's still some work to be done I guess...

Studio 42

Hi vigier,
I tested the text Input and have display in card and order.

Have you update the allinone, because plugin file are in all in one.

zzsser

Hi, I have exactly the same problem with textinput plugin. The text is displayed in cart until the confirmation. But in order (in the confirmation mail and in the backend), the input text has disappeared.

Installation of com_virtuemart.2.0.3.b_extract_first.zip doesn't resolve this problem. I use J 1.7.


osp

Please send us printscreens of BackEnd customfield list and Customfields page from product detail.

The only invalid configuration we resolved is when one textinput customfield is used in product twice.
Eg you define customfield Dimension of type textinput and then you add two "Dimension" customfield values to product.

This scenario will not work by design, separate customfields must be used / instead of dimension eg Width and Height...