Right now, there is the Magento widget of “Catalog Product List”, and template of “Product Grid Template”. This widget allows for me to set conditions of attribute and category to select products I want to display. On the front end it Shows the image, Price, Add to cart, and rating. I want to change what is shown on the front end based of the Attribute set and also display it in more of a list/table style.
Attribute Set 1 has Attributes of 1,2,3,4
Attribute Set 2 has Attributes of 3,5,6,7
In one instance of the widget I want to display products from Attribute Set 1 with this widget but only wish to show the data in the list of SKU, Attribute 1, Attribute 3, Attribute 4 and a Button with link to the product page.
The next instance of the widget I want to display Attribute set 2 Items that are also only within category “X”. But when listing Items from Attribute set 2 I only want to show the data in the list of SKU, Attribute 5, Attribute 6 and a Button with link to the product page
The data being display for each attribute set won't change, from one widget instance to the next. Attribute set 2 will always only display SKU, Attribute 5, Attribute 6 and a Button with link to the product page.. I don't want to select each attribute that is displayed every time I create an instance of this widget.
Can this be achieved by creating a new template file and placing it in my theme, or would I need to create a custom module with my own widget and widget theme file? Am I able to use If statements within the theme file to adjust what displays based on the Attribute set of the product? If I have to create my own module can I extend off the product list widget to change what product information is pulled from the database based on attribute set select when creating the instance of the widget on a cms page in the admin panel?
Solved! Go to Solution.
You can do two way
1) After insert widget into page edit that template file name manually for each attribute set wise.
2) Create module and extend default magento widget
I think 1 one easy solution for you.
Hope it will help you.
If it will work then mark as solution.
No more questions at this time, Thanks for the help I am trying out option 1 right now.