Jump to content


  • Content count

  • Joined

  • Last visited

Everything posted by andytc

  1. andytc

    trigger shipping method by weight ?

    Ok , yes ... I compared the code from a royal mail shipping contrib that has this feature alreday and just added it my other 2 shipping modules and adjusted the weight limits to suit. It works fine , don't ask me how it works because i am not an expert , i just compared the code and amde the changes.....that said Find this code in your shipping module. It may look slightly different depending on what module you are looking at , but it will start with // class constructor // class constructor function flat() { global $order; $this->code = 'flat'; $this->title = MODULE_SHIPPING_FLAT_TEXT_TITLE; $this->description = MODULE_SHIPPING_FLAT_TEXT_DESCRIPTION; $this->sort_order = MODULE_SHIPPING_FLAT_SORT_ORDER; $this->icon = ''; $this->tax_class = MODULE_SHIPPING_FLAT_TAX_CLASS; $this->enabled = ((MODULE_SHIPPING_FLAT_STATUS == 'True') ? true : false); I changed my ukpostarea module to this - // class constructor function ukpostarea() { global $order, $total_weight; $this->code = 'ukpostarea'; $this->title = MODULE_SHIPPING_UKPOSTAREA_TEXT_TITLE; $this->description = MODULE_SHIPPING_UKPOSTAREA_TEXT_DESCRIPTION; $this->sort_order = MODULE_SHIPPING_UKPOSTAREA_SORT_ORDER; $this->icon = ''; $this->tax_class = MODULE_SHIPPING_UKPOSTAREA_TAX_CLASS; $this->enabled = ((MODULE_SHIPPING_UKPOSTAREA_STATUS == 'True') ? true : false); $this->num_zones = 3; if ($total_weight < 1.5) { // If total ship weight is less than 1.50Kg do not show this shipping method $this->enabled = false; } // To remove this 3.00Kg limit, simply delete these 3 lines. } the code i added is in bold , you may or may not have the zones bit. This is the code form the original roymail contrib that had this already in place - // class constructor function rmfirst() { global $order, $total_weight; $this->code = 'rmfirst'; $this->title = MODULE_SHIPPING_RMFIRST_TEXT_TITLE; $this->description = MODULE_SHIPPING_RMFIRST_TEXT_DESCRIPTION; $this->sort_order = MODULE_SHIPPING_RMFIRST_SORT_ORDER; $this->icon = DIR_WS_ICONS . 'shipping_rmuk.jpg'; // upload icon to catalog/images/icon directory $this->tax_class = MODULE_SHIPPING_RMFIRST_TAX_CLASS; $this->enabled = ((MODULE_SHIPPING_RMFIRST_STATUS == 'True') ? true : false); $this->num_zones = 1; if ($total_weight > 1.5) { // If total ship weight is over 3.00Kg do not show this shipping method $this->enabled = false; // Anything over 3Kg its not economically wise to use this method } // To remove this 3.00Kg limit, simply delete these 3 lines. } To make it not show if under a certain weight, change the section if ($total_weight > 1.5) to if ($total_weight < 1.5) the > is just replaced with < Now , i'm sure that is as clear as mud :D .... but just look at the code and compare it to your own modules that you are using and edit as required and see if it works. It's working for me fine with no problems. As i said ...i'm NOT and expert
  2. on a fresh install the code to replace is the section below - //// // The HTML image wrapper function function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '') { if ( (empty($src) || ($src == DIR_WS_IMAGES)) && (IMAGE_REQUIRED == 'false') ) { return false; } // alt is added to the img tag even if it is null to prevent browsers from outputting // the image filename as default $image = '<img src="' . tep_output_string($src) . '" border="0" alt="' . tep_output_string($alt) . '"'; if (tep_not_null($alt)) { $image .= ' title=" ' . tep_output_string($alt) . ' "'; } if ( (CONFIG_CALCULATE_IMAGE_SIZE == 'true') && (empty($width) || empty($height)) ) { if ($image_size = @getimagesize($src)) { if (empty($width) && tep_not_null($height)) { $ratio = $height / $image_size[1]; $width = intval($image_size[0] * $ratio); } elseif (tep_not_null($width) && empty($height)) { $ratio = $width / $image_size[0]; $height = intval($image_size[1] * $ratio); } elseif (empty($width) && empty($height)) { $width = $image_size[0]; $height = $image_size[1]; } } elseif (IMAGE_REQUIRED == 'false') { return false; } } if (tep_not_null($width) && tep_not_null($height)) { $image .= ' width="' . tep_output_string($width) . '" height="' . tep_output_string($height) . '"'; } if (tep_not_null($parameters)) $image .= ' ' . $parameters; $image .= '>'; return $image; } the current install instructions are not very clear for this bit. Which is a shame because the rest of the install file is very detailed...odd ?
  3. andytc

    [contribution] Star Product

    Cool :thumbsup: I need one of those gimmicks , looks like fun...goldfish out of thin air !! Have you checked the product description length setting in admin ?
  4. try and find this line in the module. it will appear twice , so change both $description['products_description'] = substr($description['products_description'], 0, 150); the 150 bit is the length of the description. have a look and see what yours is set at
  5. andytc

    [contribution] Star Product

    yeah , find this bit of code in catalog/includes/modules/star_product.php. <td align="right" height="100%" width="15%" rowspan="2"><a href="' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $star_products['products_id']) . '"' . ' target="popup"' . ' onClick="window.open(this.href, this.target, \'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=yes, copyhistory=no, width=' . SMALL_IMAGE_WIDTH . ', height=' . SMALL_IMAGE_HEIGHT . '\').focus(); return false;">' . tep_image(DIR_WS_IMAGES . $star_products['products_image'], $star_products['products_name'], SMALL_IMAGE_WIDTH*2, SMALL_IMAGE_HEIGHT*2) . '</a></td> the code appears twice , so you will need to edit both sections of code where you find that line change that line to this - <td align="right" height="100%" width="15%" rowspan="2"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, "products_id=" . $star_products["products_id"]). '">' . tep_image(DIR_WS_IMAGES . $star_products['products_image'], $star_products['products_name'], SMALL_IMAGE_WIDTH*2, SMALL_IMAGE_HEIGHT*2) . '</a></td> works for me :thumbsup:
  6. andytc

    trigger shipping method by weight ?

    Cracked it !! I'm sooooo happy
  7. a royal mail module (4473 - UK_SHIPPING_METHODS v 1.2(2)) i found uses this - if ($total_weight > 1.5) { // If total ship weight is over 3.00Kg do not show this shipping method $this->enabled = false; // Anything over 3Kg its not economically wise to use this method } // To remove this 3.00Kg limit, simply delete these 3 lines. or this if ($total_weight < 1) { // If total ship weight is less than 3.00Kg do not show this shipping method $this->enabled = false; // Anything under 3Kg its not economically wise to use this method (Royal Mail recommended) } // To remove this 3.00Kg limit, simply delete these 3 lines I'd like to get that to function with other shipping modules , but i can't get it to work. it only works on the royal mail module itself , i have no clue how to adapt that code to use on other shipping modules :(
  8. andytc

    Easy Populate nightmare!

    Only thing that jumps out at me is the missing / after temp Warning: file(DIR_FS_DOCUMENT_ROOT/tempEP2006Nov23-2008.txt) that would be a problem in your admin config file
  9. You probably have an error in your config for EP , but it's not being shown because your server has show errors turned off. It's a pain having show errors turned off when your trying to build a site. If you have access to your own server turn it on in PHP.INI or contact your host or maybe you can add something to htaccess. , but i don't know enough to tell you what you should add to htaccess. in the meantime you could ... Check the length of the "products_model" field in your DB (under products) ... the VARCHAR bit should match whats in easypopulate.php at line 72 - check this for model length $modelsize = 25; also Check this at line 31 and make sure it is correct and that the DIR exisits and has 777 chmod $tempdir = DIR_FS_DOCUMENT_ROOT . "temp/"; it could something else , but with show errors off it's going to be hard to track down unless you go over the install again very carefully. I had the same non error as you.
  10. Cancel that ! :blush: :blush: It was an ID10T error.... model No length was wrong.... no error was shown because "show errors" is turned off on the server :blush: Great contrib.... works out of the box and does what it says on the tin !
  11. Ok , thats great. i didn't want to mess anything up , i really need this working. The problem I have at the moment is when a file is uploaded it doesn't change anything in the database ???? No errors are reported , but nothing gets changed , added or anything. It's one way traffic Have i missed something somewhere ?
  12. andytc

    Dynamic SiteMap

    I tried the alternative catagory_tree.php that is supposed to show products. When i use it no products get added or shown in the site map ? ... it's just blank. The origianal one works fine for just showing catagories and subs... anyone else had this problem ?
  13. I had the exact same error , i ended putting configure.php back as it was and it all worked ?? so I don't know what the score is with changing the configure.php file as detailed in the install instructions ?
  14. Any help on the above posts ?
  15. andytc

    Star Product

    you've checked the star product section in admin ? and checked that a product is showing in the top greyed out box and clicked confirm ?..green light not red ?
  16. happy new year ! :thumbsup: Is any code available for the front page modules - specials on default - star product - and featured ?
  17. Where can i set the threshold at which the "dangling Carrot" message gets displayed ? ie spend another x amount and get this free .... Does anyone know how to exclude the free gift from the dynamic site map contrib ? it shows in the product list , even though it is not placed in a catoagory. Related to the above problem , i cannot set the free gift product to "out of stock" or inactive , if i do the gift doesn't get added to the shopping cart and will not show at all. I've checked all through this thread and the fixes posted dont work. My gift product is outside of any catagories it's model name is gift it has a stock qty it has a price of 0 Finally , does anyone know how to remove the link from the image in the shopping cart view when the gift is being offered carrot style.....ie ...spend another x amount and get this free ....the image is a link , i need to remove it as i have problems removing the buy now buttons , my site shows out of stock buttons , which looks a bit odd if someone wants a free gift , clicks the link and it says..out of stock. So i thoiught best to remove it all together......never look a gift horse in the mouth :D any help appreciated with these few problems ...
  18. andytc

    Stock Status in Product Listing

    It's in the install instructions - 7. - OPTIONAL: In you dont want to display the stock quantity in product linting, do this: --------------------------------------------------------------- In the same file catalog/includes/modules/product_listing.php 7.1 FIND this: $lc_text = TABLE_HEADING_QUANTITY; REPLACE WITH: // $lc_text = TABLE_HEADING_QUANTITY; //this change hidden the quantity heading title - star $lc_text = ''; //this change hidden the quantity heading title - end 7.2 FIND this: $lc_text = ' ' . $listing['products_quantity'] . ' '; REPLACE WITH: // $lc_text = ' ' . $listing['products_quantity'] . ' '; // this hidden stock quantity of product - star $lc_text = ' '; // this hidden stock quantity of product - end
  19. andytc

    Star Product

    View the item in admin and make sure the item is in stock. check that the item has a green light next to it not red , as red is out of stock.
  20. Does anyone know how i can remove the image link from for the free gift on the shopping cart ? not when it's in the cart , but when it's being offered ..ie spend another x pounds and get.... the image is a link , i'd like to remove the link and just show the image and message.
  21. just replace the scroll.php file
  22. It looks like you downloaded and installed this up-dated version - ScorpionWsM 27 Sep 2005 that has this mod on it - 2) Have made it left to right scroll as this is how we read, so better than up and down and better than right to left. the version from the demo site is - nicko107 15 Sep 2005 just a guess ?
  23. I need the code for thes front page modules also - Star product Featured (front page) Specials on default yes, i thought that removing the buy now buton would be a temp fix for now , otherwise i'll just end up baby sitting the all the front page products. Nico has the front page out of stock buttons working on his demo page. I've tried loads of different code to try and get it working , but no joy.