Sorry for too technical explanation.
Let me try to explain it in simpler way.
1) In your module you need to create Model/Repo/Product.php with the content as provided here:
http://kb.x-cart.com/display/XDD/Searching+entities+in+repositories#Searchingentiti esinrepositories-Pull...mplexcondition
Make sure that you specify right namespace though!
2) In the View/Custom/ProductsOnHomePage.php file you should replace the following line:
PHP Code:
$this->allProducts = \XLite\Core\Database::getRepo('XLite\Model\Product')->findAll();
with the next one:
PHP Code:
$this->allProducts = \XLite\Core\Database::getRepo('XLite\Model\Product')->findAllActive();
3) Rebuild the cache.
It should do the trick.
Tony.
Quote:
Originally Posted by minfinger
Tony,
I'm sorry I don't get this. What you wrote on that page, to me, doesn't even vaguely come close to what I've already gotten. I don't understand what needs to go where.
I'm at the end of my rope because none of the old developers I worked with don't even want to to touch XC5 because of well, many reasons.
|