Powerful and easy to use cms to build websites, blogs or ecommerce stores.
HTML backendblogblog-engineblog-platformbloggingcmscontent-managementcontent-management-systemecommerceecommerce-platformno-codepage-builderphpphp-cmsphp7php8self-hostedshopping-cartweb-applicationwebsite-builder
Include site weight_type_id setting when initializing cart
givanz24a72a64eff2
diff --git a/admin/controller/order/order.php b/admin/controller/order/order.phpindex db804a9..7ad4cee 100755--- a/admin/controller/order/order.php+++ b/admin/controller/order/order.php@@ -49,14 +49,17 @@ class Order extends Base {protected $type = 'order';function index() {- $view = View :: getInstance();+ $site = siteSettings($this->global['site_id']);+ $options = array_intersect_key($site,+ array_flip(['weight_type_id', 'length_type_id', 'currency_id', 'country_id']));- $cart = Cart::getInstance($this->global);+ $cart = Cart::getInstance($options);$payment = Payment::getInstance();$shipping = Shipping::getInstance();+ $view = $this->view;- $this->view->order_payment = $payment->getMethods();- $this->view->order_shipping = $shipping->getMethods();+ $this->view->order_payment = $payment->getMethods([]);+ $this->view->order_shipping = $shipping->getMethods([]);if (isset($this->request->get['order_id'])) {$options = ['order_id' => (int)$this->request->get['order_id'], 'type' => $this->type] + $this->global;diff --git a/app/controller/checkout/checkout.php b/app/controller/checkout/checkout.phpindex c1f5d74..eaca4e9 100755--- a/app/controller/checkout/checkout.php+++ b/app/controller/checkout/checkout.php@@ -101,7 +101,9 @@ class Checkout extends Base {}function index() {- $cart = Cart :: getInstance($this->global);+ $options = array_intersect_key($this->global['site'],+ array_flip(['weight_type_id', 'length_type_id', 'currency_id', 'country_id']));+ $cart = Cart :: getInstance($options);//buy now productif (isset($this->request->request['product_id'])) {