VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product creation => Topic started by: urzh12 on October 09, 2016, 17:25:43 PM

Title: Specific Input Fields Per Product
Post by: urzh12 on October 09, 2016, 17:25:43 PM
I have several products I'm selling. When a customer checks out, I want them to fill out custom fields that are different for each product. So, I'd like to create these fields per product on the checkout page. Once the customer has checked out, both vendor and customer are emailed an invoice with the custom field text that was filled out.

I'm familiar with the "custom shopper fields" but I don't know how to make them specific per product?

If this can't be done, what is a good recommendation as it seems this might be something someone wants to do often in VirtueMart?

VirtueMart 3.0.18
Joomla 3.6.2

Title: Re: Specific Input Fields Per Product
Post by: GJC Web Design on October 09, 2016, 18:45:12 PM
make the display of the cart shopper fields dependent on the product id being in the cart

the whole display is now a subtemplate so relatively easy to do
Title: Re: Specific Input Fields Per Product
Post by: Studio 42 on October 09, 2016, 18:48:00 PM
I don't think that currently you have a solution.
All customfields need to be set before adding it to cart so you can check the validity.
But why not adding this fields in the product ?
Another solution is to write a module that display product already in cart ? So your customers can add same product with other settings
Title: Re: Specific Input Fields Per Product
Post by: Jörgen on October 09, 2016, 19:52:39 PM
Hello

Why can´t You add this to the product as a custom field ?
What is the information You want to add and why does it have to be added at check out ?
Can this not be added already when putting the product into the cart ?

regards

Jörgen @ Kreativ Fotografi
Title: Re: Specific Input Fields Per Product
Post by: urzh12 on October 10, 2016, 21:15:24 PM
Jorgen - actually that IS what I'd like to do.

So I create a custom field and add it to the product. When someone goes to add the product to cart they will need to fill out the fields before checkout and I will see these fields on the invoice?
Title: Re: Specific Input Fields Per Product
Post by: PRO on October 10, 2016, 21:20:49 PM
text input plugin comes standard in vmart
Title: Re: Specific Input Fields Per Product
Post by: Studio 42 on October 10, 2016, 23:09:48 PM
So the question is: How to add text inputs to a product in the cart position.

YOu have a solution since 4 years now : The Text input plugin.
Add 1 new plugin declaration for each line in the custom fields so you can set your labels(and other settings)

Add all the text inputs declared in the order you need, on product edit and save it.

When your customers fill the text, all the information is displayed with the product, in the cart and in the order.
Title: Re: Specific Input Fields Per Product
Post by: Jörgen on October 11, 2016, 07:35:18 AM
Hello

Pro and Patrick sais how it should be done. Making the field mandatory needs some coding though, but the text input custom field is what You need.

regards

Jörgen @ Kreativ Fotografi

Title: Re: Specific Input Fields Per Product
Post by: Studio 42 on October 11, 2016, 10:49:08 AM
Hi Jorgen,
The "is mandatory" parameter is a prooblem since many year, i really find strange that noone in the VM team add this, because this can be added without backward compatibility problems.
Title: Re: Specific Input Fields Per Product
Post by: urzh12 on October 14, 2016, 16:24:06 PM
Thanks, this is getting me close after following this: https://dev.virtuemart.net/projects/virtuemart/wiki/Product_custom_fields_Plugin_Customer_Text_Input

How can I make it so the fields ONLY show up right before clicking checkout? I don't want the fields loading on the product page OR when they add the product to the cart.
Title: Re: Specific Input Fields Per Product
Post by: GJC Web Design on October 15, 2016, 15:10:56 PM
well then your back to shopper fields

if u actually explained what your trying to achieve you might receive some more useful advice
Title: Re: Specific Input Fields Per Product
Post by: urzh12 on October 15, 2016, 21:44:35 PM
Customer adds product to cart. Checks out. At the point of check out, they will need to fill in custom fields for the product and any other products they added. Complete checkout - vendor gets emailed invoice with the captured input of users. Whats not clear about what I'm asking in my post? Explain.
Title: Re: Specific Input Fields Per Product
Post by: GJC Web Design on October 15, 2016, 23:05:39 PM
why can't they add them at the product stage?  It is the obvious place to add product related info!
but as u wont tell us what this info that they must add is then who knows...
Title: Re: Specific Input Fields Per Product
Post by: PRO on October 16, 2016, 13:53:51 PM
what is the input for?

what data are you getting?
Title: Re: Specific Input Fields Per Product
Post by: urzh12 on October 16, 2016, 15:38:22 PM
I do not want any fields loading when just adding the product to cart....I guess if I can't achieve this then it will do.

I also have product listings by category published menu item - and i don't like the fields loading for all the products in this view. I would rather the customer click a product and then the fields loaded a suppose.
Title: Re: Specific Input Fields Per Product
Post by: GJC Web Design on October 16, 2016, 21:55:25 PM
QuoteI also have product listings by category published menu item - and i don't like the fields loading for all the products in this view. I would rather the customer click a product and then the fields loaded a suppose.

basic admin setting .. don't show custom fields on cat view
Title: Re: Specific Input Fields Per Product
Post by: urzh12 on October 16, 2016, 22:36:36 PM
Where is this setting? I can't find it. Look in published menu item and control panel. I was searching "Custom"
Title: Re: Specific Input Fields Per Product
Post by: jenkinhill on October 16, 2016, 23:20:14 PM
VM Configuration/Settings/Shopfront/Product Listing  - Show product customfields in browse views