Forum for discussing general topics related to Couch.
2 posts Page 1 of 1
I am nearly there with couchcms and integrating couchcart into a clients, I add the product to the cart which has a checkout button on it which if clicked on goes to PayPal to pay which is good but I would like a order email confirmation sent to the customer and to the admin. I found this link where KK said the checkout.php can be modified
Code: Select all
but can I do the same thing but on cart.php as the clients site does not use checkout.php as it seems to go from cart.php to the PayPal side.

Would the following work on cart.php

Code: Select all
<cms:if "<cms:pp_count_items />" >
                <div class="container">
         <div class="row">
                <div class="col-sm-12">
                        <h2 class="page-heading sbheading"> <span class="page-heading-title">Shopping Basket</span> </h2>
                           <th class="col-remove">&nbsp;</th>
                           <th class="col-desc">Item</th>
                           <th class="col-quantity">Qty</th>
                           <th class="col-price">Price</th>
                           <th class="col-subtotal">Total</th>
                                        <td class="col-remove"><a href="<cms:pp_remove_item_link />" class="cart-remove" title="Remove">&times;<span class="screen-reader">Remove</span></a></td>
                                        <td class="col-desc">
                                            <a href="<cms:show link />" class="cart-thumb">
                                                <img src="<cms:show product_thumb />" width="70" height="64" alt="<cms:show title />">
                                            <div class="desc-box">
                                                <a href="<cms:show link />"><cms:show title /></a>
                                                    <cms:pp_selected_options separator='<br>' />
                                        <td class="col-quantity"><input name="qty[<cms:show line_id />]" class="quantity-input" type="number" min="0" step="1" value="<cms:show quantity />" title="Quantity"></td>
                                        <td class="col-price">
                                            <cms:if line_discount><span class="compare-price">£<cms:number_format orig_price /></span></cms:if>
                                            £<cms:number_format price />
                                        <td class="col-subtotal">£<cms:number_format line_total /></td>
                                <cms:if "<cms:pp_discount />" || "<cms:pp_shipping />" || "<cms:pp_taxes />" >
                                    <tr class="row-extras">
                                        <td class="col-extras-label" colspan="4">Subtotal</td>
                                        <td class="col-extras">£<cms:number_format "<cms:pp_sub_total />" /></td>
                                <cms:if "<cms:pp_discount />">
                                    <tr class="row-extras">
                                        <td class="col-extras-label" colspan="4">Discount:</td>
                                        <td class="col-extras col-discount"><span class="subtract">-</span>£<cms:number_format "<cms:pp_discount />" /></td>
                                <cms:if "<cms:pp_shipping />">
                                    <tr class="row-extras">
                                        <td class="col-extras-label" colspan="4">Shipping:</td>
                                        <td class="col-extras">£<cms:number_format "<cms:pp_shipping />" /></td>
                                <cms:if "<cms:pp_taxes />">
                                    <tr class="row-extras">
                                        <td class="col-extras-label" colspan="4">Taxes:</td>
                                        <td class="col-extras">£<cms:number_format "<cms:pp_taxes />" /></td>
                        <tr class="row-total">
                           <td class="col-total-label" colspan="4">Total:</td>
                           <td class="col-total">£<cms:number_format "<cms:pp_total />" /></td>
                  <div class="cart-operations">
                     <div class="checkout-box">
                        <input class="button checkout-button" type="submit" name="checkout" value="Checkout">
                     <div class="update-box">
                        <input class="button update-button" type="submit" value="Update Quantities">
                <cms:form method="post" anchor='1'>
    <cms:get_flash 'success_flash_msg' />
    <cms:if k_success >
<cms:send_mail from='' to=frm_email bcc='' subject='Your order with XYZ' debug='1'>
Thank you for your order, <cms:show frm_name />.

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

Items Ordered:<cms:pp_cart_items>
<cms:show title />. <cms:pp_selected_options separator=', ' /> (<cms:show quantity /> qty) - $<cms:number_format line_total /></cms:pp_cart_items>
<cms:if "<cms:pp_shipping />">Shipping: $<cms:number_format "<cms:pp_shipping />" /></cms:if>

Delivery Address:
<cms:show frm_address />
        <cms:set_flash name='success_flash_msg' value="<p class='success'>Thank you for your order!</p>" />
        <cms:redirect k_page_link />

Sorry sorted this issue now by adding the checkout link to the button in cart.php instead of going directly to PayPal and then in checkout.php is the button that goes to PayPal after collection the info needed
2 posts Page 1 of 1