Forum for discussing general topics related to Couch.
3 posts Page 1 of 1
Can I just skip the 'checkout' page once I am in the cart? I am about to start building my first site using CouchCMS and its a REALLY basic eCommerce store (with only one product).

Instead of going to a separate checkout screen can the user just go straight to PayPal once they click checkout? The checkout page is just not necessary for me.
Instead of going to a separate checkout screen can the user just go straight to PayPal once they click checkout?
The easiest way of doing so would be to remove all HTML from the checkout template leaving behind only the code that invokes PayPal. For example, following would be the full code of the checkout template -
Code: Select all
<?php require_once 'couch/cms.php'; ?>
<cms:no_cache />

<cms:pp_payment_gateway
    shipping_address="<cms:if "<cms:pp_count_shippable_items />" >1<cms:else />0</cms:if>"
    empty_cart='1'
/>

<?php COUCH::invoke(); ?>
By doing this, when the user clicks 'checkout', the checkout template does execute but instead of showing a page requiring user-interaction, it right away moves over to PayPal (so effectively checkout does not exist for the user).

That said, you mentioned -
its a REALLY basic eCommerce store (with only one product).

I wonder why would you need a cart for only one item? Did you take a look at the following -
http://www.couchcms.com/docs/concepts/paypal.html ?
It is a simple PayPal button that should be ideal for single products.

Hope this helps.
Oh wow I didn't even remember the single paypal button functionality.

It only has one product, but they sell them in different quantities (so the more you buy, the cheaper they get), and those quantities and cost are already preset. See the screenshot of the design skeleton.

I guess I could just hardcode using the pp_mc_gross of each item into each button and send that over to paypal upon clicking.

Thanks!

Attachments

3 posts Page 1 of 1
cron