Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Modifying shopping_cart.php


lorilong

Recommended Posts

I've created a one page store that will be inserted into a website to sell only one item -- a book. I want to limit the amount of books sold to a maximum of 10 per customer. I originally had the Forced Total Order Quantity contribution set up and it was working perfectly (with my own modifications) until the client wanted me to eliminate the "create an account" area. I am using no_account_1_2_3_4_5_6_7_8_9_10 and it works great but the Forced Total Order Quantity contribution does not seem compatible with it.

 

Here's what I want to do: set up some sort of check on my shopping_cart.php page that simply bounces you back to the shopping_cart.php page when you click "continue" if you enter in anything other than 1 thru 10. I already have some text on the page stating that we aren't excepting orders over 10, but need a safe guard for those that can't read.

 

I tried modifying the shopping_cart script on line #52: <?php

if ($cart->count_contents() > 0) {

?>

 

But am not having much luck. I know a little bit about php, but have much to learn. Does anyone have any suggestions?

 

Lori

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...