On the eve of my birthday, I must say, I have been inundated with coupons and special offers for my use, and as a consumer, I have taken advantage of almost all of them. Seriously, who doesn’t love celebrating their birthday?
I have received dozens of e-mails from many of the stores and brands I like to shop at, and many of them offer either an amazing coupon, or a free gift for my birthday.
It sounds a lot more confusing than it really is, trust me!:
1. To begin, you need to select “Shopping Cart Price Rules” from the “Promotions” menu.
2. Next, click the “Add New Rule” button located in the upper right corner.
3. Give the new rule a name and a description. (This is just for your benefit, so you remember which coupon is which).
4. Then change the status to “Active”.
5. Next, you’re going to want to select which customer groups the rule applies to (usually all).
6. If you choose to, you can enter a coupon code. If you choose not to enter a coupon code, the discount will automatically apply when the conditions are met.
7. Then you need to enter the number of times the coupon is allowed to be used by anyone. For instance, if the coupon is only available to the first 100 customers, put 100 (if unlimited, put zero).
8. Next, enter the number of times each individual customer is allowed to use the coupon. (If you only want a customer to be able to use this offer once, enter the number 1).
9. Enter the dates when the coupon is available. If there is no end date, just leave the space blank.
10. Then enter the priority of the coupon, zero being the highest (order in which the rules are processed).
11. Next, select “Conditions” from the menu on the left.
12. Here you’re going to want to make sure the rule is set so that the total quantity equals or is greater than the amount required for the discount to take effect. (Here, we want the discount to apply if the customer purchases 3 or more of the specified items, so we enter the number 3).
13. Now, you must specify which items need to be purchased in order to receive the discount, so from the drop down menu, check off the items which you would like the rule to apply to.
14. Almost done! Now, select “Actions” from the menu on the left.
15. Next, be sure that under “Apply”, “Percent of product price discount is selected”.
16. Then, enter the amount you would like the products to be discounted. (For this example we want the customers to receive a 10% discount when they purchase the correct amount of the specified items, so we enter the number 10).
17. Now, towards the bottom of the page, you need to enter what conditions must be met in order for the customer to receive the discount, so you must specify which items the rule applies to. So, from the drop down menu, check off the specified items. (They should be the same items that you checked off under the “Conditions” menu).
18. Lastly, just be sure to save the rule by clicking “Save Rule” in the top right corner!
You’re good to go!
This is very simple:
1. To begin, you need to select “Shopping Cart Price Rules” from the “Promotions” menu.
2. Next, click the “Add New Rule” button located in the upper right corner.
3. Give the new rule a name and a description. (This is just for your benefit, so you remember which coupon is which).
4. Then change the status to “Active”.
5. Next, you’re going to want to select which customer groups the rule applies to (usually all).
6. If you choose to, you can enter a coupon code. If you choose not to enter a coupon code, the discount will automatically apply when an item is added to the shopping cart.
7. Then you need to enter the number of times the coupon is allowed to be used by anyone. For instance, if the coupon is only available to the first 100 customers, put 100 (if unlimited, put zero).
8. Next, enter the number of times each individual customer is allowed to use the coupon. (If you only want a customer to be able to use this offer once, enter the number 1).
9. Enter the dates when the coupon is available. If there is no end date, just leave the space blank.
10. Then enter the priority of the coupon, zero being the highest (order in which the rules are processed).
11. Next, select the “Actions” menu from the left.
12. Under “Apply”, select “Fixed amount discount for whole cart”.
13. Then, where it asks you for the discount amount, enter whatever amount you would like the entire cart to be discounted (In this case, we want the cart to be discounted $15, so we enter the number 15).
14. Last but not least, click the “Save Rule” button in the top right corner, and you’re done!
This is a lot simpler than it may seem!:
1. To start off, just select “Shopping Cart Price Rules” from the “Promotions” menu.
2. Next, click the “Add New Rule” button located in the upper right corner.
3. Give the new rule a name and a description (this is for your benefit, so you can remember which coupon is which).
4. Then change the status to “Active”.
5. Next, you’re going to want to select which customer groups the rule applies to (usually all).
6. If you choose to, you can enter a coupon code.
7. Then you need to enter the number of times the coupon is allowed to be used by anyone. For instance, if the coupon is only available to the first 100 customers, put 100 (if unlimited, put zero).
8. Next, enter the number of times each individual customer is allowed to use the coupon. (If you only want a customer to be able to use this offer once, enter the number 1).
9. Enter the dates when the coupon is available.
10. Then enter the priority of the coupon, zero being the highest (order in which the rules are processed).
11. Next, select “Actions” from the menu on the left.
12. Almost done! Under the free shipping option select “For Shipment with Matching Items”.
13. Last but not least, click the “Save Rule” button located in the upper right corner.
And that’s all there is to it!
Here are a few easy steps to get you started:
1. To begin, just select “Shopping Cart Price Rules” from the “Promotions” menu.
2. Next, click the “Add New Rule” button located in the upper right corner.
3. Give the new rule a name and a description. (This is just for your benefit, so you remember which coupon is which).
4. Then change the status to “Active”.
5. Next, you’re going to want to select which customer groups the rule applies to (usually all).
6. If you choose to, you can enter a coupon code. If you choose not to enter a coupon code, the free shipping will automatically apply if the conditions (spending over $100, in this case) are met.
7. Then you need to enter the number of times the coupon is allowed to be used by anyone. For instance, if the coupon is only available to the first 100 customers, put 100 (if unlimited, put zero).
8. Next, enter the number of times each individual customer is allowed to use the coupon. (If you only want a customer to be able to use this offer once, enter the number 1).
9. Enter the dates when the coupon is available. If there is no end date, just leave the space blank.
10. Then enter the priority of the coupon, zero being the highest (order in which the rules are processed).
11. Next, select “Conditions” from the menu on the left.
12. Here you need to select “Subtotal” from the dropdown menu, then click on the word “is” and from that dropdown menu select “Equals or Greater Than”, then click on the “…” and enter 100 (or the amount required to receive free shipping).
13. Now, select “Actions” from the menu on the left.
14. Don’t worry- you’re almost done! Now, next to “Apply to shipping amount”, select “Yes”.
15. Next to “Free Shipping” select the option “For shipment with matching items”.
16. Last but not least, click the “Save Rule” button located in the upper right corner.
You’re all set!
I like to have all Magento data re-indexed every night via a cron job. That way I KNOW the indexes are up to date.
To create the cron job, add the following to your cron file to reindex every day at 4am
0 4 * * * php -f /shell/indexer.php reindexall
Note: If you get an error telling you you’re out of memory similar to:
PHP Fatal error: Allowed memory size of 262144 bytes exhausted (tried to allocate 7680 bytes) in …/app/code/core/Mage/Index/Model/Indexer.php on line 163
Try commenting out php_value memory_limit and php_value max_execution_time in your .htaccess file.
Recently on one of our client’s stores (this one in particular running Magento 1.4.1.1) we ran into an issue with creating a Shopping Cart Price Rule promo. The goal was to create a rule where if there were 3 or more products with a certain SKU in the cart then apply a discount. However, when we went to create the rule – based on SKU – we realized that the conditions dropdown was no longer displaying the attributes as it had in the past. The dropdown looked something like this:
Please choose a condition to add…
Conditions Combination
Cart Item Attribute
– Price In cart
– Quantity in cart
– Row total in cart
Product Attribute
– Attribute Set
– Category
The fix that worked for us:
In the Magento Admin Panel go to Catalog > Attributes > Manage Attributes
Select any attribute that you’d like to be able to sort by in the conditions list. On the edit-a-attribute page, under “Frontend Properties” set “Use for Promo Rule Conditions” to “Yes”. Save the attribute.
Then go to System > Index Management and re-index.
Now – when you go back to creating your Shopping Cart Price Rule, you will see your attribute in the conditions list.
Simple fix for an annoying issue.
Recently we had to import a list of newsletter subscribers into Magento. We had already loaded all the customers, but now we needed to subscribe all of the customers that had subscribed on the customer’s old site on the new. The following code (simplified for display here) did the trick!
<?php
define('CRLF', '\r\n');
require_once("<path to your app folder>Mage.php");
Mage::app();
$email = "joe@blow.com";
// THE "EASY" WAY (but sends a confirmation email to the customer
$subscriber = Mage::getModel('newsletter/subscriber')->subscribe($email);
// THE "HARD" WAY (Doesn't send confirmation email to customer)
// load up the customer we want to subscribe
$customer = Mage::getModel('customer/customer')
->setWebsiteId(1)
->loadByEmail($email);
// if we found the customer
if ($customer->getId()){
// load up the subscriber if possible
$subscriber = Mage::getModel('newsletter/subscriber')->loadByEmail($email);
if (!$subscriber->getId()
|| $subscriber->getStatus() == Mage_Newsletter_Model_Subscriber::STATUS_UNSUBSCRIBED
|| $subscriber->getStatus() == Mage_Newsletter_Model_Subscriber::STATUS_NOT_ACTIVE) {
$subscriber->setStatus(Mage_Newsletter_Model_Subscriber::STATUS_SUBSCRIBED);
$subscriber->setSubscriberEmail($email);
$subscriber->setSubscriberConfirmCode($subscriber->RandomSequence());
}
$subscriber->setStoreId(Mage::app()->getStore()->getId());
$subscriber->setCustomerId($customer->getId());
try {
$subscriber->save();
}
catch (Exception $e) {
throw new Exception($e->getMessage());
}
}
We do a lot of command line PHP work (CLI = Command Line Interface). Recently we started getting the “Cli has stopped working” error from Windows (our development work is done on Windows systems). We had made several changes leading up to this problem – upgraded to PHP 5.3 and installed the APC byte code cache to be specific.
Well after some experimentation, it appears to be related to using APC in command line php. Changing the following setting solved the problem and we’re back in business:
[APC]
…
apc.enable_cli = 0
…
Ok, I guess the first question is, “why would you?”
Well, as it happens, there are affiliate marketers that will launch the Magento site in their iFrame. One such example is Payment Wall (http://www.paymentwall.com).
So the problem here is that IE (pretty much all versions) won’t pass the Magento session cookie back to the server if the site’s running in an iFrame. No session cookie, no login, no how.
The fix is pretty simple – though it took me a long time to find it!
Add the following to your .htaccess file and, poof, IE sends your cookies back and everybody’s happy!
# Added the following header to enable cookies coming to the site while being hosted in an iframe Header set P3P "policyref=\"/w3c/p3p.xml\", CP=\"NOI DSP COR NID CUR ADM DEV OUR BUS\""