
Originally Posted by
LilleyPadGifts
I have by shipping options set as a table, but is there an option to show "if over 25 then we will calculate?"
I will be having an option on checkout to NOT checkout but to Invoice for other reason so my site isn't about them buying and paying immediately, but in the code for the table I obviously can't but "will invoice" since it only accepts numbers.
OK, here's a "dirty" version of how it could be done. There are multiple ways and much better solutions, but it would require a bit more coding, which you're obviously not interested in... And I understand that, some (if not most) people just want their site to work as required and focus on their business.
Modify your includes/modules/shipping/table.php (assuming you're using the Table Rate shipping module). Find the following lines:
Code:
// disable only when entire cart is free shipping
if (zen_get_shipping_enabled($this->code)) {
$this->enabled = (MODULE_SHIPPING_TABLE_STATUS == 'True');
}
and add AFTER:
Code:
// BOF disable module if more than 25 items in cart
if(!IS_ADMIN_FLAG && $_SESSION['cart']->count_contents() > 25) {
$this->enabled = false;
}
// EOF disable module if more than 25 items in cart
This is what you're supposed to see after the edits:
Code:
// disable only when entire cart is free shipping
if (zen_get_shipping_enabled($this->code)) {
$this->enabled = (MODULE_SHIPPING_TABLE_STATUS == 'True');
}
// BOF disable module if more than 25 items in cart
if(!IS_ADMIN_FLAG && $_SESSION['cart']->count_contents() > 25) {
$this->enabled = false;
}
// EOF disable module if more than 25 items in cart
Next, you could use the existing freeoptions module. Install it, remove the Total value and set "Item Count >=" to 26. And lastly, rename the module - edit your includes/languages/english/modules/shipping/freeoptions.php to something like:
Code:
define('MODULE_SHIPPING_FREEOPTIONS_TEXT_TITLE', 'Shipping costs to be calculated later');
define('MODULE_SHIPPING_FREEOPTIONS_TEXT_WAY', 'Quote Later');
It will show $0.00 as shipping costs, but the text should make it clear that it will be calculated afterwards. Perhaps an additional few lines in your Terms and your Shipping Info pages wouldn't hurt...
P.S. Hope your illness is now behind you and you're doing well now.
Bookmarks