spooks Posted August 11, 2008 Author Share Posted August 11, 2008 I figured out the special_price problem, not the manufacturer problem. I got to the manufactuer problem today. yea, right!! 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...
hard2get Posted August 11, 2008 Share Posted August 11, 2008 yea, right!! I do now know why you are so angry with me. As I told you, I use modified oscommerce + several contributions and I have to get the bugs fixed one by one. The bugs are real! Using your contribution: the special price, is not displayed at all, no matter if it is from new products or not. So, I think this is a real serious bug. You reffer to it in product_listing.php but it is not retrieved from the database! It is your contribution and I really appreciate it but perhaps you resolve the issues, cause it is very hard for one person to parse all that code and see where you made the mistakes. Quote Link to comment Share on other sites More sharing options...
spooks Posted August 11, 2008 Author Share Posted August 11, 2008 (edited) I do now know why you are so angry with me. As I told you, I use modified oscommerce + several contributions and I have to get the bugs fixed one by one. The bugs are real! Using your contribution: the special price, is not displayed at all, no matter if it is from new products or not. So, I think this is a real serious bug. You reffer to it in product_listing.php but it is not retrieved from the database! It is your contribution and I really appreciate it but perhaps you resolve the issues, cause it is very hard for one person to parse all that code and see where you made the mistakes. You said 'there is no product on the page' this has somehow now changed to 'the special price is not displayed' !! Had you said that from the start I would have told you it's not part of the code. The 'special price' code is there for when listing by category etc, as I said special price was never part of products _new which is why I did'nt bother adding it to the sql. Perhaps what you were looking for is featured products, thats been done too. Edited August 11, 2008 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...
hard2get Posted August 11, 2008 Share Posted August 11, 2008 Like I said, today, after parsing the code, I realised that you did not add the manufacturer id to the sql statement and have resolved the problem myself. After that I realised that the problem with the special price was from your code in product_listing also. It does not matter the, the special price is not diplayed and I realised that this is the biggest bug in your code. Why are you offended? I would like that the other peoples who will download your contribution to not go through all your code just to see you missed something in your sql statement and you reffer to the special price in the code but it does not appear on the page. I believe you realise how hard that is. And I do not think that it is from the products_new.php (the special price issue), it is in product_listing.php, because the special price is not displayed at all, no matter the page. Quote Link to comment Share on other sites More sharing options...
spooks Posted August 11, 2008 Author Share Posted August 11, 2008 Like I said, today, after parsing the code, I realised that you did not add the manufacturer id to the sql statement and have resolved the problem myself. After that I realised that the problem with the special price was from your code in product_listing also. It does not matter the, the special price is not diplayed and I realised that this is the biggest bug in your code. Why are you offended? I would like that the other peoples who will download your contribution to not go through all your code just to see you missed something in your sql statement and you reffer to the special price in the code but it does not appear on the page. I believe you realise how hard that is. And I do not think that it is from the products_new.php (the special price issue), it is in product_listing.php, because the special price is not displayed at all, no matter the page. I'm offended because you claim to have found a bug that was never there, adding specials price means an extra join in the query, I don`t believe this should ever be done lighly. special price is not part of product_new, and I see no good reason to add it. If you are having trouble with specials price generaly its due to your code in your index.php not the listing. It bugs me when people find a bug in their code & put up a 'fix' thinking everyone else has their bug too, this has been the cause for contribs getting broken in the past. Before you try blaming others code, try installing on a vanilla install first, then you'll see when its your on duff code thats the issue. This contrib is tested on multiple versions of osC before any version release, it has been downloaded by a large number, don't you wonder why they've not had your problem? 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...
hard2get Posted August 11, 2008 Share Posted August 11, 2008 I'm offended because you claim to have found a bug that was never there, adding specials price means an extra join in the query, I don`t believe this should ever be done lighly.special price is not part of product_new, and I see no good reason to add it. If you are having trouble with specials price generaly its due to your code in your index.php not the listing. It bugs me when people find a bug in their code & put up a 'fix' thinking everyone else has their bug too, this has been the cause for contribs getting broken in the past. Before you try blaming others code, try installing on a vanilla install first, then you'll see when its your on duff code thats the issue. This contrib is tested on multiple versions of osC before any version release, it has been downloaded by a large number, don't you wonder why they've not had your problem? Yeah right!, it is not my buggy code is yours! After I replaced your if (tep_nut_null($listing['porducts_new_special_price']) - or something like that- in your product_listing.php with "if ($new_price = tep_get_products_special_price($listing['products_id'])) {" and updated the correponding strings, it all goes well. Perhaps others did not had special prices, while they were developing their website but hit on the problem after that. I did not post a new realease to your contribution, I just told you about this(but you seem very, very offended) perhaps it will help other in the future. Yes, they are all tested before they are released (perhaps that is the reason why almost all of them have updates with bug fixes!?!?!?!). Are you sure you tested it for every possible scenario, when you say it is bug-less? I do apologise, perhaps I was wrong, but you seemed bugged right from the start. OOO... and yes, it is bug-less, that is why this forum :))) But after all that, this is a great add-on and thank you, very much! Quote Link to comment Share on other sites More sharing options...
lindsayanng Posted August 11, 2008 Share Posted August 11, 2008 ok boys.. now lets calm down. WHY are you pointing fingers? If you found a bug, and you were able to fix it, just post the solution here and be happy. Not everyone is going to have this bug, but if they DID have the bug, and came here, they would easily find the solution.. This way you can be helping people who have the issue, but not cluttering up the contribution with LOADS of confusing bug fixes. Personally, i HATE to see a contribution with a THOUSAND bug fixes from a TON of different contributors. The orignal maker of the code gets lost, and the contributions end up a mess.. BUT since you found a "legitimate" bug with your particular set up, and other people might have a similar set up, the way to make sure others are helped by your fix is to just post here. So lets all calm down and stop pointing fingers and just agree to disagree. Quote A great place for newbies to start Road Map to oscommerce File Structure DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways! HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you Proud Memeber of the CODE BREAKERS CLUB!! Link to comment Share on other sites More sharing options...
spooks Posted August 11, 2008 Author Share Posted August 11, 2008 DON'T DO THAT A note for anyone finding this, if you have this error you have a problem in your index.php or advanced_search_results.php etc etc, this 'fix' is just a work around for that error, whats worse its a fix that adds an extra, un-neccessay sql query, bad for any big site. Should you need any proof that specials price does work, just take a look at the included page views. Remember, product_listing.php does not generate the query, it uses that provided by the calling page. :rolleyes: :rolleyes: :rolleyes: 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 August 11, 2008 Share Posted August 11, 2008 I don't mean to belabor this point, but Sam has pretty clearly in his version listings in his readme that in v1.5: "Added modified new_products.php module with thumbnail option (only shows image, name & price). " I don't' see special price for the new_products page at all. Clearly it wasn't meant to show any special pricing. That means it's not a bug. Nothing in the later versions does he add special pricing to new_products.php If that feature is wanted, certainly someone can request it of him. Quote Link to comment Share on other sites More sharing options...
hard2get Posted August 11, 2008 Share Posted August 11, 2008 You are correct lindsayanng. we should not argue but work toghether instead. If there is no product displayed when switching from thumbnails view to list view you should add ", m.manufacturers_id" or ", p.manufacturers_id" (whithout the quotes) to the $products_new_query_raw. right before the ",m.manufacturers_name". If the products special price is not diplayed you should, at about line 120, find if (tep_not_null($listing['specials_new_products_price'])) { $lc_text = ' <s>' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span> '; and replace it with if ($new_price = tep_get_products_special_price($listing['products_id'])) { $lc_text = ' <s>' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($listing['products_tax_class_id'])) . '</span> '; at about line 178 find: if (tep_not_null($listing['specials_new_products_price'])) { $display .= '<s>' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span><br>'; and replace with: if ($new_price = tep_get_products_special_price($listing['products_id'])) { $display .= '<s>' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($listing['products_tax_class_id'])) . '</span><br>'; and arond line 316 find if (tep_not_null($products['specials_new_products_price'])) { $price = '<s>' . $currencies->display_price($products['products_price'], tep_get_tax_rate($products['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($products['specials_new_products_price'], tep_get_tax_rate($products['products_tax_class_id'])) . '</span>'; and replace it with if ($new_price = tep_get_products_special_price($products['products_id'])) { $price = '<s>' . $currencies->display_price($products['products_price'], tep_get_tax_rate($products['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($products['products_tax_class_id'])) . '</span>'; Perhaps the problem is particular to me, I do apologize. As I said before, great contribution, thank you! Quote Link to comment Share on other sites More sharing options...
hard2get Posted August 11, 2008 Share Posted August 11, 2008 Yes, Sam, you are right, this is just a work around, not a fix. I do not claim to be a fix. And I am lucky I have a small website. That is why I make it myself. I just wanted to get ideeas from you because it is your contribution and you are the one who is most qualified to help me with my problem but I hit a stone wall. And yes, I have special prices on new products! Quote Link to comment Share on other sites More sharing options...
virtue Posted August 12, 2008 Share Posted August 12, 2008 (edited) Hi Sam, Brilliant contrib, thanks a million! :D I am pretty much a coding newbie but am willing to try/learn as much as it takes, so... 1 quick question (sorry if its been answered but haven't been able to find it) Where it displays the price in the product boxes ( I am using the product_thumbnail_listing, but I don't guess that matters?) How do I get it to display the cheapest price ( I am using a quantity price break) and not the most expensive price? :blink: The site is here It is not quite completed, just need to add the product descrips, tighten a few screws and add a finish coat. (The colours, I know, I know... not my choice :) ) Thanks for any help as this has me tearing my hair out! :) Thanks a million! Cheers, Kristy :D Edited August 12, 2008 by virtue Quote Link to comment Share on other sites More sharing options...
spooks Posted August 12, 2008 Author Share Posted August 12, 2008 Hi Sam, Brilliant contrib, thanks a million! :D I am pretty much a coding newbie but am willing to try/learn as much as it takes, so... 1 quick question (sorry if its been answered but haven't been able to find it) Where it displays the price in the product boxes ( I am using the product_thumbnail_listing, but I don't guess that matters?) How do I get it to display the cheapest price ( I am using a quantity price break) and not the most expensive price? :blink: The site is here It is not quite completed, just need to add the product descrips, tighten a few screws and add a finish coat. (The colours, I know, I know... not my choice :) ) Thanks for any help as this has me tearing my hair out! :) Thanks a million! Cheers, Kristy :D There are many quantity price break contribs, what is yours? 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...
spooks Posted August 12, 2008 Author Share Posted August 12, 2008 Up-loaded new version 1.7 Modified thumbnail to improve layout with varying amount of content, added 2 new settings to admin to achieve this, setting vertical space for image & name / description. Modified code so sort & max results drop down will appear at top or bottom of listing as per Prev/Next Navigation Bar. Slimmed some of the code to keep file size small. Added sort option for products_new page. Some have asked for category path in the product url, added an option on line 14 of product_listing.php change setting to 'true' if you want this. Minor bug fix, added manufacturer_id to products_new query so manufacturer link in that listing will work. This update adds some new css for the thumbnail display. Changed files: product_listing.php, new_products.php, products_new.php, product_listing_setup.php css entries. New Settings: Product Listing Image Vertical Space (default 100) Image Vertical Space in thumbnail, set to the height of largest product image. Product Listing Name Vertical Space (default 25) Name Vertical Space in thumbnail, sets vertical space for name & short description (if used). UPGRADING If your upgading from any previous version, run the new setup file it will make any required changes, then replace all the changed files and add the new/changed css entries. This has been tested on PHP 4 & 5, SQL 4 & 5, osC 2.2 ms2, rc1 & rc2a and is register_globals compatible. ;) 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 August 12, 2008 Share Posted August 12, 2008 Oh kewl...I didn't install it yet. *running to download 1.7* Quote Link to comment Share on other sites More sharing options...
virtue Posted August 13, 2008 Share Posted August 13, 2008 There are many quantity price break contribs, what is yours? Thanks sam, it is the: "Simple Price Break" --------------------------------------------------------- Version 2.0: release date 15/03/2007 Thanks!!! Quote Link to comment Share on other sites More sharing options...
webarton Posted August 13, 2008 Share Posted August 13, 2008 As long as 'Product Listing Manufacturers Description' is set to true the description will be displayed in the headings in manufacturer list mode, it is not currently displayed in other display modes. I can only assume you have not selected a manufacturer list mode, as I cannot see any reason this would not work otherwise. Thanks Sam! I'm sorry, I had totally misunderstood as you said. I had been wondering why manufacturers description wasn't shown though I chose 'thumbnails in grid'... sorry! I'd like to show as 'thumbnails in grid' and manufacturers description also. I'd like to try to change the source. product_listing.php should be modified? I really appreciate if you would give me a hint. Regards, aki Quote Link to comment Share on other sites More sharing options...
spooks Posted August 13, 2008 Author Share Posted August 13, 2008 I you wanting the desciption in the header under man name once a man has been selected? 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...
spooks Posted August 13, 2008 Author Share Posted August 13, 2008 I'm not keen on the coding used in that, rather than 'decode' the code, could you post a copy of the raw data in an entry for $product_info['products_discount'] & i'll see what i can come up with. 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...
virtue Posted August 14, 2008 Share Posted August 14, 2008 I'm not keen on the coding used in that, rather than 'decode' the code, could you post a copy of the raw data in an entry for $product_info['products_discount'] & i'll see what i can come up with. Hmm... Sorry, like I said a bit new, do you mean copy an entry from the SQL database? Quote Link to comment Share on other sites More sharing options...
virtue Posted August 14, 2008 Share Posted August 14, 2008 Thats ok actually thanks Sam I had a chat with my hubby about it and he figured it out. I have posted the result in the Tips+Tricks Forum. - Thanks for your help! :) You can see it in action on the site here that I have done for my sister. (Love Job :) ) Quote Link to comment Share on other sites More sharing options...
spooks Posted August 14, 2008 Author Share Posted August 14, 2008 Thats ok actually thanks Sam I had a chat with my hubbyabout it and he figured it out. I have posted the result in the Tips+Tricks Forum. - Thanks for your help! :) You can see it in action on the site here that I have done for my sister. (Love Job :) ) Well done, I do like it when people solve their own problems, & its great when they post their solution, too many don't. 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 August 15, 2008 Share Posted August 15, 2008 Sam, Do you have any idea why I might be getting this sql error when I try to go to product listings: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '&& language_id=1' at line 1 SELECT `products_description` FROM `products_description` WHERE products_id = && language_id=1 [TEP STOP] I've searched for that query in the product_listings.php but can't find it. I'm stymied. Quote Link to comment Share on other sites More sharing options...
Guest Posted August 15, 2008 Share Posted August 15, 2008 i get: Warning: Division by zero in C:\xampp\htdocs\os7\catalog\includes\modules\new_products.php on line 99 any ideas Quote Link to comment Share on other sites More sharing options...
spooks Posted August 15, 2008 Author Share Posted August 15, 2008 i get:Warning: Division by zero in C:\xampp\htdocs\os7\catalog\includes\modules\new_products.php on line 99 any ideas Have you run the setup file?? That must be PRODUCTS_PER_ROW set in admin Product Listing Per Row have you set that to 0!! 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...
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.