Forum for discussing general topics related to Couch.
14 posts Page 2 of 2
Sorry for delay in revert @ trendoman - Thank you so much for your help. One last question :D
Can I fetch whole cart detail in one stoke to display in Order summery.

Thanks once again.... :)
Tag cms:pp_cart_items performs listing of items already present in the cart.
It is very similar to listing pages, folders etc. in Couch.
══════════════════════════════════════════════════════════════
It doesn't have any parameters and is used as a tag-pair.
For example -

Code: Select all
<cms:pp_cart_items>
    ..
    <cms:dump />
    ..
    <cms:pp_selected_options />
    ..
</cms:pp_cart_items>


Tag adds following variables in context to provide info about each item in the cart -

Code: Select all
    line_id         link                requires_shipping
    id              price               line_discount ^
    name            quantity            orig_price ^
    title           line_total          discount_scale ^

    ^ - if discount scale is active



! More variables can be set in context about each item by the tag. Define an editable region for products and
prepend its name with 'pp_' and it will be available as a variable with the same name (but the 'pp_' removed).

If for some reason product editables can not be renamed, then fetch them with cms:pages/cms:get_field by 'id' parameter set by tag e.g.

Code: Select all
<cms:pp_cart_items>
    ..
    <cms:pages id=id limit='1' >
        ..
    </cms:pages>
    ...
</cms:pp_cart_items>


________________
Developer tips

Topic CouchCart JSON Template is a quick starter for getting cart info in JSON.
Hi,

I'm working on CouchCms Cart. I have redirected my cart details to Razorpay. But I wanted insert "input" field for Shipping Address on "cart.php" page so I can pass that field to Razorpay checkout script. Is it possible to do so? Or I have use another method. Following is my razorpay script. I wanted to insert address into "data-notes.shipping_address="???????????" field

<script
src="https://checkout.razorpay.com/v1/checkout.js"
data-key="Key"// Your Api kEY
data-amount="<cms:mul myamount '100' />"
data-currency="INR"
data-buttontext="PAY NOW"
data-name="VISPACE"
data-description="TEST TRANSACTION"
data-image="http://v-space.in/img/Vspace.png" ///Your Company Logo
data-prefill.name=""
data-prefill.email=""
data-notes.shopping_order_id="3456"
data-theme.color="#422291"
data-notes.shipping_address="???????????"
data-notes.item_ordered="<cms:show myorder />"
>
</script>


Thanks in advance.... :D
Any suggestions please :roll:
14 posts Page 2 of 2
cron