Open ma4nn opened 2 months ago
Please re-check ... cache-key DIRECTORY_COUNTRY_SELECT_STORE_
is used at several places ... (not tested nothing, just an idea)
Please re-check ... cache-key
DIRECTORY_COUNTRY_SELECT_STORE_
is used at several places ... (not tested nothing, just an idea)
@SuSiSonnenschein111 thanks for your feedback (although it could have been a little bit more detailed).
By "several places" you mean Mage_Catalog_Model_Product_Attribute_Source_Countryofmanufacture
?
But I agree, the result before sorting should be cached, I've pushed the change and extended the testing scenarios.
Moreover probably Mage_Catalog_Model_Product_Attribute_Source_Countryofmanufacture::getAllOptions()
and Mage_Directory_Block_Data::getCountryHtmlSelect()
should also be refactored further to remove the code duplication..
Looks good so far ..., but for some reason i have a wrong translation for country selction dropdown ...
It is not related to this PR ... i see the same on main-branch.
The only occourence of "Allemagne" is in vendor/shardj/zf1-future/library/Zend/Locale/Data/fr.xml.
Description (*)
This PR backports a feature from Magento 2 (in a nicer way with option groups) that allows to configure countries that will be shown on top of the country list ("popular countries").
Also the code duplication for
Mage_Checkout_Block_Onepage_Abstract::getCountryHtmlSelect()
andMage_Directory_Block_Data::getCountryHtmlSelect()
is removed.In addition a new event
directory_get_top_countries
is added, that allows to customize the logic (e.g. to determine top countries automatically from quotes/orders).Related Pull Requests
Fixed Issues (if relevant)
Manual testing scenarios (*)
Repeat the following tests 1.-5. for country dropdown in
country_of_manufacture
uses non-sorted country list in backendcountry_of_manufacture
can be displayed correctly on product detail pageQuestions or comments
Contribution checklist (*)