This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "head":{ | |
| "udid": "UDIDBYJAMES", | |
| "api_key": "test123", | |
| "api_token": "test123" | |
| }, | |
| "body":{ | |
| "order_id": "20300", | |
| "transaction_id": "PAY-69X87306BF709670NKUABN4Q" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public function process_paypal_ipn($params) | |
| { | |
| try | |
| { | |
| $order = null; | |
| /* | |
| * Find order and load paypal settings | |
| */ | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| UPDATE transactions | |
| SET DateTime = CAST(CONCAT(STR_TO_DATE(Date,'%d/%m/%Y'), ' ', Time) AS DateTime) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT DateTime, `Time Zone`, Name, Currency, Gross, `Transaction ID`, Type | |
| FROM transactions | |
| WHERE TIME(DateTime) BETWEEN '00:00:00' AND '00:59:59' | |
| AND (Type = 'Website Payments Pro API Solution' OR Type = 'Shopping Cart Payment Received') | |
| AND `Time Zone` = 'BST' | |
| AND DateTime > '2014-09-22 00:00:00' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $file = Db_File::create(); | |
| $file->is_public = true; | |
| $file->fromPost($_FILES['file']); | |
| $file->master_object_class = 'Shop_OrderItem'; | |
| $file->save(); | |
| $item->files->add($file); | |
| $item->save(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class Advantage { | |
| public static function show_error() | |
| { | |
| if (array_key_exists('system', Phpr::$session->flash->flash)) | |
| { | |
| $system_message = Phpr::$session->flash['system']; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| public function subscribeEvents() | |
| { | |
| Backend::$events->addEvent('shop:onExtendCategoryModel', $this, 'extend_category_model'); | |
| } | |
| public function extend_category_model($category, $context) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT shop_categories.name, count(shop_order_items.id)*shop_order_items.quantity as 'total_sales' | |
| FROM shop_order_items | |
| LEFT JOIN shop_orders | |
| ON shop_order_items.shop_order_id = shop_orders.id | |
| LEFT JOIN shop_products | |
| ON shop_order_items.shop_product_id = shop_products.id | |
| LEFT JOIN shop_products_categories | |
| ON shop_products.id = shop_products_categories.shop_product_id |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public function listDashboardReports() | |
| { | |
| return array( | |
| 'top_customers_revenue'=>array('partial'=>'top_customers_revenue.htm', 'name'=>'Top spending customers'), | |
| 'top_customers_orders'=>array('partial'=>'top_customers_orders.htm', 'name'=>'Top ordering customers') | |
| ); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Create a page block called "breadcrumb" | |
| <?php $category = isset($product) ? $product->categories[0] : null; ?> | |
| <?php if($category): ?> | |
| <?php foreach ($category->get_parents() as $parent): ?> | |
| <li><a href="<?php echo $parent->page_url('/category') ?>"><?php echo h($parent->name); ?></a></li> | |
| <?php endforeach; ?> | |
| <li><a href="<?php echo $category->page_url('/category'); ?>"><?php echo h($category->name); ?></a></li> | |
| <?php endif; ?> |