Forum for discussing general topics related to Couch.
2 posts Page 1 of 1
Hi guys, a quick question:

I'm adding a shopping cart to a website and my products should have an identification code:

now my code for the product is this:

Code: Select all
<cms:pp_product_form class="cart-form">
               <input class="product-quantity" type="hidden" name="qty" min="1" step="1" value="1" title="Quantity">
               <input class="product-code" type="hidden" name="code" value="<cms:show product_code />" title="Code">
               <input class="button product-add" type="submit" value="Add to your shopping bag">
                    </cms:pp_product_form>


I'm not sure how to recover the product_code variable.

Also is it possible to send and order form to the administrator after a user purchased an item?

Thanks always like usually - I'm pretty good with couch but is my first time with the cart.
Hi Emanuele,

I'm not sure how to recover the product_code variable
In our documentation for CouchCart at http://www.couchcms.com/docs/concepts/s ... art-1.html, please search for the following heading
"Custom variables for line-items".

To reiterate, if you rename your product code field from product_code to pp_product_code (i.e. prefix it with 'pp_', its value will automatically be made available to you as
<cms:show product_code /> by cms:pp_cart_items. That is to say, you don't need to pass that value through the form as it exists with the product itself.

Regarding your other question
is it possible to send and order form to the administrator after a user purchased an item?
Sending email is simple. The real problem is this - CouchCart at checkout redirects the visitor to PayPal with all the cart data it has captured. Once at Paypal, the visitor may or may not complete the purchase. The only way to know about a completed purchase is to use IPN. Currently CouchCart is not using IPN so we cannot know for sure about this event.
2 posts Page 1 of 1