cancel
Showing results for 
Search instead for 
Did you mean: 

How to get 'other items from this collection' with add to cart on product page

How to get 'other items from this collection' with add to cart on product page

We sell furniture so we are selling a lot of items that belong in collections such as full bedroom sets, living room sets etc and want to make it as easy as possible for the customer to add other items from the same collection to cart while viewing a product.

 

Sort of like related products but for products in the same collection only. 

 

Here is an example of what I mean:

 

https://gyazo.com/7a393d10b84f3069dbcd52dc8bea9fb1

 

Also, am using the Ultimo theme and Magento version 1.9

 

Thanks!

Paul

2 REPLIES

Re: How to get 'other items from this collection' with add to cart on product page

You'll have to create new block which will gather those products for you.

Code snippet should be like:

$currentProduct = Mage::registry('current_product');
$collection = Mage::getModel('catalog/product')->getCollection()
    ->addAttributeToSelect(Mage::getSingleton('catalog/config')->getProductAttributes())
    ->addMinimalPrice() //add prices to select
    ->addFinalPrice()
    ->addTaxPercents()
    ->addAttributeToFilter('colleciton', array('eq'=>$currentProduct->getCollection());
Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($collection);
Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($collection);

All you have to do is to iterate through this collection.

 

 

If this response was helpful to you, consider giving kudos to this post.
If this response solved your problem, click accept as solution to help others solve this issue

Re: How to get 'other items from this collection' with add to cart on product page

@sdmfurniture

 

I know my magento has the option to add related products to other products while in their admin edit screens. What it does for me is shows them on the right of the product in the frontend. It should be available to you as an option if you are using ultimo theme. May not be exactly what you are looking for, but it is a start.