0

I have a designed theme that i like and i have to manually set cross sells and up-sell and related products. If i install an extension from third party, the design will not be the same. I would like to use the theme design, the same way products are displayed when I set them manually, but just automate the process. How do I do that without the need to install third party extension and redesigning its theme?

0

Enterprise Edition has some nice features to handle this. On CE, you can overwrite the cross-sell/up-sell blocks or the product model and add the logic of your choice to populate those areas.

Look at the _prepareData function in

app/code/core/Mage/Catalog/Block/Product/List/Crosssell.php

or

app/code/core/Mage/Catalog/Block/Product/List/Upsell.php

Of course, it goes without saying, DO NOT edit core code. Do a proper overwrite of them and customize only the functions you need.

I assume that $product->getUpSellProductCollection() is going to be empty, so you may need to either add some logic here to extend that collection, or probably preferably overwrite the product model and update the getUpSellProductCollection and getCrossSellProductCollection functions.

Those functions can be found here:

app/code/core/Mage/Catalog/Model/Product.php

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.