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.
Pages: 1
Hello:
How do you remove the category image and description from certain categories? Thanks for any help provided.
Offline
Hi
Depends on what you want to do.
You could have a look in: /core-private/apps/ecom/ECOM/includes/catshow.php
and adjust to suit or within each category ( System Dashboard > Store > Catalog > Categories ), have a look at the Display and select the relevant entry from Sub-Category Display Type.
Hope this make sense.
Terry
Last edited by tguswell (07-13-2015 11:06:28)
Offline
How can this be achieved through catshow.php? There's only certain categories that I need to remove the cat image and description so using the sub-category display isn't a good option. Thanks.
Offline
Use Raw DB Admin to add a new column to the ecom_cat table. Use the id 'customcatcontrol' (or whatever). Set it as a integer type, with a length of 1 and make it required. Add an appropriate name and description to it. After adding, execute this SQL in Raw DB Admin:
UPDATE core_columndefs SET cinsdisplaytype='SELECT-BOOL', cinsdefaultvalue=0, cupddisplaytype='SELECT-BOOL' WHERE cid='ecom_cat.customcatcontrol'
From there, go into Manage Categories and set the value for your new field to true (1) for any of these special categories. You'll have a true/false dropdown there for the new field.
Once you're done setting up the database and data, edit {private}/apps/ecom/ECOM/includes/catshow.php file and the data will be available as the $catshow['customcatcontrol'] field. 0 for off, 1 for on, write an if statement as appropriate to do what you want.
Offline
Nick
There appears to be a slight typo in your SQL command:
UPDATE core_columndefs SET cinsdisplaytype='SELECT-BOOL', cinsdefaultvalue=0, cupddisplaytype='SELECT-BOOL' WHERE id='ecom_cat.customcatcontrol'
should be
UPDATE core_columndefs SET cinsdisplaytype='SELECT-BOOL', cinsdefaultvalue=0, cupddisplaytype='SELECT-BOOL' WHERE cid='ecom_cat.customcatcontrol'
Terry
Offline
Pages: 1