update
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
<?php
|
||||
use shop\Order;
|
||||
|
||||
error_reporting( E_ALL ^ E_NOTICE ^ E_STRICT ^ E_WARNING ^ E_DEPRECATED );
|
||||
|
||||
function __autoload_my_classes( $classname )
|
||||
@@ -11,6 +9,12 @@ function __autoload_my_classes( $classname )
|
||||
|
||||
if ( file_exists( $f ) )
|
||||
require_once( $f );
|
||||
else
|
||||
{
|
||||
$f = 'autoload/' . implode( '/', $q ) . '/' . $c . '.php';
|
||||
if ( file_exists( $f ) )
|
||||
require_once( $f );
|
||||
}
|
||||
}
|
||||
|
||||
spl_autoload_register( '__autoload_my_classes' );
|
||||
@@ -52,12 +56,12 @@ if ( !$config['trustmate']['enabled'] )
|
||||
exit;
|
||||
}
|
||||
|
||||
$settings = \front\factory\Settings::settings_details();
|
||||
$settings = ( new \Domain\Settings\SettingsRepository( $mdb ) )->allSettings();
|
||||
|
||||
$order_id = $mdb -> get( 'pp_shop_orders', '*', [ 'AND' => [ 'status' => 6, 'trustmate_send' => 0 ] ] );
|
||||
if ( is_array( $order_id ) and $order_id['id'] )
|
||||
{
|
||||
$order = \front\factory\ShopOrder::order_details( $order_id['id'] );
|
||||
$order = ( new \Domain\Order\OrderRepository( $mdb ) )->orderDetailsFrontend( $order_id['id'] );
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
@@ -73,8 +77,8 @@ if ( is_array( $order_id ) and $order_id['id'] )
|
||||
{
|
||||
'local_id': <?= (int)$product['product_id'];?>,
|
||||
'name': '<?= $product['name'];?>',
|
||||
'product_url': 'https://pomysloweprezenty.pl<?= \front\factory\ShopProduct::product_url( new \shop\Product( $product['product_id'] ) );?>',
|
||||
"image_url": "https://pomysloweprezenty.pl<?= \front\factory\ShopProduct::product_image( $product['product_id'] );?>"
|
||||
'product_url': 'https://pomysloweprezenty.pl<?= \front\Views\ShopProduct::productUrl( ( new \Domain\Product\ProductRepository( $mdb ) )->findCached( $product['product_id'], 'pl' ) );?>',
|
||||
"image_url": "https://pomysloweprezenty.pl<?= ( new \Domain\Product\ProductRepository( $mdb ) )->getFirstImageCached( (int)$product['product_id'] );?>"
|
||||
}<? if ( $product != end( $order['products'] ) ) echo ',';?>
|
||||
<? endforeach;?>
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user