[Skip to main content](#vessel-content)

#   "Customise" product in checkout process....

##

- **[TheEdge](/forum/user/1997-theedge "View TheEdge's Profile")**
- [![TheEdge's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar1997.gif)](/forum/user/1997-theedge "View TheEdge's Profile") Topic Author
- [ Offline](/forum/user/1997-theedge)

Less More

- Posts: 62
- Thank you received: 0
-
-

15 years 5 months ago [\#16605](#16605) by [TheEdge](/forum/user/1997-theedge "View TheEdge's Profile")  *["Customise" product in checkout process....](/forum/4-how-to/16605-customise-product-in-checkout-process#16605 "G'Day,  I am selling gift vouchers. If a user selects 2 gift vouchers I want to be able to capture some information for &#42;each&#42; voucher eg. Email Address, Name. So for example:  Voucher 1  - - John Smith  Voucher 2  - - Bob Brown  Can you please get me started on how I go about implementing this?")* was created by *[TheEdge](/forum/user/1997-theedge "View TheEdge's Profile")*

G'Day,

I am selling gift vouchers. If a user selects 2 gift vouchers I want to be able to capture some information for *each* voucher eg. Email Address, Name. So for example:

Voucher 1

- john@there.com
- John Smith

Voucher 2

- bob@there.com
- Bob Brown

Can you please get me started on how I go about implementing this?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzE2NjA1LWN1c3RvbWlzZS1wcm9kdWN0LWluLWNoZWNrb3V0LXByb2Nlc3M/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86561
- Thank you received: 14307
-
-

15 years 5 months ago [\#16607](#16607) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: "Customise" product in checkout process....](/forum/4-how-to/16605-customise-product-in-checkout-process#16607 "G'Day,  I am selling gift vouchers. If a user selects 2 gift vouchers I want to be able to capture some information for &#42;each&#42; voucher eg. Email Address, Name. So for example:  Voucher 1  - - John Smith  Voucher 2  - - Bob Brown  Can you please get me started on how I go about implementing this?")*

In the Business edition, you can go in the menu Display-&gt;Custom fields and create custom fields of the table "item" of the type text.
They will appear on the product page so that the user can enter the information before adding the product to the cart.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzE2NjA1LWN1c3RvbWlzZS1wcm9kdWN0LWluLWNoZWNrb3V0LXByb2Nlc3M/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[TheEdge](/forum/user/1997-theedge "View TheEdge's Profile")**
- [![TheEdge's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar1997.gif)](/forum/user/1997-theedge "View TheEdge's Profile") Topic Author
- [ Offline](/forum/user/1997-theedge)

Less More

- Posts: 62
- Thank you received: 0
-
-

15 years 5 months ago [\#16611](#16611) by [TheEdge](/forum/user/1997-theedge "View TheEdge's Profile")  Replied by *[TheEdge](/forum/user/1997-theedge "View TheEdge's Profile")* on topic *[Re: "Customise" product in checkout process....](/forum/4-how-to/16605-customise-product-in-checkout-process#16611 "G'Day,  I am selling gift vouchers. If a user selects 2 gift vouchers I want to be able to capture some information for &#42;each&#42; voucher eg. Email Address, Name. So for example:  Voucher 1  - - John Smith  Voucher 2  - - Bob Brown  Can you please get me started on how I go about implementing this?")*

Hi Nicolas,

I have upgraded to Business edition and it does as you describe. However I have a couple of additional requirements:

1) I only want the newly added item to appear on selected products instead of all of them. How do I achieve that?
2) How do I add validation to the data input. In my case I am requesting an email address. I need to make sure it is a valid email address and ultimately does not exist within the Joomla! user list.
3) I want to enter the email address for each product so if someone orders 6 of the product I want them to enter 6 email addresses. (In preference I don't want to have the user need to add 6 instances of the product)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzE2NjA1LWN1c3RvbWlzZS1wcm9kdWN0LWluLWNoZWNrb3V0LXByb2Nlc3M/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86561
- Thank you received: 14307
-
-

15 years 5 months ago [\#16625](#16625) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: "Customise" product in checkout process....](/forum/4-how-to/16605-customise-product-in-checkout-process#16625 "G'Day,  I am selling gift vouchers. If a user selects 2 gift vouchers I want to be able to capture some information for &#42;each&#42; voucher eg. Email Address, Name. So for example:  Voucher 1  - - John Smith  Voucher 2  - - Bob Brown  Can you please get me started on how I go about implementing this?")*

1. There is no option for that, however, you can modify the file "show" of the view "product" to hide the item lines you don't need on some products. Here is a thread which talks about that: [ www.hikashop.com/en/support/forum/4-how-...uct-in-checkout.html](http://www.hikashop.com/en/support/forum/4-how-to/14363-custom-fields-by-product-in-checkout.html)
2. If you need javascript validation, what you can do is override the hikashopCheckChangeForm javascript function located in media/com_hikashop/js/hikashop.js in a js file of your template loaded AFTER that file and change the regex in it so that it checks for the format. If you need also to check for the fact that the user exists, you will have to do an AJAX request in that function to a new controller's task you would create which would check the email in the jos_users table.
3. I would indeed have proposed to remove the quantity box via the corresponding option of the configuration and only allow the user to add them one by one. But then, if you want to do all that, I would suggest an alternative:
Instead of creating custom item fields, you could create custom order fields. These are displayed during the checkout. Then, you could edit the file "fields" of the view "checkout" where you could add some code to only display as much fields as products in the cart. You could then do the check of the email in that view file more easily (or another one of the checkout, it depends how you setup your checkout workflow option of the configuration) than with the other solution.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzE2NjA1LWN1c3RvbWlzZS1wcm9kdWN0LWluLWNoZWNrb3V0LXByb2Nlc3M/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[TheEdge](/forum/user/1997-theedge "View TheEdge's Profile")**
- [![TheEdge's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar1997.gif)](/forum/user/1997-theedge "View TheEdge's Profile") Topic Author
- [ Offline](/forum/user/1997-theedge)

Less More

- Posts: 62
- Thank you received: 0
-
-

15 years 5 months ago [\#16677](#16677) by [TheEdge](/forum/user/1997-theedge "View TheEdge's Profile")  Replied by *[TheEdge](/forum/user/1997-theedge "View TheEdge's Profile")* on topic *[Re: "Customise" product in checkout process....](/forum/4-how-to/16605-customise-product-in-checkout-process#16677 "G'Day,  I am selling gift vouchers. If a user selects 2 gift vouchers I want to be able to capture some information for &#42;each&#42; voucher eg. Email Address, Name. So for example:  Voucher 1  - - John Smith  Voucher 2  - - Bob Brown  Can you please get me started on how I go about implementing this?")*

Hi Nicolas,

I prefer your solution #3. I have added the field into the "order" view and can see how that will work. Will read the API to see how I display the correct number of that field. However as that is a single field in the database are you proposing that I encode the data in the field based on the quantity of the prodduct? So if I have a quantity of 3 I would have to do something like first@there.com.au;second@there.com.au;third@there.com.au as this is a single record for the order?

The second thing I cannot find is how to "remove the quantity box via the corresponding option of the configuration". I am assuming this is in the System &gt; Configuration? If so I don't want to turn off quantities for all products. Only for this one.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzE2NjA1LWN1c3RvbWlzZS1wcm9kdWN0LWluLWNoZWNrb3V0LXByb2Nlc3M/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86561
- Thank you received: 14307
-
-

15 years 5 months ago [\#16679](#16679) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: "Customise" product in checkout process....](/forum/4-how-to/16605-customise-product-in-checkout-process#16679 "G'Day,  I am selling gift vouchers. If a user selects 2 gift vouchers I want to be able to capture some information for &#42;each&#42; voucher eg. Email Address, Name. So for example:  Voucher 1  - - John Smith  Voucher 2  - - Bob Brown  Can you please get me started on how I go about implementing this?")*

1. That could be a possibility indeed. You could also have 20 fields created and just display as much fields as you need based on the quantity ordered...

2. It's indeed in the configuration, under the tab display with the option called "Display the quantity field on the product page". However, that has an effect on all the products. An alternative to that option would then be to edit the file "show" of the view "product" via the menu Display-&gt;Views and change that option on the fly for the product where you don't want to show it:

if($this-&gt;element-&gt;product_code=="my_product"){
$this-&gt;params-&gt;set('show_quantity_field', 2);
}

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzE2NjA1LWN1c3RvbWlzZS1wcm9kdWN0LWluLWNoZWNrb3V0LXByb2Nlc3M/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.061 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
