send added to cart items'titles to My email using contact from

Highlighted
New Member
1 0 0

Hi
I want to add an option of sending contact info if the visitor is on cart and don't want to proceed to checkout , But i need to capture what items he added to cart so if he submits the contact form i receive his contact + the items he added to cart , so i added 5 hidden fields like the following
{% form 'contact' %}
..............
<input class='hide' type="text" id="ContactFormProduct" name="contact[Product-title1]" value="{{ product.title.first }}">
<input class='hide' type="text" id="ContactFormProduct" name="contact[Product-title2]" value="{{ product.title.second }}">
............
<button type="submit" class="btn" value="{{ 'contact.form.submit' | t }}" ">Send </button>
{% endform %}

But it doesnt work
i teste also

<input class='hide' type="text" id="ContactFormProduct" name="contact[Product-id]" value="{{ item.product.title.first }}">
i test many but non works

I know that {{ item.product.title}} contains the list of titles of the products in the cart but
my question is how to capture the text title of the first item added to cart and put in in contact form input 1
and then the second in input 2 and third fourth and fifth?

thankyou


0 Likes