designbysue Posted January 26, 2010 Share Posted January 26, 2010 OK that was stupid (I had the old product_lising on my local system - no wonder I couldn't find it. Anyway I tried all manner of removing the <br /> in that line and it screwed up the entire page - so I give up on that - thanks. I found my error with the body tag and have corrected it (but not exactly sure what changed but thanks for pointing out my error) I will try to figure out how to tighten up the other spaces by looking further at your documentation Thanks Quote Link to comment Share on other sites More sharing options...
fan4chevy Posted January 26, 2010 Share Posted January 26, 2010 Hi Spooks, I am trying to incorporate this contribution (Ultimate SEO URLS 5) to your contribution. Since I'm using your product listing I need to do a manual install for the above contribution. The install instructions say...in product_listing.php... catalog/includes/modules/product_listing.php 5- Find ... $lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> '; Replace with ... $lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action', 'products_id')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> '; I can't seem to find that line in your file. How would I go about incorporating the above line to your contrib? Thanks for all your help! I had actually posted this in the past in this help forum. If you search back under my user name you will find that Sam mentioned that it is not necessary to make this change. So ignore this file on SEO5 asking you to find and replace. Mine worked fine. Quote Link to comment Share on other sites More sharing options...
Ken44 Posted January 26, 2010 Share Posted January 26, 2010 It depends on your country, but the law in the UK states that you may not offer any product at a 'reduced' price until it has already been on sale at your store for a higher price for a period of not less than 28 days. Hi Sam This is true, however my products change very seldom and I have set $date = strtotime("-300 days"); // set max age of displayed product There is nothing illegal about having a discounted price after 28 days in the UK. Please can we have another variable to set the minimum period, after which it will start to show special prices? And thanks again for a great contribution, and all your support. Regards Ken Quote Link to comment Share on other sites More sharing options...
spooks Posted January 26, 2010 Author Share Posted January 26, 2010 Unfortunatly there are some here that have asked & said that in thier country this law is not enforced, so they are happy to break it!!! However its a law I agree with, and feel its despicical conduct of any retailer that chooses to ignore it. So I'm not prepared provide code that others could misuse. I would also remind you of the supermarkets doctrine, todays sales don't matter if your conduct kills future sales. I think your best bet would be to replace your new product module with a specials module. ronrrico has provided such a module that uses this. 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...
mdscarrott Posted January 26, 2010 Share Posted January 26, 2010 (edited) Its that b... bill at it again!! Its yet another ie8 issue. change the code to: window.onLoad=DD_roundies.addRule('.infoBoxProducts', '20px'); then edit your index.php & advanced search results.php & any others that call the listing: immediatly after the <head> add: <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /> you should note that following this change your ie8 will render the page much quicker. Hi Sam Thanks for your help. I made the changes but i am still getting the error pointing to the code you told me to use. The first time the page loaded i was also missing boxes again. So i'm still missing the occasional box and have IE giving me page error notices. Argh, it all seemed to be going so well. Matt EDIT: Also - some product images are now taking an age to load with the box remaining empty for 2-3 seconds before an image apears. Not sure it is related but I cetainly haven't had the problem in the past. I use the oscThumb contribution which caches small versions so it shouldn't be an issue :huh: Edited January 26, 2010 by mdscarrott Quote Link to comment Share on other sites More sharing options...
Ken44 Posted January 26, 2010 Share Posted January 26, 2010 I think your best bet would be to replace your new product module with a specials module. Hi Sam OK. I understand. I just wish to display my products over 28 days and under 300 days CORRECTLY It is just as wrong to display incorrect prices. It would probably be better to have any products with a special price not displayed at all, rather than displaying them with the wrong price. How about re-coding the SQL query to omit products with a special price? Thanks again Regards Ken Quote Link to comment Share on other sites More sharing options...
spooks Posted January 26, 2010 Author Share Posted January 26, 2010 (edited) Hi Sam Thanks for your help. I made the changes but i am still getting the error pointing to the code you told me to use. The first time the page loaded i was also missing boxes again. So i'm still missing the occasional box and have IE giving me page error notices. Argh, it all seemed to be going so well. Matt EDIT: Also - some product images are now taking an age to load with the box remaining empty for 2-3 seconds before an image apears. Not sure it is related but I cetainly haven't had the problem in the past. I use the oscThumb contribution which caches small versions so it shouldn't be an issue I did say change the code as well!! Check you have added the <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /> to the right pages & uploaded, I noticed slow display in ie8 (not other browsers) till adding that. If u wish I have now sorted a ie8 compatible delay. var initFunction = function() { DD_roundies.addRule('.infoBoxProducts', '20px'); } window.onLoad = setTimeout(initFunction, 2000); You must still use the IE=EmulateIE7 tag though, its needed in other add-ons too, it says how bad ms realise they are, when they release a patch?? to overcome the many bugs in thier latest! PS viewing your page in IE7 its fine and loads quick as any. (I've deliberatly not 'upgraded' my main browser) Edited January 26, 2010 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...
mdscarrott Posted January 26, 2010 Share Posted January 26, 2010 I did say change the code as well!! Check you have added the <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /> to the right pages & uploaded, I noticed slow display in ie8 (not other browsers) till adding that. If u wish I have now sorted a ie8 compatible delay. var initFunction = function() { DD_roundies.addRule('.infoBoxProducts', '20px'); } window.onLoad = setTimeout(initFunction, 2000); You must still use the IE=EmulateIE7 tag though, its needed in other add-ons too, it says how bad ms realise they are, when they release a patch?? to overcome the many bugs in thier latest! I did change the code as well. I will try the new code you have proveded and report back. Quote Link to comment Share on other sites More sharing options...
mdscarrott Posted January 26, 2010 Share Posted January 26, 2010 I'm still getting the error. Extract from page source is below which shows that the head meta and other code are in plave. The bottom line of the code extract is line 65 which is where IE says there is an error. <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html dir="LTR" lang="en"> <head> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /> <title>Orchard Stables :: Buy Horse Tack and Equestrian Grooming Products Online</title> <meta name="Description" content="Orchard Stables is a dedicated online retailer selling high quality horse tack, grooming kits, stable accessories and rider-wear. We stock leading brand horse and stable essentials and discounted alternatives as well of a selection of gifts." > <meta name="Keywords" content="Orchard,Stables,grooming,horse,Oster,Equerry,set,kit,boots,gift,tack" > <meta name="robots" content="noodp" > <meta name="slurp" content="noydir" > <link rel="canonical" href="http://www.orchardstables.co.uk/index.php" > <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" > <!-- EOF: Header Tags SEO Generated Meta Tags --> <base href="http://www.orchardstables.co.uk/"> <link rel="stylesheet" type="text/css" href="stylesheet.css"> <link rel="shortcut icon" href="favicon.ico" > <meta name="google-site-verification" content="xXgS8kc4-2rgfvq-4CbIi412biThZYsYw804HO9_hNc" /> <style type="text/css"> .style2 { color: #8C3031; font-size: medium; font-family: Arial, Helvetica, sans-serif; } p.MsoNormal {margin-top:0cm; margin-right:0cm; margin-bottom:10.0pt; margin-left:0cm; line-height:115%; font-size:11.0pt; font-family:"Calibri","sans-serif"; } .style3 { font-family: Arial, Helvetica, sans-serif; font-size: 12pt; } </style> <!-- page-header-inc.htc by Sam 12/20099 --> <style type="text/css"> <!-- span.ttip, span.ttip a, span.ttip.img { position:relative; z-index:1; } span.ttip a .large {display: none;} span.ttip a:hover img.large { z-index:30; position:absolute; display: inline; border:0px; margin:0px; margin-top:-10px; margin-left:-25px; } // --> </style> <!--[if lte IE 7]> <style type="text/css" media="screen"> span.ttip a:hover img.large { margin-left:-180px; display: block; } </style> <![endif]--> <script language="JavaScript" type="text/javascript" src="DD_roundies.js"></script> <script language="JavaScript" type="text/javascript" defer="true"> /* IE only */ var initFunction = function() { DD_roundies.addRule('.infoBoxProducts', '20px'); } window.onload = setTimeout(initFunction, 2000); Quote Link to comment Share on other sites More sharing options...
spooks Posted January 26, 2010 Author Share Posted January 26, 2010 it must be smthg else on your site causing it, I've tested that code on different sites with different osc versions in ie8, no error is created. yes looking at your site with my ie8 creates error, but as the code is valid it must be another cause. 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...
mdscarrott Posted January 27, 2010 Share Posted January 27, 2010 it must be smthg else on your site causing it, I've tested that code on different sites with different osc versions in ie8, no error is created. yes looking at your site with my ie8 creates error, but as the code is valid it must be another cause. I understand why you say that if it has been tested okay on other sites but the error points to the line of code showing the time delay. If i remove the time delay and just enter the following: var initFunction = function() { DD_roundies.addRule('.infoBoxProducts', '20px'); } window.onload = initFunction; it works with no error. It seems to be the setTimeout element of the code you suggested that IE8 doesn't seem to like. Matt Quote Link to comment Share on other sites More sharing options...
spooks Posted January 27, 2010 Author Share Posted January 27, 2010 I understand why you say that if it has been tested okay on other sites but the error points to the line of code showing the time delay. If i remove the time delay and just enter the following: var initFunction = function() { DD_roundies.addRule('.infoBoxProducts', '20px'); } window.onload = initFunction; it works with no error. It seems to be the setTimeout element of the code you suggested that IE8 doesn't seem to like. Matt Puzzeling, but clearly if I can't reproduce that error then I can't offer a solution, I've even checked with googles code repository, their solution is basically the same. The only other point I'd make is that error messages rarely point to the faulty line, most often the actual error is elsewhere, at times nowhere near the error line. At least u know viewing with ie8 shows the worst possible state. DD roundies provides the best script solution (there are others). there is a css solution (for ie), but the structure is complex leading to other issues. 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...
mdscarrott Posted January 27, 2010 Share Posted January 27, 2010 Puzzeling, but clearly if I can't reproduce that error then I can't offer a solution, I've even checked with googles code repository, their solution is basically the same. The only other point I'd make is that error messages rarely point to the faulty line, most often the actual error is elsewhere, at times nowhere near the error line. At least u know viewing with ie8 shows the worst possible state. DD roundies provides the best script solution (there are others). there is a css solution (for ie), but the structure is complex leading to other issues. Thanks Sam I really appreciate you having looked in to this for me. I hear that IE 9 will resolve a lot of these problems, run script much quicker and allow for rounded corners etc. Its not that i am a huge fan of IE but recognise that as the most used browser i have to build my site for it. One last thing if you don't mind? Now i have the line to emulate IE7 added to the relevant pages and ackowledging that something in my site means i can't handle setTimeout command, what code should i be using within the page-header-inc file? Should it be: var initFunction = function() { DD_roundies.addRule('.infoBoxProducts', '20px'); } window.onload = initFunction; ... which i came up with by stripping out the setTimeout element from the code you provided. Have i done this properly or have a i made a mess of this? Or should i use the original code for the contribution: onLoad=DD_roundies.addRule('.infoBoxProducts', '20px'); ??? Thanks Matt Quote Link to comment Share on other sites More sharing options...
meshdesign Posted January 27, 2010 Share Posted January 27, 2010 I have been setting this up for a few hours now and it has been a massive help to me. However i have run into one problem i could use a bit of help with, on the old product listing I had an IF code whereby if a product was in category X it wouldn't show the add to cart button, instead it would show a call us for details button, as shown below: if($cPath == 425){ $lc_text = '<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . tep_image_button('call-button.png', TEXT_CALL_FOR_PRICE) . '</a>'; //$lc_text = TEXT_CALL_FOR_PRICE; } else{ $lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing[$x]['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> ';} break; I believe this works similar to how if the price is 0.00 then the POA is shown and the add to cart button is replaced with details button, could somebody help me where to start with this, i've been messing about for a few hours but i'm struggling to get the results i need. Thanks Dan Quote Link to comment Share on other sites More sharing options...
designbysue Posted January 27, 2010 Share Posted January 27, 2010 Can you please tell me how to add a black outline to the hover image? Thanks Sue Quote Link to comment Share on other sites More sharing options...
spooks Posted January 27, 2010 Author Share Posted January 27, 2010 Should it be: var initFunction = function() { DD_roundies.addRule('.infoBoxProducts', '20px'); } window.onload = initFunction; ... which i came up with by stripping out the setTimeout element from the code you provided. Have i done this properly or have a i made a mess of this? Or should i use the original code for the contribution: onLoad=DD_roundies.addRule('.infoBoxProducts', '20px'); either is fine, makes no odds. 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 January 27, 2010 Author Share Posted January 27, 2010 show a contact us for price button after if ($p_price == 0 || (isset($products['products_quantity']) ..... (appears twice) add if ($cPath == 425) $button = '<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . tep_image_button('call-button.png', TEXT_CALL_FOR_PRICE) . '</a>'; but you have a improved contact us like from http://addons.oscommerce.com/info/7202 you could add if ($cPath == 425) $button = '<a href="' . tep_href_link(FILENAME_CONTACT_US, 'subject=Price for ' . $listing['products_name']) . '">' . tep_image_button('call-button.png', TEXT_CALL_FOR_PRICE) . '</a>'; then the subject is pre-filled for the visitor & no chance u don't know what they talking of. Note: in the second addition you must use $products['products_name'] in place of $listing['products_name'] 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 January 27, 2010 Author Share Posted January 27, 2010 how to add a border to the hover image in page-header-inc.htc modify span.ttip a:hover img.large css 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...
designbysue Posted January 27, 2010 Share Posted January 27, 2010 Can you please be more specific - I would like to add a black border about 2 px. I tried modifing the file you suggested and had no luck. Sue Quote Link to comment Share on other sites More sharing options...
mghay Posted January 27, 2010 Share Posted January 27, 2010 Unfortunatly there are some here that have asked & said that in thier country this law is not enforced, so they are happy to break it!!! However its a law I agree with, and feel its despicical conduct of any retailer that chooses to ignore it. So I'm not prepared provide code that others could misuse. I would also remind you of the supermarkets doctrine, todays sales don't matter if your conduct kills future sales. I think your best bet would be to replace your new product module with a specials module. ronrrico has provided such a module that uses this. Thanks Spooks and Ken44. What I really want to display is not a misleading 'New Products' price list but a selected listing of products - not purely random - both new and existing with some of the latter being on Special. I came upon this problem by re-vamping the shop display with this contribution and re-jigging the category lists. The items on Special had been on sale for a long time but had a revised write-up and were then re-entered so, effectively, became a New Product as far as the programming was concerned. Then they were displayed under New Products, sans discounted price for the reasons you have explained. At last now I can stop puzzling over that particular problem and concentrate on the display issue. Thanks also for your 'read the file' dig :-" - yep, did read the file - initially for the install!! - but didn't twig that line when I came across the (non-existant) problem, and that WOULD have saved me a bit of hassle. Fair cop. :blush: Quote Link to comment Share on other sites More sharing options...
spooks Posted January 27, 2010 Author Share Posted January 27, 2010 How to add a border use border: as per rules CSS Tuition http://www.w3.org/Style/CSS/learning 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...
designbysue Posted January 28, 2010 Share Posted January 28, 2010 Sam - I have tried any number of ways to modify the page_header_inc and nothing works. Please can you help me with this! the current version I have is: <!-- page-header-inc.htc by Sam 12/20099 --> <style type="text/css"> <!-- span.ttip, span.ttip a, span.ttip.img { position:relative; z-index:1; } span.ttip a .large {display: none;} span.ttip a:hover img.large { z-index:30; position:absolute; display: inline; border:5px; margin:0px; margin-top:-10px; margin-left:-<?php echo (int)(IMAGE_TTIP_WIDTH/8) ?>px; } // --> </style> <!--[if lte IE 7]> <style type="text/css" media="screen"> span.ttip a:hover img.large { margin-left:-<?php echo (int)(IMAGE_TTIP_WIDTH*0.9) ?>px; display: block; border-style:solid; border:5px; border-color:#000000; } </style> <![endif]--> <script language="JavaScript" type="text/javascript" src="DD_roundies.js"></script> <script language="JavaScript" type="text/javascript" defer="true"> /* IE only */ onLoad=DD_roundies.addRule('.infoBoxProducts', '20px'); </script> And I have tried <!-- page-header-inc.htc by Sam 12/20099 --> <style type="text/css"> <!-- span.ttip, span.ttip a, span.ttip.img { position:relative; z-index:1; } span.ttip a .large {display: none;} span.ttip a:hover img.large { z-index:30; position:absolute; display: inline; border-style:solid; border:0px; border-color:#000000; margin:0px; margin-top:-10px; margin-left:-<?php echo (int)(IMAGE_TTIP_WIDTH/8) ?>px; } // --> </style> <!--[if lte IE 7]> <style type="text/css" media="screen"> span.ttip a:hover img.large { margin-left:-<?php echo (int)(IMAGE_TTIP_WIDTH*0.9) ?>px; display: block; border-style:solid; border:5px; border-color:#000000; } </style> <![endif]--> <script language="JavaScript" type="text/javascript" src="DD_roundies.js"></script> <script language="JavaScript" type="text/javascript" defer="true"> /* IE only */ onLoad=DD_roundies.addRule('.infoBoxProducts', '20px'); </script> What I am missing? I know this seems trivial to you but I would really appreciate your help. (or someone else more adept at this than I want to chime in?) Please Sue Quote Link to comment Share on other sites More sharing options...
spooks Posted January 28, 2010 Author Share Posted January 28, 2010 add a border to tool tip popup add: border: solid 2px #999999; to span.ttip a:hover img.large it only needs adding to the first instance. remove a later border tags as they will overide the ealier 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...
designbysue Posted January 28, 2010 Share Posted January 28, 2010 Thank you that did it!!!! Sue (I really appreciate your prompt responses) Quote Link to comment Share on other sites More sharing options...
ocs1409 Posted January 29, 2010 Share Posted January 29, 2010 hello i am using search tag cloud contribution ( http://addons.oscommerce.com/info/5498 ) in the install.txt 2) includes/modules/product_listing.php ***************************************************************************** Search for around Line 150: Find: $list_box_contents[$cur_row][] = array('align' => $lc_align, 'params' => 'class="productListing-data"', 'text' => $lc_text); } } And Add after new lines: //BOF: Search Tag Cloud v2.4 by darkamex if (($_GET['keywords'] != '')) { $search_count = tep_db_query("select search, freq from customers_searches where search = '". $_GET['keywords'] . "' and language_id='". $languages_id . "'"); if (!tep_db_num_rows($search_count)) { tep_db_query("insert into customers_searches (search, freq, language_id) values ('". tep_db_input($_GET['keywords']) ."',1," .$languages_id." )"); } else { $search_val = tep_db_fetch_array($search_count); tep_db_query("update customers_searches set freq = " . ($search_val['freq']+1) . " where search = '". tep_db_input($_GET['keywords']) . "' and language_id='". $languages_id . "'"); } } //EOF: Search Tag Cloud v2.3 by faaliyet i have searched in the product_listing.php module there are more then 1 lines with the code :blink: where should the search tag cloud code be placed to update the search phrases in the database file :D eric 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.