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;
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.
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;
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.
Magento store owners are having a challenge when using rcah 0.1.0, especially for homepage. The nature of homepage is CMS, most content of it static.
Store owners want their visitors (especially first time visitors) to read static content on the homepage, but static content become obstacles filling in the central area of the page when visitors start to click on filters for refined results.
Root category as homepage 0.1.1 is released to address the problem. It conditionally hides the CMS Block on category pages. It only hides CMS Block in Display Settings of a category (category landing_page attribute). Static CMS Blocks used for others purposes (in sidebar, footer, etc) are not affected.
I must say the conditions when hiding the CMS Block are subtle. Please refer to readme file with the release for details.
In php.ini I set include_path = /first/include/path:/second/include/path, but do not put a file in /first/include/path or /second/include/path, create test.php as simple as this
<?php
require 'tobeincluded.php';
It will run into a fatal error. This error is obvious.
Then I create the file tobeincluded.php in /second/include/path, test.php now runs all right.
Then I create another file with same file name as tobeincluded.php but different content and put it in /first/include/path, test.php keeps running as if /first/include/path/tobeincluded.php does not exist. This is because php apc has cached /second/include/path/tobeincluded.php and ignored /first/include/path/tobeincluded.php. Apc will refresh its cache when it is restarted or original cached file is updated in the file system. I assume apc is checking file timestamp.
Then I copy test.php to test2.php and put test2.php in the same folder as test.php, run test2.php. It renders the same result as test.php – include /second/include/path/tobeincluded.php but ignore the existence of /first/include/path/tobeincluded.php.
Then I copy test.php to test3.php and put test3.php in a different folder (no matter parent folder or child folder or irrelevant folder), run test3.php. Now it is aware of the existence of /first/include/path/tobeincluded.php so /first/include/path/tobeincluded.php is included in test3.php.
Even I trigger to run test2.php in a different virtual host (but same document root), it still renders the same result. I assume php file on the file system is identical to apc. In other words, apc loads cache data by realpath regardless virtual host.
首先 Manage Attributes,设置某 product attribute ‘my_attr’ scope 为 Store view
然后 Manage Products,为 my_attr 设置 default value ‘aaa’,再设置 store view (假设 storeId = 2) value ‘bbb’
然后 Manage Attributes, 把 my_attr scope 改为 Global
然后 Manage Products,Choose Store View (storeId = 2),这时仍可见 my_attr 显示值 ‘bbb’。It means although my_attr scope is changed to ‘Global’, but old store view specific values are not removed.
这时 (my_attr scope is Global) 如果在 Store View (storeId = 2) 状态把 my_attr 的值改为 ‘ccc’,then Save Product。my_attr default value 被改为 ‘ccc’,store view (storeId = 2) value 仍为 ‘bbb’。It means when my_attr scope is ‘Global’, it is not possible using Manage Products GUI to change or remove existing store view value.