This file contains 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 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 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 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 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 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 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; ?> |
This file contains 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
var ebook_deploy = { | |
_cdn: '/', | |
_container: 'ebook', | |
_head: document.getElementsByTagName('head')[0], | |
_host: (("https:" == document.location.protocol) ? "https:" : "http:"), | |
init: function(container, cdn) { |
This file contains 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 Ebook { | |
public $input = 'ebook.html'; | |
public $output = 'ebook.min.html'; | |
public function __construct($array) | |
{ |
This file contains 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 vat | |
{ | |
function check_vat($vat_no,$state_code) | |
{ | |
$states = array( | |
27 => 'RO', | |
1 => 'AT', | |
2 => 'BE', | |
3 => 'BG', |