Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

Hello I searched the forum and did not find answer.

 

I use Minimum Order Amount Add-on in 2.3.3 OSC and it work good.

 

BUT there is a possibility to remove the checkout button from the shopping cart page until the minimum order amount is met.

 

How MOD this code for 2.3.3 ?

 

In shopping_cart.php, around line 200 (give or take) should be:
<td align="right" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . tep_image_button('button_checkout.gif', IMAGE_BUTTON_CHECKOUT) . '</a>'; ?></td>
Replace with:
<?php
if ($cart->show_total() > MIN_ORDER_AMOUNT) {
?>
   <td align="right" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . tep_image_button('button_checkout.gif', IMAGE_BUTTON_CHECKOUT) . '</a>'; ?></td>
<?php
  }
?>
*****************
Adding the following mod will also remove other checkout option buttons (i.e. PayPal) from the shopping cart page until the minimum order amount is met.
In catalog\shopping_cart.php (around line 224),
Replace:
<?php
   $initialize_checkout_methods = $payment_modules->checkout_initialization_method();
   if (!empty($initialize_checkout_methods)) {
?>
With:
<?php
   $initialize_checkout_methods = $payment_modules->checkout_initialization_method();
   if (!empty($initialize_checkout_methods) && ($cart->show_total() > MIN_ORDER_AMOUNT)) {
?>

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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...