SimpleCartJS – How to get all items in cart and send via Contact form 7?

I am trying to integrate SimpleCartJS with WordPress to make a list of the posts that the user likes and send it via email through “contact form 7”. The post are correctly added and empty, remove, increment and decrement works fine. I dont need to checkout to PayPal, google, etc. I need to send these records through a variable or something similar by email with Contact Form 7…

Simplecart can sent the information by POST or GET method (in this case) and the URL is similar to this:

URL

http://example.com/checkout/url?currency=USD&shipping=0&tax=0&taxRate=0&itemCount=3&item_name_1=NAMEPOST1&item_quantity_1=1&item_price_1=5&item_options_1=&item_name_2=NAMEPOST2&item_quantity_2=1&item_price_2=5&item_options_2=&item_name_3=NAMEPOST3&item_quantity_3=1&item_price_3=5&item_options_3=&return=success.html&cancel_return=cancel.html&cartid=12321321

I understand that with “Contact Form 7 – Dynamic Text Extension” you can send variables to the form, but if add 40 post it would be impossible, Simplecart creates a auto increment variable for each chosen post (see url):
Example

VARIABLE

item_name_1=
item_name_2=
item_name_3=
item_name_4=
etc

I need to get all the titles of posts and send via contact form 7.

The question is, how can I add all the elements of the cart in a variable or something to send it?

Read more here:: SimpleCartJS – How to get all items in cart and send via Contact form 7?

Leave a Reply

Your email address will not be published. Required fields are marked *