File tree Expand file tree Collapse file tree 5 files changed +19
-4
lines changed Expand file tree Collapse file tree 5 files changed +19
-4
lines changed Original file line number Diff line number Diff line change 1818 */
1919class Product extends \Magento \Framework \Url \Helper \Data
2020{
21- const XML_PATH_PRODUCT_URL_USE_CATEGORY = 'catalog/seo/product_use_categories ' ;
21+ public const XML_PATH_PRODUCT_URL_USE_CATEGORY = 'catalog/seo/product_use_categories ' ;
2222
23- const XML_PATH_USE_PRODUCT_CANONICAL_TAG = 'catalog/seo/product_canonical_tag ' ;
23+ public const XML_PATH_USE_PRODUCT_CANONICAL_TAG = 'catalog/seo/product_canonical_tag ' ;
2424
25- const XML_PATH_AUTO_GENERATE_MASK = 'catalog/fields_masks ' ;
25+ public const XML_PATH_AUTO_GENERATE_MASK = 'catalog/fields_masks ' ;
26+
27+ public const XML_PATH_APPLY_TRANSLITERATION_TO_URL = 'catalog/seo/product_url_transliteration ' ;
2628
2729 /**
2830 * Flag that shows if Magento has to check product to be saleable (enabled and/or inStock)
Original file line number Diff line number Diff line change @@ -114,7 +114,14 @@ public function getProductUrl($product, $useSid = null)
114114 */
115115 public function formatUrlKey ($ str )
116116 {
117- return $ this ->filter ->translitUrl ($ str );
117+ if ($ this ->scopeConfig ->getValue (
118+ \Magento \Catalog \Helper \Product::XML_PATH_APPLY_TRANSLITERATION_TO_URL ,
119+ \Magento \Store \Model \ScopeInterface::SCOPE_STORE
120+ )) {
121+ return $ this ->filter ->translitUrl ($ str );
122+ }
123+
124+ return $ str ;
118125 }
119126
120127 /**
Original file line number Diff line number Diff line change 127127 <label >Use Canonical Link Meta Tag For Products</label >
128128 <source_model >Magento\Config\Model\Config\Source\Yesno</source_model >
129129 </field >
130+ <field id =" product_url_transliteration" translate =" label" type =" select" sortOrder =" 9" showInDefault =" 1" showInWebsite =" 1" showInStore =" 1" canRestore =" 1" >
131+ <label >Apply transliteration for product URL</label >
132+ <source_model >Magento\Config\Model\Config\Source\Yesno</source_model >
133+ </field >
130134 </group >
131135 <group id =" price" translate =" label" type =" text" sortOrder =" 400" showInDefault =" 1" >
132136 <label >Price</label >
Original file line number Diff line number Diff line change 4848 <title_separator >-</title_separator >
4949 <category_canonical_tag >0</category_canonical_tag >
5050 <product_canonical_tag >0</product_canonical_tag >
51+ <product_url_transliteration >1</product_url_transliteration >
5152 </seo >
5253 <custom_options >
5354 <date_fields_order >m,d,y</date_fields_order >
Original file line number Diff line number Diff line change @@ -665,6 +665,7 @@ Comma-separated.,Comma-separated.
665665"Page Title Separator","Page Title Separator"
666666"Use Canonical Link Meta Tag For Categories","Use Canonical Link Meta Tag For Categories"
667667"Use Canonical Link Meta Tag For Products","Use Canonical Link Meta Tag For Products"
668+ "Apply transliteration for product URL","Apply transliteration for product URL"
668669"Catalog Price Scope","Catalog Price Scope"
669670"This defines the base currency scope (""Currency Setup"" > ""Currency Options"" > ""Base Currency"").","This defines the base currency scope (""Currency Setup"" > ""Currency Options"" > ""Base Currency"")."
670671"Category Top Navigation","Category Top Navigation"
You can’t perform that action at this time.
0 commit comments