Magento find number of times a coupon has been used

2014-10-12 17:21:29Damodar Bashyal

 

Magento was not recording correct number of times a shopping cart coupon was used. When I ran below query in database, it was giving wrong information as far as I know.

mysql> select u.coupon_id, c.code, count(*) as total from salesrule_coupon_usage u, salesrule_coupon c where u.coupon_id=c.coupon_id and u.coupon_id IN (119, 132, 91) group by u.coupon_id;

May be I was wrong to use that query to find usage :), so tried another query, which gave me better report.

More»

TAGS:magento

 

 

How to get secure url in Magento

2014-09-04 20:30:13Damodar Bashyal

 

magento get secure base url

How do you get secure or unsecure urls in magento? It's quite simple actually. We discussed about getting different base url types in previous blog post here - [Magento get base url].

Now we will show you how to get secure urls in magento. So in previous post we got base url as:

More»

 

Magento add your own CMS Directive to include your custom template tag

2014-07-15 02:09:07Damodar Bashyal

 

This post details on how I was able to add new template tag on Magento Cms pages and static blocks. If you want to know more about these directives and template tags, you can check official magento wiki here.

I have already added this functionality and example on my github repository here https://github.com/dbashyal/Magento-General-Module-Extension. This module consists of other functionalities, so check code and strip out that you don't need it.

More»

TAGS:Magento