Magento 2 Creating a theme

Hopefully I’m going to cover the things I’ve been unable to find out so far. To create your own theme you need the following structure app/design/frontend/Somename/Somename1/ From here you then need Magento_Theme/layout/ and Magento_Theme/templates/ for your layout.xml files and template.phtml files Back in app/design/frontend/Somename/Somename1/ you need a web/ folder with the following structure css/ js/ images/ […]

Magento SQL Average Total Orders Per Customer

First we need to get the total number of orders: $result = mysqli_query($con,” SELECT count(mg_sales_flat_order.status) as grand_count FROM mg_sales_flat_order WHERE mg_sales_flat_order.status NOT LIKE ‘canceled’ AND mg_sales_flat_order.status NOT LIKE ‘closed’ AND mg_sales_flat_order.status NOT LIKE ‘fraud’ AND mg_sales_flat_order.status NOT LIKE ‘holded’ AND mg_sales_flat_order.status NOT LIKE ‘paypal_canceled_reversal’ $totalorders1 = $row[‘grand_count’]; “); while($row = mysqli_fetch_array($result)) { $totalorders = $row[‘grand_count’]; […]

Magento SQL Repeat Customers vs New Customers

First off get the total number of customers: SELECT COUNT(*) AS grand_count FROM( SELECT customer_email FROM mg_sales_flat_order WHERE mg_sales_flat_order.status NOT LIKE ‘canceled’ AND mg_sales_flat_order.status NOT LIKE ‘closed’ AND mg_sales_flat_order.status NOT LIKE ‘fraud’ AND mg_sales_flat_order.status NOT LIKE ‘holded’ AND mg_sales_flat_order.status NOT LIKE ‘paypal_canceled_reversal’ GROUP BY customer_email   Then get the number of new customers: SELECT COUNT(*) […]

Magento SQL Average Order Value

I need to get the AOV from our store. Simple SQL code is as follows: SELECT SUM( grand_total ) / COUNT( * ) FROM `mg_sales_flat_order` WHERE mg_sales_flat_order.status NOT LIKE ‘canceled’ AND mg_sales_flat_order.status NOT LIKE ‘closed’ AND mg_sales_flat_order.status NOT LIKE ‘fraud’ AND mg_sales_flat_order.status NOT LIKE ‘holded’ AND mg_sales_flat_order.status NOT LIKE ‘paypal_canceled_reversal’ Instead of using grand_total there […]

Woocommerce

I have recently started working with Woocommerce, after years of being developing on Magento.  The reason for me learning to develop on Woocommerce is simple, it’s very easy to develop on and the main reason I’ve been using it is due to it’s brilliant subscription engine extension. Woo’s subscription engine module is fair superior to the […]

Magento fast .htaccess

############################################ ## These options are useful for development #php_flag display_startup_errors on #php_flag display_errors on #php_flag html_errors on #php_flag log_errors on #php_flag log_errors_max_len 0 #php_value error_log /var/www/magento-lite/var/log/php_errors.log ############################################ ############################################ ## uncomment these lines for CGI mode ## make sure to specify the correct cgi php binary file name ## it might be /cgi-bin/php-cgi # Action php5-cgi […]


Notice: ob_end_flush(): failed to send buffer of zlib output compression (0) in /home/wwwwebam/public_html/blog/wp-includes/functions.php on line 4339