Jump to content

maniac101

Members
  • Content count

    77
  • Joined

  • Last visited

Profile Information

  1. maniac101

    NEW! Complete Order Editing Tool!

    Has anyone managed to get discounts working properly ? Im using easy discount, but im really struggling to integrate this in - at the moment it doesnt get added or subtracted from the total once you edit an order - so it breaks the original discount value as well! so i can put anything in that value as it uses ot_easy_discount and the edit_order.php code lets it live there but doesnt recalculate the value of the discount. every way ive tried of integrating the easy_discount code results in errors for trying to use easy_discount values in the code. Im going to keep trying for a little while longer before i give up! Also tax doesnt get calculated properly either. if i add a custom discount, this gets taken off the total properly, but the tax amount always relates to the original value of the order - which isnt correct for tax. the tax should be recalculated based on the discount being taken off the original total. I can probably fix that but if anyone has fixed it already id be keen to find out how. aside from that it works well - only when ajax turned off om admin though. thanks
  2. maniac101

    NEW! Complete Order Editing Tool!

    id look for where this is defined tep_cfg_pull_down_payment_methods() itself rather then the error message. possibly similar problem to me in that some of the javascript isnt getting to the computer due to the code not trapping errors, so the functions dont get defined fully
  3. maniac101

    NEW! Complete Order Editing Tool!

    Hi, ive installed this contrib on a couple of sites but only just realised it wasnt quite working fully. There appears to be a bug in the javascript function oe_js_zone_list found in order_editor/functions.php I have been looking at latst versions and will start backtracking to older versions of this. The comments in the file say: //originally written by Josh Dechant for the MOECTOE suite ///tweaked by djmonkey1 for Order Editor 2.7 and up essentially what is happening is the function seems to be printing out an extra } else } at the end of the function and tis means most of the rest of the javascript functions in that file are not correctly declared. IE and firefox both give out javascript errors but firefox is only helpful one. Ive tried with Ajax on and off and get same error. The syntax error causes loads of other errors javascript errors, such that setCustomOTVisibility isnt then defined and so i cannot do anything like add a discount field to an order etc. The function declaration is: ///originally written by Josh Dechant for the MOECTOE suite ///tweaked by djmonkey1 for Order Editor 2.7 and up function oe_js_zone_list($country, $form, $field, $id, $id2) { $countries_query = tep_db_query("select distinct zone_country_id from " . TABLE_ZONES . " order by zone_country_id"); $num_country = 1; $output_string = ''; while ($countries = tep_db_fetch_array($countries_query)) { if ($num_country == 1) { $output_string .= ' if (' . $country . ' == "' . $countries['zone_country_id'] . '") {' . "\n"; } else { $output_string .= ' } else if (' . $country . ' == "' . $countries['zone_country_id'] . '") {' . "\n"; } $states_query = tep_db_query("select zone_name, zone_id from " . TABLE_ZONES . " where zone_country_id = '" . $countries['zone_country_id'] . "' order by zone_name"); $num_state = 1; while ($states = tep_db_fetch_array($states_query)) { if ($num_state == '1') $output_string .= ' ' . $form . '[' . $field . '].options[0] = new Option("' . PLEASE_SELECT . '", "");' . "\n"; $output_string .= ' ' . $form . '[' . $field . '].options[' . $num_state . '] = new Option("' . $states['zone_name'] . '", "' . $states['zone_id'] . '");' . "\n"; $num_state++; } $output_string .= ' setStateVisibility(' . $id . ', "hidden", ' . $id2 . ');' . "\n"; $num_country++; } $output_string .= ' } else {' . "\n" . ' ' . $form . '[' . $field . '].options[0] = new Option("' . ENTRY_TYPE_BELOW . '", "");' . "\n" . ' setStateVisibility(' . $id . ', "visible", ' . $id2 . ');' . "\n" . ' }' . "\n"; return $output_string; } the problem seems to be this bit: $output_string .= ' } else {' . "\n" . ' ' . $form . '[' . $field . '].options[0] = new Option("' . ENTRY_TYPE_BELOW . '", "");' . "\n" . ' setStateVisibility(' . $id . ', "visible", ' . $id2 . ');' . "\n" . ' }' . "\n"; the code doesnt work if num_state doesnt have a value . This is a UK site I have it installed on, and we dont use states ! we dont have zones either because we have one sales tax for the country, same as in rest of Europe. I should be able to fix this up now that ive had to write it up in this format i realise what is causing the problem..! But if anyone can do a quick workaround that would be great. Thanks mark
  4. maniac101

    Google XML Sitemap w/ Admin support

    Hi Jonathan - i tried all the suggestions for generating SEO friendly urls and finally got it working - but one extra step.. need to edit sitemapclass.php as well as sitemaps.index.php find around line 1109 if ( (SEARCH_ENGINE_FRIENDLY_URLS == 'true') ) { replace this one also with whatever method you have selected to - i used the suggested sql config key SEO_SITEMAPS so i have changed the above to : if ( (SEO_SITEMAPS == 'true') ) { thsi now generates the correct nicely formatted urls that are used with ultimate seo contrib. incidently I also dont have url_write.php in includes\classes but it still works which is good. thanks for the contrib. note your above code should read $url = $u->url['path']; and not have double ']' character.
  5. maniac101

    coolMenu

    I meant just right click and 'view source' when the page is in a browser - you will see the page html and javascript minus any php code. Most of this contrib is relating to javascript issues rather then php issues. if you cut and past that here (in code braces!) too. you should have \include\boxes\coolmenu.php uploaded too. This is referenced in your \includes\column_left.php file and is included instead of the standard boxes\categories.php file. You could post the boxes\coolmenu.php file you are using too.
  6. maniac101

    coolMenu

    ok that doesnt help much. The script is in the right place in the head and so is the include coolmenu. perhaps a copy of the 'view source' of this index page when its on a browser will help instead. you should see stuff like: oCMenu.makeMenu('top_1','',category1','http://your-url.com/producturl.html') oCMenu.makeMenu('sub_1_1','top_1','subcategory1name','http://your-url.com/subcat.html') (your site may use index.php?cid= instead of .html - i use seo contrib and that makes the links point to html pages instead.) there should be a ocMenu.makeMenu(xxx) for each category - the top_1 for top level, then sub_1_1, Top_1 means subcategory 1 of top menu 1 etc. You will have top_2 and top_3 for next top level categories This is the bit of javascript that is created by the includes\boxes\coolmenu.php after it parses the category table in the database and makes lots of items which pass to the includes\coolmenu.php to then display them in the menu. The original dhtml code was designed for hardcoded menus and has not been modified - all thats being done if some work to make these 'oCMenu.makeMenu' strings correctly formatted to make tehmenu system. So you may have some problem with formatting of these strings based on your template.
  7. maniac101

    coolMenu

    Hi post a link if you want. I have not got STS but i have a very modifed site and had to install differently then the normal method. Do you get anything showing ? Do you get a menu at all ? or just nothing in the menu ? May be useful to post up say index.php - the normal install is to have the script include in the head, then have the coomenu.php include just after the <body> tag. Did you modify the boxes\coolmenu file ? I find it better to test with Netscape 7 which has a javascript console (under tools) to see javascript error messages that IE doesnt show you...may help isolate whats happening a bit. Problems i had related to my trying to get the menu location x,y coordinates and when the javascript failed i wouldnt get a menu at all, so i started doing alert messages to show variables in the code - if an alert box didnt show, then the code hadnt got that far so id move back a bit till i found the offending areas you can do alert('hello') or alert('x='x) type messages in the javascript (more so in includes\coolmenu.php and includes\boxes\coolmenu.php rather then in the coolmenu.js (menu-animation.js). might help you find where its going wrong
  8. maniac101

    best seller

    Hi Simone, any errors like this mean the code cannot find the language file reference to those words - so it displays teh words of the reference instead. You may have missed adding that right text line to catalog\includes\languages\english.php (assume english) or the contrib may use a seperate language file under catalog\includes\languages\xx herexx if you still cannot find it then look in the languages\english.php and add the same info (look at the other lines in there - they are all just define('name here', 'text to display here'); type lines - so make one to match the text you want it to say.
  9. maniac101

    coolMenu

    Well i thought i had cracked the menu problem using a relative DIV, but just noticed another issue this brings me in IE and shows up as a javascript error in Netscape. Error shows that first menu item cannot be clicked and the menu top line then disappears ! Just been experimenting and tried using a named image tag instead of a div as i thought this was better supported in browsers, and got it working again. Phew ! Changed my includes\boxes\coolmenu.php to use two images as i found another problem having just the one named image on its own created. The size of the image would mess up the menu rendering again so set it to zero - its only a coordinate placeholder now which sits in the new category box in the right position. So i have one transparent image with zero width and height named 'menuloc1' - this is the placeholder name i pass to the new js script which gets the correct xy coordinates. then i have a second image under that with no name to pad out the space - cannot seem to get it to use $height anymore (not sure why but dont care at this moment) so i fix the height of this second transparent image to avoid the menu from dropping over the other boxes. so my boxes\coolmenu.php has the following now: $info_box_contents[] = array('text' => '<img src="images/trans.gif" width="0" height="0" name="menuloc1"><br><img src="images/trans.gif" width="146" height="35" >'); And it all seems to work again (until the next problme i havent spotted yet!)
  10. maniac101

    coolMenu

    Hi Keith, only pages with a body tag and only in the catalog directory. only pages that actually are a real shop page that have things like 'include application_top.php' and 'include column_left.php' and 'include header.php'- go through each of your catalog pages and forget ones that are pure php with no html and other ones like popup pages which dont include these other files (usually short files). There are still a lot of files to change though !
  11. maniac101

    coolMenu

    Hi, I have installed the cool menu and had lots of problems with it initially and have been trying to get it to automatically move the menu when you have a centered shop -rather then a static fixed width shop. I have finally got a working version that i have tested with Netscape 7.1, IE 6.0, Safari 2.0.3, IE5.2.3 Mac, Opera 7.23 (windows). I havent got it to work with Netscape 4.7 though. I changed the order of the includes so that the includes\coolmenu.php is the last thing in each page before the body. This seems to allow it to get the coordinates of the div tag... if its before the end, then some browsers still work but IE6 didnt... and it doesnt seem t break anything else having at the bottom. <!-- coolMenu //--> <?php require(DIR_WS_INCLUDES . 'coolmenu.php'); ?> <!-- coolMenu_eof //--> </body> I added a DIV tag in my includes\boxes\coolmenu.php before the script, I also have a few table tags in there as i dont use the standard header text to generate the header of the categories menu: You will need to modify the width and height to fit your menu size i think <div id="menuloc1" style="position:relative; width:140px; height:80px; background=#FFFFFF; "></div> the DIV ID is used as the placeholder and is passed to another javascript i found from http://www.walterzorn.com/dragdrop/dragdrop_e.htm donation button on his website if this works for you. each of my pages now has the following after the body tag: <body> <script type="text/javascript" src="js/wz_dragdrop.js"></script> obviously you will need to download the js file and then upload to your server and change the location as you wish. and i modified the includes\coolmenu.php using the new js functions in the wz_dragdrop.js as follows: near the top of this file within the script tags: // the set_dhtml passes the layer name to the code - could be an image name too SET_DHTML("menuloc1"); // get the info about this object o= dd.elements['menuloc1']; oCMenu=new makeCM("oCMenu") //Making the menu object. Argument: menuname //get the element location coordiinates - cross browser compatible-ish oCMenu.fromLeft=o.x oCMenu.fromTop=o.y // recalculate the coordinates after window resize oCMenu.onresize="location.reload()" // rest of code still the same below.. I guess the location.reload could be removed if you have a fixed size site and it should still work properly, although you wouldnt need it.. And thats it.. Any other browsers i should test this on ? I may have an old version of gecko around If it works for you then i guess it could be included in the cool menu contrib. I nearly gave up on this but am very happy it finally works ! Need some sleep now! :blink:
  12. maniac101

    Category Discount

    Thanks Amanda, got the messages working now in the main shopping cart now - although it would be good to show the tax too since all our prices already show and include tax. The 'order' object seems to get created as part of the checkout process but if i try to use it in a similar manner i get errors since i have an 'estimated shipping cost box' which also creates the order object too and seems to clash. Any ideas about accessing the order object from the shopping cart? should i move some code to application_top instead ? I would also ideally like to get the discount value in the shopping cart box too. I tried using similar code to the main shoping_cart.php like: if (MODULE_CAT_QTY_DISCOUNT_STATUS == 'true') { $new_total = $cart->show_total(); $cat_qty_discount = new ot_cat_qty_discount; $cat_deduction = $cat_qty_discount->display_discounts(); if ($cat_deduction > 0) { $info_box_contents [] = array('align' => ' right ', 'text' => 'Discounts: <font color="red">- '.$currencies->format($cat_deduction).'</font>'); $info_box_contents [] = array('align' => ' right ', 'text' => 'Total: '.$currencies->format($cart->show_total() - $cat_deduction)); } } // end cat discount mod but get errors like: line 80 being $cat_qty_discount = new ot_cat_qty_discount; But even if this worked id rather not have to use something like: $cat_deduction = $cat_qty_discount->display_discounts(); as this would generate the text messages in the shopping cart box anyway which isnt what i want. I just want the discount amount to play with instead. Any suggestions about generating the discount value without upsetting the order object ? thanks
  13. maniac101

    Easy Discount

    Hi - i think it works because it replaces the current tax in $order->info['tax'] and total using $order->info['tax'] = $order->info['tax'] - $tod_amount; $order->info['total'] = $order->info['total'] - $od_amount; Have a look in the ot_total and ot_tax.php and see what the code is doing - think it must use teh same order->info['xxx'] values got a feeling i made it only work for percentage discounts though. To troubleshoot the code I think its best for you to echo out variables to see what values are being set for tax, subtotal and total etc and try to figure out whats going wrong.
  14. maniac101

    Category Discount

    Hi Amanda, ive been trying to add the modifications you suggested. I now do see some sort of message in the shopping cart but get a few errors with like: The offending lines being: reset($order->info['tax_groups']); while (list($key, $value) = each($order->info['tax_groups'])) { This is doing a discount like 84:2:1:m The format of the message seems wrong too:
  15. maniac101

    Easy Discount

    cool thanks that works fine.
×