Guest mattski Posted September 30, 2005 Share Posted September 30, 2005 Hi, When viewing my product categories I see the ones I have configured but I also see a 'There are no products in this department' dialogue (I edited the language file btw). Have you got any idea what could be causing this as the category does have products or sub-categories defined. Could it be the sales stuff? thanks, Matt Quote Link to comment Share on other sites More sharing options...
Guest melchior Posted September 30, 2005 Share Posted September 30, 2005 Hello, Find: 'no_prods_in_cat' => "There are no products in this category.", in your lang.inc.php file and you can alter the quoted text as you like. Worked for me. Be shure to leave 'no_prods_in_cat' => as it is. Regards Peter Melchior Quote Link to comment Share on other sites More sharing options...
Guest vrakas Posted September 30, 2005 Share Posted September 30, 2005 Hi melchior It is nice that the first post of someone is to help someone and not for a question Welome aboard :P Quote Link to comment Share on other sites More sharing options...
Guest estelle Posted September 30, 2005 Share Posted September 30, 2005 Hi, When viewing my product categories I see the ones I have configured but I also see a 'There are no products in this department' dialogue (I edited the language file btw). Have you got any idea what could be causing this as the category does have products or sub-categories defined. Could it be the sales stuff? thanks, Matt I'm not sure I understand exactly what you mean.... But if your saying that the message is showing up in some categories even when that category isn't empty, thats because this text will always show up when the category contains no products, regardless of whether the category contains subcategories. Personally i modified my cart so that if there are: - no products, but some subcategories, no text will be displayed - no products and no subcategories, the text "sorry, this category is empty" will be displayed. Quote Link to comment Share on other sites More sharing options...
kinetic Posted September 30, 2005 Share Posted September 30, 2005 I modified it to say to look in the sub category or Mfg entrys be nice to have your hack tho estelle why not post what you did to make it not show if not porudcts but there were subcats and to make it show if no subcats and no products be a cool hack to share with folks Quote Link to comment Share on other sites More sharing options...
Guest estelle Posted September 30, 2005 Share Posted September 30, 2005 K. I even added a message for if the category is not found. Open includes/content/viewCat.inc.php. Replace this block: } else { $view_cat->assign("TXT_NO_PRODUCTS",$lang['front']['viewCat']['no_prods_in_cat']); $view_cat->parse("view_cat.noProducts"); } With this block (leave the mispelled subCategoroies as is!!): } else if(isset($_GET['catId']) && $_GET['catId']>0 && $subCategoroies == TRUE) { // Estelle - if no products, but there were subcats, then no need to display anything else } else if(isset($currentCat[0]['cat_name'])) { // Estelle - if no products and no subcats, display category empty message $view_cat->assign("TXT_NO_PRODUCTS",$lang['front']['viewCat']['cat_is_empty']); $view_cat->parse("view_cat.noProducts"); } else { // Estelle - if no category, display category not found message $view_cat->assign("TXT_NO_PRODUCTS",$lang['front']['viewCat']['cat_not_found']); $view_cat->parse("view_cat.noProducts"); } Open your lang.inc.php. Find this line: 'no_prods_in_cat' => "There are no products in this category.", Add these lines below it: 'cat_is_empty' => "This category is empty.", 'cat_not_found' => "Sorry, that category code could not be found.", Cheers! Quote Link to comment Share on other sites More sharing options...
kinetic Posted September 30, 2005 Share Posted September 30, 2005 I think brooky redid the misspelled categoroeis in the 3.0.3... and spelled it right thanks for the hack estelle just added your hack and yeah I had to change $subCategoroies to $subCategories IM at CC3.0.4 hack works a treat nice work Estelle Kinetic Quote Link to comment Share on other sites More sharing options...
Guest mattski Posted September 30, 2005 Share Posted September 30, 2005 thanks guys, I've made the revision and fixed the spelling mistake - looks fixed now. Quote Link to comment Share on other sites More sharing options...
Guest estelle Posted September 30, 2005 Share Posted September 30, 2005 No worries . Enjoy! Quote Link to comment Share on other sites More sharing options...
Guest melchior Posted October 1, 2005 Share Posted October 1, 2005 Hi melchior It is nice that the first post of someone is to help someone and not for a question Welome aboard Thanks. I'm using CC 3.0.3. for selling my stuf, and also for taking a crashcourse in PHP. And the forum gives a lot of answers (which I sure had ) when installing and starting CC. I think it is a very easely to manage shop, compared to the others I took a look at. Pretty compehensive. The only little disadvantage it has IMHO is when you are managing products, (Show products) there is a very limited number of pages (3) to select from shown at the bottom, I should like to have at least 25 pages in a row. Regards, Peter Melchior Quote Link to comment Share on other sites More sharing options...
Guest estelle Posted October 1, 2005 Share Posted October 1, 2005 In admin/products/index.php on line 327 it calls the function $db->paginate(...). This function is located in classes/db.inc.php on line 101, function paginate(...). It appears the number of previous and next pages are set on line 131: $upper_limit = $pageNum + 3; $lower_limit = $pageNum - 3; BUT: Be aware that this is the exact same function that is used for customers viewing your shop. So if you only change line 131/132, you will be affecting not only the admin view, but also the front end view (of category listings, search results, etc). BTW: if you wanted to change the number of products shown per page, for Admin View Products only, this is hardcoded in admin/products/index.php on line 49: $productsPerPage = 25; Quote Link to comment Share on other sites More sharing options...
Guest melchior Posted October 1, 2005 Share Posted October 1, 2005 Hi Estelle, Thanks. I figured out shortly after asking to alter the figures in db.inc.php Took me a while to find the proper PHP file. If visitors have the same options when viewing products I don't mind, maybe by seeing more they buy more Regards, Peter Melchior Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.