Guest Posted November 28, 2009 Share Posted November 28, 2009 I hope this better explains the problem I am having. I installed on the stock oscommerce-2.2ms2-060817 and on a stock oscommerce-2.2rc2a and add Easy Graphical Borders I used stock installs for testing as I have a heavily modified oscommerce-2.2ms2-060817 store, and to verify that that no other contributions are interfering with contribution. I do not use a template. In the Categories info box column left I have: Hardware-> (6) Software-> (4) DVD Movies-> (17) When I click DVD Movies-> (17) The page shows Categories below the breadcrumb and below that New Products For November in a Graphical Border. I then click category (Action) and the page shows (Let's See What We Have Here) below the breadcrumb and the title (Action) is in the Graphical Border where the products are displayed. All is good so far. I then add a NEW category in admin called Test (no sub categories) In the Categories info box column left I now have: Hardware-> (6) Software-> (4) DVD Movies-> (17) TEST (1) When I click TEST (1) The page shows (Let's See What We Have Here) below the breadcrumb and below that (Graphics Cards) in a Graphical Border where the products are displayed instead of (Test). Quote Link to comment Share on other sites More sharing options...
spooks Posted November 28, 2009 Author Share Posted November 28, 2009 Thanks, your expenation is clear # I'm afraid your issue is not with this though, this mearly displays the sql that is passed to it: index.php builds the query, then product_listing.php outputs the query having passed it through the split_page_results.php class for pagination. graphical borders mearly wraps the tables in styled borders, again does nothing with the data. so your problem is in index.php, but there is a bug in some versions of osC (don't recall exact details) that tends to occur when displaying a category that has no products, perhaps your issue? Quote Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al. Link to comment Share on other sites More sharing options...
Guest Posted November 28, 2009 Share Posted November 28, 2009 Thanks for the reply, I did find while checking index that there is a miss spelling, see below: $category_depth = 'top'; if (isset($cPath) && tep_not_null($cPath)) { $categories_products_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'"); $cateqories_products = tep_db_fetch_array($categories_products_query); if ($cateqories_products['total'] > 0) { $category_depth = 'products'; // display products } else { Note the q instead of g, this seems to appear in every version of oscommerce I downloaded. I changed them to g but same problem, I'll search the forum for problems with index. Just a note, I did have one product in the TEST category. I'll add another just to be sure. I'll report back my findings. Thanks Quote Link to comment Share on other sites More sharing options...
arash.najafi Posted November 28, 2009 Share Posted November 28, 2009 (edited) Very slow to load (most will leave if no content within 7 secs) I suspect you have too much on home page, big files etc. Your site has serious errors, you have 2 head and 2 body sections, you must have only one of each. you are right... how did you find out??? :o :o :o i double checked it and you were right what do you suggest to have a light site that appears in 7 seconds??? install ver. 3 or not? :thumbsup: :thumbsup: :thumbsup: thankyou for hellping me dude :rolleyes: :rolleyes: Edited November 28, 2009 by arash.najafi Quote Link to comment Share on other sites More sharing options...
spooks Posted November 29, 2009 Author Share Posted November 29, 2009 you are right... how did you find out??? i double checked it and you were right what do you suggest to have a light site that appears in 7 seconds??? install ver. 3 or not? thankyou for hellping me dude I don't think that would help, osC 2.2 can do it fine, but if you add too much & don't manage your file sizes things get too big & slow. Ie with this there have been many changes to the listing file, but each time the file size change is small, sometimes it goes down!!. You just have to be efficient with your code, the first project I ever did had to fit in a 8k memory space, now there's loads of memory, but its bad to use the MS method & bloat your code. Quote Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al. Link to comment Share on other sites More sharing options...
Ken44 Posted November 29, 2009 Share Posted November 29, 2009 Hi Sam I hope you like it Like it……………………We think it’s great Could you please take a look at new_products.php line 29 $image = (!$grid && $column_list[0] == 'PRODUCT_LIST_IMAGE' ? '<br>' : '') . $link . tep_image(DIR_WS_IMAGES . $image, ($addimages ? (tep_not_null($selected_image['images_description']) ? $selected_image['images_description'] : (tep_not_null($selected_image['products_image_description']) ? $selected_image['products_image_description'] : $products['products_name'])) : $products['products_name']), PRODUCT_IMAGE_WIDTH, '') . '</a>' . '<br>'; This code is causing the images to be distorted. My images are square but this code causes the images to display at 160px × 42px I replace the line with this (from product_listing.php) $image = (!$grid && $column_list[0] == 'PRODUCT_LIST_IMAGE' ? '<br />' : '') . ' <span class="ttip">' . $link . tep_image(DIR_WS_IMAGES . $image, $alt_text, PRODUCT_IMAGE_WIDTH, PRODUCT_IMAGE_HEIGHT) . ($ttip ? tep_image(DIR_WS_IMAGES . $image, $alt_text, $ttip_width, '', 'class="large"') : '' ) . '</a></span>' . '<br />'; and now the images display correctly at 160px × 160px however I have lost the Alt text and title Text Regards Ken Quote Link to comment Share on other sites More sharing options...
spooks Posted November 29, 2009 Author Share Posted November 29, 2009 and now the images display correctly at 160px × 160px however I have lost the Alt text and title Text I bet you have a thunbnailer installed!! anyway just add $alt_text = $products['products_name']; b4 that line to restore the text. rglondon 1 Quote Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al. Link to comment Share on other sites More sharing options...
Ken44 Posted November 29, 2009 Share Posted November 29, 2009 Hi Sam Thanks. The new products module is working fine now I do have On the Fly' Auto Thumbnailer using GD Library installed. I have never had a problem with it before. I did notice from an earlier post that you recommend osCThumb without filename encryption. At least we have a solution in case anyone else is using On the Fly' Auto Thumbnailer Regards Ken Quote Link to comment Share on other sites More sharing options...
spooks Posted November 29, 2009 Author Share Posted November 29, 2009 Hi Sam Thanks. The new products module is working fine now I do have On the Fly' Auto Thumbnailer using GD Library installed. I have never had a problem with it before. I did notice from an earlier post that you recommend osCThumb without filename encryption. At least we have a solution in case anyone else is using On the Fly' Auto Thumbnailer Regards Ken Yes, I`ve seen that with that b4, the issue is the due to bugs in its code, if you only pass one size paramater (as you don't want your ratios distorted) with many image sizes it totally messes the calculation, hence your very odd output size. Quote Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al. Link to comment Share on other sites More sharing options...
inforgm Posted November 30, 2009 Share Posted November 30, 2009 Hi all. Spooks, thank you for this great contribution,one of the best i´ve tried so far. I have 2 questions, and i hope you could help me. I´ve installed the contrib and everything is working well. But i´m trying to add a quantity box to the product info page, but all of the contribs i see, changes your contrib in the product listing page. Could you help me to figure this out ? Then, i would like, if its possible, to change the quantity box for a dropdown box. Thank´s in advance. Keep up the good work. Quote Link to comment Share on other sites More sharing options...
spooks Posted November 30, 2009 Author Share Posted November 30, 2009 Hi all. Spooks, thank you for this great contribution,one of the best i´ve tried so far. I have 2 questions, and i hope you could help me. I´ve installed the contrib and everything is working well. But i´m trying to add a quantity box to the product info page, but all of the contribs i see, changes your contrib in the product listing page. Could you help me to figure this out ? Then, i would like, if its possible, to change the quantity box for a dropdown box. Please don't ask unrelated questions in existing threads (hijacking), its rude. In any case you need to look first better, see my list of contribs!!! Quote Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al. Link to comment Share on other sites More sharing options...
inforgm Posted November 30, 2009 Share Posted November 30, 2009 (edited) Please don't ask unrelated questions in existing threads (hijacking), its rude. In any case you need to look first better, see my list of contribs!!! Sorry, if i shouldn´t ask those questions in this thread. I allready tried one of your contributions " Product Quantity Drop Down Box in Product Info V1.1" but i couldnt make it work because the changes that were made in application_top, while installing "Product Listing Enhancements, Thumbnails & Manufacturer Headings". I don´t know too much of php. Sorry for my english. In catalog/includes/application_top.php Around Line 364 Find: $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+1, $HTTP_POST_VARS['id']); Replace With: $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id'])) + (int)$HTTP_POST_VARS['quantity'], $HTTP_POST_VARS['id']); This code was changed, and i dont know what to do. I hope you understand why i´m asking in this thread. If you cant help me, at least point me a way, please. I´m stuck. Thanks Edited November 30, 2009 by inforgm Quote Link to comment Share on other sites More sharing options...
spooks Posted November 30, 2009 Author Share Posted November 30, 2009 (edited) Use this with product quantity drop down ( http://addons.oscomm....com/info/5553 ) name='inforgm' date='30 November 2009 - 04:35 PM' timestamp='1259598911' post='1462373'] OK, you should have said that from the start, its always best to say exactly what you tried & what issue you have with it in your initial post, gets quicker, better answers. The solution is a slight mod to the new code in app top: new code has: $add_quantity = max((int)$_POST['cart_quantity'],1); add after: $add_quantity = max((int)$_POST['quantity'],$add_quantity); Edited November 30, 2009 by spooks Quote Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al. Link to comment Share on other sites More sharing options...
enge Posted November 30, 2009 Share Posted November 30, 2009 Hi Sorry to post here, but I'm a newbee on this forum and my english is very too bad, and I try to install this Add-Ons. But when I extract zip file, a password is needed on few files... I don't saw how to do.... Please help me ! Moderator be tolerant please ;-) Thanks Enge Quote Link to comment Share on other sites More sharing options...
spooks Posted November 30, 2009 Author Share Posted November 30, 2009 Hi Sorry to post here, but I'm a newbee on this forum and my english is very too bad, and I try to install this Add-Ons. But when I extract zip file, a password is needed on few files... I don't saw how to do.... Please help me ! Moderator be tolerant please ;-) Thanks Enge file is not protected, could be a windows error, download again & maybe try using ultimate zip to open. Quote Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al. Link to comment Share on other sites More sharing options...
enge Posted November 30, 2009 Share Posted November 30, 2009 Exactly ! What newbee I am !!! ??? Thanks a lot Spooks. I going to try it ... Quote Link to comment Share on other sites More sharing options...
dandelion Posted December 1, 2009 Share Posted December 1, 2009 file is not protected, could be a windows error, download again & maybe try using ultimate zip to open. I had to create a different folder... my winzip didn't like the long folder names. Then I was able to unzip the file. Hope this helps you Quote Link to comment Share on other sites More sharing options...
enge Posted December 1, 2009 Share Posted December 1, 2009 I had to create a different folder... my winzip didn't like the long folder names. Then I was able to unzip the file. Hope this helps you I installed Ultimate Unzip to try , and it works with it. thank you. Quote Link to comment Share on other sites More sharing options...
inforgm Posted December 1, 2009 Share Posted December 1, 2009 Use this with product quantity drop down ( http://addons.oscomm....com/info/5553 ) OK, you should have said that from the start, its always best to say exactly what you tried & what issue you have with it in your initial post, gets quicker, better answers. The solution is a slight mod to the new code in app top: new code has: $add_quantity = max((int)$_POST['cart_quantity'],1); add after: $add_quantity = max((int)$_POST['quantity'],$add_quantity); Thank you :thumbsup: , everything is working fine in product info. I only have one more issue, how to change the quantity box for a dropdown box, in product listing. Is it possible ? Quote Link to comment Share on other sites More sharing options...
AndrewKay Posted December 1, 2009 Share Posted December 1, 2009 (edited) Hi, Great contribution. I have one question: How can I center my price (and product title) on the product list? Edited December 1, 2009 by AndrewKay Quote Link to comment Share on other sites More sharing options...
spooks Posted December 1, 2009 Author Share Posted December 1, 2009 No css styles go over the install again & complete all stages fully. the default is centered. Quote Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al. Link to comment Share on other sites More sharing options...
Ken44 Posted December 1, 2009 Share Posted December 1, 2009 Hi Andrew I had the same problem. It is caused by the descriptions which wrap onto two lines. The solution is to go to Admin - Product Listings and increase the Product Listing Name Vertical Space Hope this helps Ken Quote Link to comment Share on other sites More sharing options...
Ken44 Posted December 1, 2009 Share Posted December 1, 2009 Too late to edit the above post My post was referring to the vertical centering. Sam is still correct. There must be something else wrong for the horizontal centering Ken Quote Link to comment Share on other sites More sharing options...
spooks Posted December 1, 2009 Author Share Posted December 1, 2009 how to change quantity box to a dropdown box, in product listing. Is it possible ? This will be an option on the next release, but for now; replace: if (PRODUCT_LIST_QUANTITY_BOX == 'true' && strstr(LISTING_BUTTON, 'buy now')) { if (tep_has_product_attributes($products_id) && PRODUCT_LIST_OPTIONS != 'true') return false; else return '<table cellspacing="0" cellpadding="2"><tr><td class="quantity" >' . QUANTITY . tep_draw_input_field('cart_quantity' . ($multi_add ? '[]' : '') , ($multi_add ? '0' : '1') , 'maxlength="5" size="2" id="qid'.$products_id.'"') . ($multi_add ? tep_draw_hidden_field('products_id[]', $products_id) : '') . '</td><td><a href="javascript:changeValue(document.getElementById(\'qid'.$products_id.'\'),1);">' . tep_image_button('btn_up.gif',MORE) . '</a><br><a href="javascript:changeValue(document.getElementById(\'qid'.$products_id.'\'),-1);">' . tep_image_button('btn_down.gif',LESS) . '</a></td></tr></table>'; } else { return false; } with: if (PRODUCT_LIST_QUANTITY_BOX == 'true' && strstr(LISTING_BUTTON, 'buy now')) { if (tep_has_product_attributes($products_id) && PRODUCT_LIST_OPTIONS != 'true') return false; else $qty_array = array(); $pstock = min(tep_get_products_stock($products_id),MAX_QTY_IN_CART); for ($i=0; $i<=$pstock; $i++) { $qty_array[]=array('id' => $i, 'text' => $i); } return ($pstock ? QUANTITY . tep_draw_pull_down_menu('cart_quantity'.($multi_add ? '[]' : ''),$qty_array,($multi_add ? 0 : 1)) : '') . ($multi_add ? tep_draw_hidden_field('products_id[]', $products_id) : ''); } else { return false; } Not fully tested, so I hope it all works. Quote Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al. Link to comment Share on other sites More sharing options...
AndrewKay Posted December 1, 2009 Share Posted December 1, 2009 Hi, I tried a fresh install (price is centered now), but not all of the item text is being centered the left hand side ones on here are not centered. On my homepage where it shows 'all' new products, the 3 latest items I created, the text is aligned to the left (price is centered) 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.