Forum for discussing general topics related to Couch.
3 posts Page 1 of 1
Hey!

I've figured the easiest method for handling some system of orders, would be to send "cart info" to the both buyer and seller e-mail address, which he would enter on request + name

I would like to send some info, and be able to use data from products he ordered, separated by slashes;
Add my own pre-made text, and be able to use variables, such as total amount, and discount;

Since I figured both forms, emails and cart info is in place, you can actually send those variables around, right?

Any input on this would be much appreciated.
Hi,

You are right - all pertinent information about the cart's contents are available and it should be easy to send that info via email to the buyer (with a CC to the seller as well).

This would require making some changes to the checkout template so that it displays a form asking the buyer for her name/email/shipping_address. Upon successful submission of the form, we create an email using the submitted data + cart contents and dispatch it to both the involved parties.

I am attaching a fully working checkout template that does exactly what was outlined above.
For sake of clarity, I've chunked up the template to use two embedded snippets 'sales_email.html' and 'sales_success_msg.html'. Please place both into the 'snippets' folder used by your installation.

This is what the send email would look like -
Thank you for your order, Sherlock Holmes.

Your order has been confirmed and is being processed. Here is the summary:

Items Ordered:
Paper Airplane. Color: Red, Custom Text: I rock! (1 qty) - $6.00
Raised Relief World Globe. Illuminated: No, Stand Type: Tabletop, Stand Material: Plastic (1 qty) - $50.00

Shipping: $15.00
Taxes: $7.10

Outstanding Amount Payable: $78.10

Delivery Address:
221B Baker St, London,
Greater London NW1 6XE,
United Kingdom

Of course, you are free to change all markup, text etc.

Hope this helps.

Attachments

Thanks, Kamran!

I'll give this a look later, play around, and give you feedback on this. Good job.
3 posts Page 1 of 1
cron