|
Hi,
Just wondering if it was possible to show all products in the same category on the product view page, rather than the ‘related products’.
Here’s what I think I need to do.
1. Create a duplicate of the catalogue\product\list\related.phtml in my local directory and rename it to something like categories.phtml
2. Change that file to get the category listing. I think that must be froom line 58 but I’m not sure how to get the categories rather than related.
function selectAllRelated(){ $$('.related-checkbox').each(function(elem){ elem.checked = true; }); addRelatedToProduct(); }
function addRelatedToProduct(){ var checkboxes = $$('.related-checkbox'); var values = []; for(var i=0;i<checkboxes.length;i++){ if(checkboxes[i].checked) values.push(checkboxes[i].value); } if($('related-products-field')){ $('related-products-field').value = values.join(','); } }
3. in layout\catalogue.xlm change the line at 138 from
<block type="catalog/product_list_related" name="catalog.product.related" before="-" template="catalog/product/list/related.phtml"/>
to
<block type="catalog/product_list_categories" name="catalog.product.categories" before="-" template="catalog/product/list/categories.phtml"/>
But I’m just taking a shot in the dark here and feel like I might also be missing a step.
Heck - I could be waaaay off base and there’s a much easier way to do this.
Any ideas?
Thanks,
Hez
|