Add to Cart links with options and custom fields

  • Posts: 1
  • Thank you received: 0
1 year 7 months ago #350559

For a shop that produces products on behalf of the customer, I am creating a page that displays the entered name in a preview and calculates sizes in PHP (as an overview for 20 or more produkts). For this page, I need an Add to Cart button that passes the entered name (Custom Text Field), the selected color (Custom Drop Down Field), and the selected height (an option in a dropdown) to the shopping cart.

All attempts to accomplish this via a link have failed thus far. This link adds the item to the shopping cart twice:
http://168.0.101:8060/index.php/index.php?option=com_hikashop&ctrl=product&task=updatecart&product_id=1&quantity=1&Itemid=153&hikashop_return_url=http://192.168.0.101:8060/index.php/&hikashop_product_option[4]=68

Once for the base item and once for the selected option. I am unable to get the custom fields into the shopping cart.

How should the link be structured?
Alternatively, a JavaScript Add to Cart would also work, but I am missing the parameters and my programming skills are reduced to vb.net

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
1 year 7 months ago #350561

Hi,

You need to add an extra parameter to the URL for each custom item field:
www.hikashop.com/forum/2-general-talk-ab...ct-fields.html#16220

Please Log in or Create an account to join the conversation.

Time to create page: 0.056 seconds
Powered by Kunena Forum