Hi,
I’m currently changing some functions of Boonex Store, to suit my needs.
Actually, I have a store where users can manage their quantities for each item published.
But i have a problem to modify the function which display recent items. I want that the items which will be display in store home page are the elements which they have less 1 more quantity available ( I have created a new fields in database -->bx_store_products named "quantity").
I'm trying to edit the method "getBlockCode_Recent()" in "BxStorePageMain.php" by changing
return $this->ajaxBrowse('recent', $this->oDb->getParam('bx_store_perpage_main_recent'));
with
return $this->ajaxBrowse('recentAvailable', $this->oDb->getParam('bx_store_perpage_main_recent'));
Then I edited the method "AuStoreSearchResult()" in "BxStoreSeachResult.php" and I added a new case in the "switch" :
case 'recentAvailable':
$this->aCurrent['restriction']['quantity'] = array('value' => '0', 'field' => 'quantity', 'operator' => '!=');
$this->sBrowseUrl = 'browse/recentAvailable';
$this->aCurrent['title'] = _t('_au_store_page_title_browse_recent');
break;
I took the model of "case:'free'", but it's displaying all items (with items which have 0 quantity).
I don't really understand how I can add a filter to display only items which have more than 0 quantity
Do you have an idea or a track ?
Thank you.
Aleks