سؤال

أريد إضافة تصنيف حسب التصنيف في عرض قائمة المنتجات.تقييم المنتج ليس سمة، لذا لا يمكنني تعديله في الواجهة الخلفية للماجنتو.

لذلك أعتقد أن أفضل طريقة هي إنشاء وحدة نمطية لهذه المشكلة، لكني لا أعرف كيف.آمل أن تتمكن من مساعدتي؟

يحرر:

المقتطف أدناه من amasty يعمل مثل الحل من http://www.fontis.com.au/blog/magento/sort-products-rated لكن كلاهما يصدر الخطأ التالي على الصفحة الرئيسية فقط:

تم بالفعل الإعلان عن الحقل المرتبط بهذا الاسم المستعار مع تتبع المكدس التالي:

0 /web/magento/app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php(695): Mage::exception('Mage_Eav', 'Zusammengef??hr...')
#1 /web/magento/app/code/local/Mage/Catalog/Block/Product/List.php(98): Mage_Eav_Model_Entity_Collection_Abstract->joinField('test', 'review/review_a...', 'rating_summary', 'entity_pk_value...', Array, 'left')
#2 /web/magento/app/code/local/Mage/Catalog/Block/Product/List.php(154): Mage_Catalog_Block_Product_List->_getProductCollection()
#3 /web/magento/app/code/core/Mage/Core/Block/Abstract.php(918): Mage_Catalog_Block_Product_List->_beforeToHtml()
#4 /web/magento/app/design/frontend/nextlevel/nextlevel-german/template/page/html/midcolumn.phtml(4): Mage_Core_Block_Abstract->toHtml()
#5 /web/magento/app/code/core/Mage/Core/Block/Template.php(241): include('/web/magento...')
#6 /web/magento/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('frontend/nextle...')
#7 /web/magento/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#8 /web/magento/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Core_Block_Template->_toHtml()
#9 /web/magento/app/code/core/Mage/Core/Block/Text/List.php(43): Mage_Core_Block_Abstract->toHtml()
#10 /web/magento/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Core_Block_Text_List->_toHtml()
#11 /web/magento/app/code/core/Mage/Core/Block/Abstract.php(637): Mage_Core_Block_Abstract->toHtml()
#12 /web/magento/app/code/core/Mage/Core/Block/Abstract.php(581): Mage_Core_Block_Abstract->_getChildHtml('midcolumn', true)
#13 /web/magento/app/design/frontend/nextlevel/nextlevel-german/template/page/1column.phtml(40): Mage_Core_Block_Abstract->getChildHtml('midcolumn')
#14 /web/magento/app/code/core/Mage/Core/Block/Template.php(241): include('/web/magento...')
#15 /web/magento/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('frontend/nextle...')
#16 /web/magento/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#17 /web/magento/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Core_Block_Template->_toHtml()
#18 /web/magento/app/code/core/Mage/Core/Model/Layout.php(555): Mage_Core_Block_Abstract->toHtml()
#19 /web/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(390): Mage_Core_Model_Layout->getOutput()
#20 /web/magento/app/code/core/Mage/Cms/Helper/Page.php(137): Mage_Core_Controller_Varien_Action->renderLayout()
#21 /web/magento/app/code/core/Mage/Cms/Helper/Page.php(52): Mage_Cms_Helper_Page->_renderPage(Object(Mage_Cms_IndexController), 'startseite')
#22 /web/magento/app/code/core/Mage/Cms/controllers/IndexController.php(45): Mage_Cms_Helper_Page->renderPage(Object(Mage_Cms_IndexController), 'startseite')
#23 /web/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Cms_IndexController->indexAction()
#24 /web/magento/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('index')
#25 /web/magento/app/code/community/Mdl/UnderConstruction/Controller/Router/Standard.php(72): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#26 /web/magento/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mdl_UnderConstruction_Controller_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#27 /web/magento/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#28 /web/magento/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#29 /web/magento/index.php(87): Mage::run('', 'store')
#30 {main}

يبدو أن هناك خطأ في السمة المخصصة، ولكن تغيير الاسم المستعار لا يعمل بالنسبة لي، لذلك لا أعرف أين تكمن المشكلة، آمل أن تتمكن من مساعدتي :)

هل كانت مفيدة؟

المحلول

لفرز المنتجات حسب التصنيف، يمكنك استخدام التعليمات البرمجية التالية، مأخوذة من هذه الوحدة : giveacodicetagpre.

نصائح أخرى

لإضافة فرز حسب خيار التصنيف في القائمة المنسدلة للفرز حسب Magento، يتعين عليك إجراء التغييرات التالية.أولاً، يجب تغيير طريقة استرجاع المنتجات من قاعدة البيانات، لتشمل التقييم العام (كما هو موضح بعدد النجوم على المنتج) إلى جانب بقية سمات المنتج.انسخ الملف app/code/core/Mage/Catalog/Block/Product/List.php لapp/code/local/Mage/Catalog/Block/Product/List.php وفتح لتحريره.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى magento.stackexchange
scroll top