Dodanie obsługi kuponów rabatowych w zamówieniach oraz aktualizacja adresów URL do zasobów aktualizacji
This commit is contained in:
@@ -140,12 +140,14 @@ class ShopOrder
|
||||
'apilo_order_status_date' => date( 'Y-m-d H:i:s' ),
|
||||
'sellasist_order_status_date' => date( 'Y-m-d H:i:s' ),
|
||||
] );
|
||||
|
||||
$order_id = $mdb -> id();
|
||||
|
||||
if ( !$order_id )
|
||||
return false;
|
||||
|
||||
\Log::save_log( 'Złożono nowe zamówienie | NR: ' . $order_id );
|
||||
if ( $coupon )
|
||||
$mdb -> update( 'pp_shop_coupon', [ 'used_count[+]' => 1 ], [ 'id' => $coupon -> id ] );
|
||||
|
||||
// ustawienie statusu zamówienia
|
||||
$mdb -> insert( 'pp_shop_order_statuses', [ 'order_id' => $order_id, 'status_id' => 0, 'mail' => 1 ] );
|
||||
@@ -217,9 +219,10 @@ class ShopOrder
|
||||
$order = \front\factory\ShopOrder::order_details( $order_id );
|
||||
|
||||
$mail_order = \Tpl::view( 'shop-order/mail-summary', [
|
||||
'settings' => $settings,
|
||||
'order' => $order
|
||||
] );
|
||||
'settings' => $settings,
|
||||
'order' => $order,
|
||||
'coupon' => $coupon,
|
||||
] );
|
||||
|
||||
$settings[ 'ssl' ] ? $base = 'https' : $base = 'http';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user