VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: vigier on February 28, 2012, 22:55:40 PM

Title: Values from customer text inputs not saved to product attributes in order_items
Post by: vigier on February 28, 2012, 22:55:40 PM
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.
(http://s15.postimage.org/k6mkbb1yz/Losing_Dimensions.png)

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 (http://forum.virtuemart.net/index.php?topic=98714.0). Maybe we should close that topic.
Title: Re: Values from customer text inputs not saved to product attributes in order_items
Post by: vigier on February 28, 2012, 23:44:33 PM
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:
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...
Title: Re: Values from customer text inputs not saved to product attributes in order_items
Post by: vigier on February 29, 2012, 23:16:49 PM
Nobody any idea? Did anyone get this to work on his/her own site? Any help would be appreciated.

Kind regards,
Vigier
Title: Re: Values from customer text inputs not saved to product attributes in order_items
Post by: vigier on March 02, 2012, 00:28:47 AM
Does this mean that there's no one that uses custom_text_plugin for user input for the product?
Title: Re: Values from customer text inputs not saved to product attributes in order_items
Post by: Milbo on March 02, 2012, 13:25:43 PM
Thanks for your good report, I am on it.
Title: Re: Values from customer text inputs not saved to product attributes in order_items
Post by: osp on March 02, 2012, 14:08:39 PM
Hello vigier,

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

Ondra

[attachment cleanup by admin]
Title: Re: Values from customer text inputs not saved to product attributes in order_items
Post by: vigier on March 03, 2012, 22:30:36 PM
Hi,

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

Kind regards,
Vigier
Title: Re: Values from customer text inputs not saved to product attributes in order_items
Post by: osp on March 04, 2012, 09:10:11 AM
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?
Title: Re: Values from customer text inputs not saved to product attributes in order_items
Post by: vigier on March 04, 2012, 20:29:35 PM
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.
Title: Re: Values from customer text inputs not saved to product attributes in order_items
Post by: osp on March 04, 2012, 20:46:01 PM
Try next release 203b, I suppose will be released soon in the forum.
Milbo already incorporated this fix and some others...
Title: Re: Values from customer text inputs not saved to product attributes in order_items
Post by: vigier on March 04, 2012, 23:17:13 PM
I see the 2.0.3 already, just downloaded it... thnx
Title: Re: Values from customer text inputs not saved to product attributes in order_items
Post by: vigier on March 11, 2012, 18:36:20 PM
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...
Title: Re: Values from customer text inputs not saved to product attributes in order_items
Post by: Studio 42 on March 12, 2012, 12:04:24 PM
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.
Title: Re: Values from customer text inputs not saved to product attributes in order_items
Post by: zzsser on March 13, 2012, 13:55:11 PM
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.

Title: Re: Values from customer text inputs not saved to product attributes in order_items
Post by: osp on March 14, 2012, 23:10:24 PM
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...
Title: Re: Values from customer text inputs not saved to product attributes in order_items
Post by: Milbo on March 14, 2012, 23:28:03 PM
I was working on the same problem with someone but it was the plugin for digital goods. At the end it was a layout override of the cart.
Title: Re: Values from customer text inputs not saved to product attributes in order_items
Post by: zzsser on March 15, 2012, 12:12:38 PM
Thank you Ondrejspilka and Milbo.

See attached printscreen of a simple textinput field (there is only one textinput named "test").

As you can see on the image "textinput in product frontend website.jpg", there is a small problem of layout (the fieldname "test" is hidden, it's behind the field). But the biggest problem is that the text entered (for example "hello") is displayed in the cart until I checkout. This text is nowhere in the mails and in the order (backend).


[attachment cleanup by admin]
Title: Re: Values from customer text inputs not saved to product attributes in order_items
Post by: amytuggey on April 06, 2012, 18:23:40 PM
I am having the same problem.  I created 2 separate customer input fields to capture text for 2 lines of customization for a car decal.  The first line is displkyed in teh cart, the second is not, then neither are saved to the order.

Title: Re: Values from customer text inputs not saved to product attributes in order_items
Post by: giako on April 07, 2012, 11:31:24 AM
can I have this plugin?
I'm trying to develop the same, so I can help to fix and (IF YOU WANT) we can made this available to everyone.

Thankyou
Title: Re: Values from customer text inputs not saved to product attributes in order_items
Post by: giako on April 07, 2012, 14:08:25 PM
I tried to install VMart 2.0.3 last release and aoo in one extension but i get this error on the custome page when i add a custom field.
The same works on 2.0.2.

The error is present on fresh install of 2.0.3 and on upgrade from (working) 2.0.2 to 2.0.3.

Warning: include(C:\Program Files\EasyPHP-5.3.9\www\joomla\plugins\vmcustom\textinput\textinput\tmpl\default.php) [function.include]: failed to open stream: No such file or directory in C:\Program Files\EasyPHP-5.3.9\www\joomla\administrator\components\com_virtuemart\plugins\vmplugin.php on line 441

Warning: include() [function.include]: Failed opening 'C:\Program Files\EasyPHP-5.3.9\www\joomla\plugins\vmcustom\textinput\textinput\tmpl\default.php' for inclusion (include_path='.;C:\php\pear') in C:\Program Files\EasyPHP-5.3.9\www\joomla\administrator\components\com_virtuemart\plugins\vmplugin.php on line 441
Title: Re: Values from customer text inputs not saved to product attributes in order_items
Post by: Milbo on April 07, 2012, 22:02:43 PM
Please use this http://dev.virtuemart.net/attachments/download/411/com_virtuemart.2.0.4_extract_first_beta.zip