copy this file:
https://github.com/zencart/zencart/b...pping/flat.php
to where it is supposed to go, replacing the existing file.
enable flat rate shipping and put the price that you want to offer.
create this file:
includes/classes/observers/auto.carlwhat_observer.php
and put this in there (replace 8754 with the product_id of the item you want to offer flat rate shipping):
PHP Code:
<?php
/* portions copyright by... zen-cart.com
developed and brought to you by proseLA
https://mxworks.cc
*/
if (!defined('IS_ADMIN_FLAG')) {
die('Illegal Access');
}
class zcObserverCarlwhatObserver extends base
{
public function __construct()
{
$this->attach($this, [
'NOTIFY_SHIPPING_FLAT_UPDATE_STATUS',
]);
}
public function updateNotifyShippingFlatUpdateStatus(&$class, $eventID, &$p1, &$p2)
{
if (!$_SESSION['cart']->in_cart('8754')) {
$p2 = false;
}
}
}
if that does not work, someone else can help you with troubleshooting.
good luck.
Bookmarks