这次升级初看很成功,随后就发现百密中有一疏。我装有 protx standard (for SagePay Form integration),顾客在重定向到 SagePay 付款时,表单预填的数据是别人的。原因是测试服务器的跟销售有关数据是生产服务器若干天前的,eav_entity_store 表里保存有 increment_last_id,我从测试服务器往生产服务器导入所有 catalog 和 eav 开头的表,导致 magento 再次分配几天已分配过的 order ID 给新订单。如果顾客在重定向到 SagePay 后点击 cancel,会导致同订单号的老订单 status change to cancelled。
ID 重复是一个很低级的错误,我不应该去导入 eav_entity_store 表。我是知道这张表的作用的,这个错误应该归咎于我考虑不周到。
In Gmail, type “-in:inbox” or “!in:inbox” in search box and click “Search Mail”,what emails will show up? All emails not in inbox? Not exactly.
You know Gmail delivers conversions instead of emails as search result, so let’s use terminology conversion. Does “-in:inbox” come up with all conversions not in inbox? No, again.
The collection of “-in:inbox” is all conversions not in inbox plus those conversions originated by me or to which I responded.
When to use:
Magento has a native “buy x get y” sales rule in promotions. Magento’s x and y refer to a same product. For example, if a product offer is “buy 3 get 2”, you have to buy 5 of this product then only pay for 3 of them.
Quite often the store owners want to give an offer which let customers choose from a wide range of products, (the programme add them up, get a total quantity of subselect), and offer another selection of products for free. It is useful if the store have two ranges of products, among which prices are almost the same. Let’s make it clear to you: in this module, “buy x get y” means “Buy X selection of products, Get another Y selection for free”.
How to install:
Copy the whole “app” folder, merge to magento/app. That’s it.
If you are logged in Magento backend when doing installation, that’s fine. But you have to log out and log in again to access Buy X Get Y configuration section in System Configuration.
How to use:
Log in Magento backend, go to Promotions -> Shopping Cart Price Rules, create a new rule whose name must start with “[bxgy]”;
In “Rule Information” tab, apart from the Rule Name, set up everything else as if it is normal Magento sales rule;
Screenshot: Rule Information
In “Conditions” tab, create a product total quantity subselect. The product subselect should match the selection of X product in the offer, and condition is “equals or greater than”, and quantity should match the quantity of X product used as qualifier;
* Do not create more than one subselect. Result is unpredictable otherwise.
* The condition must be “equals or greater than” and the quantity must be the threshold quantity of the offer. Although the calculation of the free quota of Y product is not dependent on the quantity (it is dependent on the settings in “Actions” tab), the offer validation is still Magento original logic. This module changes the discount amount after the offer validation. In other words, you must think about when to trigger Magento native “buy x get y”, and do the same conditions for this module.
Screenshot: Conditions
In “Actions” tab, set Apply to “Buy X get Y (discount amount is Y)” (although this is not normal buy_x_get_y action, the program still check this simple_action), set Discount amount to offer free quota, set Maximum Qty Discount is Applied to to 0, set Discount Qty Step (Buy X) to offer quantity qualifier. For example, if the offer is “buy any 3 of X products, and get any 2 of Y products free”, then set Discount amount to 3, set Maximum Qty Discount is Applied to to 0, set Discount Qty Step (Buy X) to 2. Then, in “Apply the rule only to cart items matching the following conditions (leave blank for all items)”, create a combination of conditions which match the selection of Y product in the offer. Multi combination is OK;
Screenshot: Actions
In “Label” tab, enter the offer labels as normal. It is not required, but if you leave it blank, the “ugly” Rule Name “[bxgy]***” will be used is discount description;
Now save the rule, and go to System -> Configuration -> Buy X Get Y -> Buy X selection of products, Get another Y selection for free, set up the offer reminder message in cart. It is not required. And if it is not set up, the offer is still taking effect as long as the sales rule is enabled.
How is it created:
This module is created by koukou1985’s module creator (http://www.magentocommerce.com/wiki/custom_module_with_custom_database_table). Thanks to koukou1985.
How good is it:
This module does not override any Mage classes. It is safe to use with other extensions as long as namespace and module name do not conflict.
FAQ:
Q: Why this module does not work?
A: I won’t cover all reasons that make my module not working. I only point out caveats of my module, and expect you to have common knowledge of Magento, such as “refresh the cache to see the newly installed features”. All caveats are in above sections. So, if you are stuck, go back to the top and read again.