Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#26 12-31-2010 05:52:22

jonsidneyb
Member
Registered: 06-07-2006
Posts: 158

Re: If an Item Sold, Set to "Not Viewable by Anyone"

I like this.

Is this possible to have as an option for some items but not all items?

Offline

 

#27 12-31-2010 13:08:40

Graham
Member
Registered: 09-30-2004
Posts: 981
Website

Re: If an Item Sold, Set to "Not Viewable by Anyone"

I'm not sure, but I'd think that you'd need to add an extra field in the Product file database so you can specify which products would or would not be viewable when they're out of stock.

Offline

 

#28 06-18-2013 06:10:08

kidsandco
Member
Registered: 02-12-2005
Posts: 264
Website

Re: If an Item Sold, Set to "Not Viewable by Anyone"

dh783 wrote:

In  your private_dir/apps/ecom/ECOM_Order/ext in the 0300_inventory.php script find this code

Code:

               if ($inv <= 0) {$inv = '0';}

               $data = array('invlevel' => $inv);

               $update_clause = $this->CORE_DB->clause_update(array('table'      => $table,
                                                                    'data'       => $data));

and change like

Code:

 
              if ($inv <= 0) {$inv = '0';}

               $data = array('invlevel' => $inv,
                             'prodview' => 'N');

               $update_clause = $this->CORE_DB->clause_update(array('table'      => $table,
                                                                    'data'       => $data));

this will set any item set for decllining inventory to not viewable by anyone when inventory reaches zero.

John

I just implemented this on a new install of ccp7, and during testing I have noticed that items get set as 'not viewable by anyone' even when the inventory does not reach 0. Upon looking at the code it seems like the update clause will always set 'prodview' => 'N' regardless of what the inventory level is at?

Any help will be much appreciated as I need to fix this quite urgently


K.R.
Kids & Co. Wholesale

Offline

 

Board footer