Questions tagged «visibility»

1
如何在Magento2中覆盖静态方法
插件拦截器和优先级覆盖不适用于静态方法。 需要重写Magento \ Catalog \ Model \ Product \ Visibility中的getOptionArray方法 以返回自定义可见性 /** * Retrieve option array * * @return array */ public static function getOptionArray() { return [ self::VISIBILITY_NOT_VISIBLE => __('Not Visible Individually'), self::VISIBILITY_IN_CATALOG => __('Catalog'), self::VISIBILITY_IN_SEARCH => __('Search'), self::VISIBILITY_BOTH => __('Catalog, Search') ]; } 还有其他方法可以实现吗?
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.