Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

jbhz_finisher

Pioneers
  • Posts

    72
  • Joined

  • Last visited

Profile Information

  • Real Name
    Michael

jbhz_finisher's Achievements

  1. Ok im thinking it would be easy to simply modify an existing shipping module. I will use the "Per Item" since im not using it right now and i can set a shipping amount in admin $4.95. How can i tell this module to show its self when item number "21564" only is in shopping cart and hide when other products are in cart? Here is code for shipping module. <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2008 osCommerce Released under the GNU General Public License */ class item { var $code, $title, $description, $icon, $enabled; // class constructor function item() { global $order; $this->code = 'item'; $this->title = MODULE_SHIPPING_ITEM_TEXT_TITLE; $this->description = MODULE_SHIPPING_ITEM_TEXT_DESCRIPTION; $this->sort_order = MODULE_SHIPPING_ITEM_SORT_ORDER; $this->icon = ''; $this->tax_class = MODULE_SHIPPING_ITEM_TAX_CLASS; $this->enabled = ((MODULE_SHIPPING_ITEM_STATUS == 'True') ? true : false); if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_ITEM_ZONE > 0) ) { $check_flag = false; $check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_SHIPPING_ITEM_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id"); while ($check = tep_db_fetch_array($check_query)) { if ($check['zone_id'] < 1) { $check_flag = true; break; } elseif ($check['zone_id'] == $order->delivery['zone_id']) { $check_flag = true; break; } } if ($check_flag == false) { $this->enabled = false; } } } // class methods function quote($method = '') { global $order; $number_of_items = $this->getNumberOfItems(); $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_ITEM_TEXT_TITLE, 'methods' => array(array('id' => $this->code, 'title' => MODULE_SHIPPING_ITEM_TEXT_WAY, 'cost' => (MODULE_SHIPPING_ITEM_COST * $number_of_items) + MODULE_SHIPPING_ITEM_HANDLING))); if ($this->tax_class > 0) { $this->quotes['tax'] = tep_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']); } if (tep_not_null($this->icon)) $this->quotes['icon'] = tep_image($this->icon, $this->title); return $this->quotes; } function check() { if (!isset($this->_check)) { $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_ITEM_STATUS'"); $this->_check = tep_db_num_rows($check_query); } return $this->_check; } function install() { tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Item Shipping', 'MODULE_SHIPPING_ITEM_STATUS', 'True', 'Do you want to offer per item rate shipping?', '6', '0', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Shipping Cost', 'MODULE_SHIPPING_ITEM_COST', '2.50', 'The shipping cost will be multiplied by the number of items in an order that uses this shipping method.', '6', '0', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Handling Fee', 'MODULE_SHIPPING_ITEM_HANDLING', '0', 'Handling fee for this shipping method.', '6', '0', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Tax Class', 'MODULE_SHIPPING_ITEM_TAX_CLASS', '0', 'Use the following tax class on the shipping fee.', '6', '0', 'tep_get_tax_class_title', 'tep_cfg_pull_down_tax_classes(', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Shipping Zone', 'MODULE_SHIPPING_ITEM_ZONE', '0', 'If a zone is selected, only enable this shipping method for that zone.', '6', '0', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_SHIPPING_ITEM_SORT_ORDER', '0', 'Sort order of display.', '6', '0', now())"); } function remove() { tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')"); } function keys() { return array('MODULE_SHIPPING_ITEM_STATUS', 'MODULE_SHIPPING_ITEM_COST', 'MODULE_SHIPPING_ITEM_HANDLING', 'MODULE_SHIPPING_ITEM_TAX_CLASS', 'MODULE_SHIPPING_ITEM_ZONE', 'MODULE_SHIPPING_ITEM_SORT_ORDER'); } function getNumberOfItems() { global $order, $total_count; $number_of_items = $total_count; if ($order->content_type == 'mixed') { $number_of_items = 0; for ($i=0, $n=sizeof($order->products); $i<$n; $i++) { $number_of_items += $order->products[$i]['qty']; if (isset($order->products[$i]['attributes'])) { reset($order->products[$i]['attributes']); while (list($option, $value) = each($order->products[$i]['attributes'])) { $virtual_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . " pad where pa.products_id = '" . (int)$order->products[$i]['id'] . "' and pa.options_values_id = '" . (int)$value['value_id'] . "' and pa.products_attributes_id = pad.products_attributes_id"); $virtual_check = tep_db_fetch_array($virtual_check_query); if ($virtual_check['total'] > 0) { $number_of_items -= $order->products[$i]['qty']; } } } } } return $number_of_items; } } ?>
  2. A simple hard code would be just fine, no data base needed, i can change the id number in the code as needed.
  3. This is urgent, So $20 Via Paypal to first person that can code this simple function! Its needed function has changed see below. Im looking for code that will help in a product campaign. Im offering a product free customers only pay shipping. I need this code to work for only 1 particular product and not affect the whole store. So some thing like: If product id xxxx is in cart by ITS SELF show and allow "First class mail $4.95" only. If other products are added to cart along with special offer product show normal shipping options only. Any Takers?
  4. Im looking for code that will help in a product campaign. Im offering a product free customers only pay shipping. I need this code to work for only 1 particular product and not affect the whole store. So some thing like: If product id xxxx is in cart show and allow "First class mail $4.95" as well as normal shipping options. Else, do not show special shipping option above and resume normal shipping options. Any ideas for how I could implement this function? Thanks in advance.
  5. Anyone figure out how to import data for thumb images as well?
  6. Heres whats really going on ... lol I have need to change wholesalers... I have 3 feeds. 1 with all the categories that looks like this ( I could easily input this into data base manually, no big deal, as long as the ids match the names...) --------------------------------------------------- categoryID,categoryname "1","LOTIONS and CREAMS" "2","ACCESSORIES" "3","ADJUSTABLE" 1 Product feed looks like this after i run a script to capture the data i need.. No problem, except there isn't any categories.... ---------------------------------------------------- v_products_model,v_products_name_1,v_products_description_1,v_products_image,v_products_id,v_products_price,v_products_quantity,v_products_weight,v_manufacturers_name,v_tax_class_title,v_status,EOREOR BPW103,Bpw Pump Pack 2 1/4 In,"The Boston Professional Pump is the high tech enlargement system made in U.S.A. State of the Art Connector/Air Valve allows pump to disconnect from cylinder while maintaining exact pressure chosen. Heavy duty, light weight hand held Industrial pump. This combination pack includes the pump and the cylinder.",http://img.mysite.com/item_pics/20_5.jpg",20,151.9232,0,1.22,Boston Trading Company,Taxable Goods,Inactive,EOREOR And a second feed that has category to product id info and it looks like this ---------------------------------------------- itemid,itemsku,categoryID "2","ACN4591","45" "2","ACN4591","164" "8","ALS5100","45" "18","","118" "18","","138" "19","","118" "19","","138" "20","BPW103","118" "20","BPW103","138" "21","BPW104","118" "21","BPW104","138" "22","BPW105","118" "22","BPW105","138" "22","BPW105","191" "23","BPW106","118" "23","BPW106","138" So basically i need some way to merge the 2 files and add categorys to main products feed in relation to categories to product id feed first. Any Ideas?
  7. Need help here. How can i import "product_id" into data base with ep? Ive added the field into feed and its not taking the number on the feed, instead the shop is just automatically giving it a id
  8. I have not modified anything, but the feed! I have tried adding table headers into the top of the feed so easy populate would know what to do with the information.
  9. Ok, I give up... Im trying to get my wholesalers data feed to work and not having much luck. There are lot of information in the feeds much of witch i dont think i need. here is a sample of one product data in how it looks.. note: I do not have a table key so i dont know how its structured. "AC1030812","Aloe Cadabra Organic Lube Natural 2.5 Oz","10.85","6.90","Aloe Cadabra Organic Lube Natural 2.5 Oz","Aloe Cadabra is the smooth and silky organic surprise that is more fun and safer for you than the harmful chemical brands. Pleasurable for you, and delightful when shared with a partner. Lubricates as it eliminates dryness! The juicy aloe sensation is a gynecological health ally and a dream come true. Natural scent. 1 ounce sie.Suggested uses: Apply liberally to both you and / or your partner. Our organic, all natural food grade gel soothes your most sensitive tissues with a lubricity that magically enhances all intimate encounters. Won't harm condoms or other synthetic toys. Not a spermicide. Will not prevent STDs. Safe if ingested.","","","","http://images.sextoysex.com/MC/AC1030812.JPG","http://images.sextoysex.com/MC/AC1030812thmb.JPG","","","","","","","","","2010-05-17","0","0","0","","","0","0","","","","","","","","","MC","Seven Oaks Ranch","826804006051","Lubricants","Natural","","0" If i could get this to work and be displayed properly would be great. I use both thumb and large images, would be really great if i could upload that info as well.
  10. Ok, I give up... Im trying to get my wholesalers data feed to work and not having much luck. There are lot of information in the feeds much of witch i dont think i need. here is a sample of one product data in how it looks.. note: I do not have a table key so i dont know how its structured. "AC1030812","Aloe Cadabra Organic Lube Natural 2.5 Oz","10.85","6.90","Aloe Cadabra Organic Lube Natural 2.5 Oz","Aloe Cadabra is the smooth and silky organic surprise that is more fun and safer for you than the harmful chemical brands. Pleasurable for you, and delightful when shared with a partner. Lubricates as it eliminates dryness! The juicy aloe sensation is a gynecological health ally and a dream come true. Natural scent. 1 ounce sie.Suggested uses: Apply liberally to both you and / or your partner. Our organic, all natural food grade gel soothes your most sensitive tissues with a lubricity that magically enhances all intimate encounters. Won't harm condoms or other synthetic toys. Not a spermicide. Will not prevent STDs. Safe if ingested.","","","","http://images.sextoysex.com/MC/AC1030812.JPG","http://images.sextoysex.com/MC/AC1030812thmb.JPG","","","","","","","","","2010-05-17","0","0","0","","","0","0","","","","","","","","","MC","Seven Oaks Ranch","826804006051","Lubricants","Natural","","0" If i could get this to work and be displayed properly would be great. I use both thumb and large images, would be really great if i could upload that info as well.
  11. i dont see any issues i dont have any other symptoms. code: <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2010 osCommerce Released under the GNU General Public License */ ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <meta name="robots" content="noindex,nofollow"> <title><?php echo TITLE; ?></title> <base href="<?php echo HTTP_SERVER . DIR_WS_ADMIN; ?>" /> <!--[if IE]><script type="text/javascript" src="<?php echo tep_catalog_href_link('ext/flot/excanvas.min.js'); ?>"></script><![endif]--> <link rel="stylesheet" type="text/css" href="<?php echo tep_catalog_href_link('ext/jquery/ui/redmond/jquery-ui-1.8.6.css'); ?>"> <script type="text/javascript" src="<?php echo tep_catalog_href_link('ext/jquery/jquery-1.4.2.min.js'); ?>"></script> <script type="text/javascript" src="<?php echo tep_catalog_href_link('ext/jquery/ui/jquery-ui-1.8.6.min.js'); ?>"></script> <?php if (tep_not_null(JQUERY_DATEPICKER_I18N_CODE)) { ?> <script type="text/javascript" src="<?php echo tep_catalog_href_link('ext/jquery/ui/i18n/jquery.ui.datepicker-' . JQUERY_DATEPICKER_I18N_CODE . '.js'); ?>"></script> <script type="text/javascript"> $.datepicker.setDefaults($.datepicker.regional['<?php echo JQUERY_DATEPICKER_I18N_CODE; ?>']); </script> <?php } ?> <script type="text/javascript" src="<?php echo tep_catalog_href_link('ext/flot/jquery.flot.js'); ?>"></script> <link rel="stylesheet" type="text/css" href="includes/stylesheet.css"> <script type="text/javascript" src="includes/general.js"></script> </head> <body> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <?php if (tep_session_is_registered('admin')) { include(DIR_WS_INCLUDES . 'column_left.php'); } else { ?> <style> #contentText { margin-left: 0; } </style> <?php } ?> <div id="contentText">
×
×
  • Create New...