Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

maxxxie

Archived
  • Posts

    136
  • Joined

  • Last visited

Everything posted by maxxxie

  1. Your RewriteBase is wrong. It should be / There is a very large thread dedicated to support for this contribution: http://www.oscommerce.com/forums/index.php?sho...=154166&hl= and your question has been answered many times. You can find all sorts of useful info in that thread. :) Max
  2. Have a look at the Multi Vendor Shipping mod. In this case, you have two "vendors". Your normal products are sold by "you", and your jam jar product is sold by "you (jam jars)". Put the jam jar product under the "you (jam jars)" vendor, enable flat rate shipping for that vendor. Put all other products into the "you" vendor, and enable whichever shipping methods you want for that vendor. Hope this helps, Max
  3. Is this contribution installed online somewhere, so I can see it in action? Cheers, Max
  4. How about the individual shipping mod? http://addons.oscommerce.com/info/1333 Cheers, Max
  5. It does. Scroll down to the bottom of the page, and you'll find a small box in the bottom left where the words "Enter keywords" appear. Type whatever you like here and it will search the thread. Cheers, Max
  6. Try the Individual Shipping contribution (search the addons/contributions section for it). Cheers, Max
  7. No worries, happy to help another queenslander :) Max
  8. I believe the Multi Vendor Shipping (MVS) mod will do what you need. Have a hunt in the contributions section. Cheers, Max
  9. Best bet is to head over to the MVS support thread: MVS support thread. The authors of this contribution are active participants in the thread, so you'll be sure to find help there. Max
  10. I use Crafty Syntax Live Help (CSLH). It's free and does the job. :)
  11. You might also try this one: http://www.oscommerce.com/community/contributions,4228 :) Max
  12. I use the one located here: http://addons.oscommerce.com/info/956 Cheers, Max :)
  13. Looks to me like in your edits you deleted or missed adding a <?php opening tag. I don't know anything about HTC, but my guess is that at some point in the instructions, you needed to add the code above - locate the relevant file, and find the code. Just before it, try adding an opening tag so that it reads: <?php if (isset($HTTP_GET_VARS['manufacturers_id'])) $db_query = tep_db_query("select manufacturers_htc_title_tag as htc_title, manufacturers_htc_description as htc_description from " . TABLE_MANUFACTURERS_INFO . " where languages_id = '" . (int)$languages_id . "' and manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'"); else $db_query = tep_db_query("select categories_htc_title_tag as htc_title, categories_htc_description as htc_description from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$current_category_id . "' and language_id = '" . (int)$languages_id . "'"); $htc = tep_db_fetch_array($db_query); ?> Be sure to back up the files first, so you can revert if it all goes screwy. Cheers, Max
  14. GAH! Livebot BEGONE! I'm having hassles with livebot (livebot-65-55-165-14.search.live.com and others) impersonating real customers by using this useragent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; .NET CLR 1.1.4322). This bot annoys me because it creates sessions (thereby putting osc session IDs in its index), adds things to the cart (making me excited that someone's about to buy something, then disappointing me when I realise what's going on) and doesn't play nice with spiders.txt. Any idea how I can prevent this bot from creating sessions? Cheers, Max
  15. I use Crafty Syntax Live Help - http://www.craftysyntax.com/ :) Max
  16. Is it possible to use this contribution to produce per-category feeds? Eg a feed for PC games, a feed for Playstation games etc? Cheers, Max
  17. Here's a little christmas something for Australian users of MVS. A modification of the excellent Australian Shipping module for Aussie Post: includes/modules/vendors_shipping/auspost.php: <?php /* Modified by Max Lian 02/12/2007 for use with MVS All work is that of the original authors. This modification is based on the original work of others - all credit where credit is due! The Aussie Post shipping module was originally downloaded from http://addons.oscommerce.com/info/648 and is version 2.0.2. To do: Fix up tax! This is currently quasi-hard coded. All MVS mods have been commented with //MVS or //MVS start, //MVS end. */ /* $Id: auspost.php,v 2.0.2 2003/10/15 Based on the above contribution but Auspost Insurance added and will recognise if address if for Aus or OS and not dispaly for OS. Also will not display for packages that exceed maximum weight osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ class auspost { var $code, $title, $description, $icon, $enabled; // class constructor function auspost() { global $order; $this->code = 'auspost'; $this->title = MODULE_SHIPPING_AUSPOST_TEXT_TITLE; $this->description = MODULE_SHIPPING_AUSPOST_TEXT_DESCRIPTION; $this->icon = DIR_WS_ICONS . 'auspost.gif'; /* MVS start $this->sort_order = MODULE_SHIPPING_AUSPOST_SORT_ORDER; $this->tax_class = MODULE_SHIPPING_AUSPOST_TAX_CLASS; $this->enabled = ((MODULE_SHIPPING_AUSPOST_STATUS == 'True') ? true : false); if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_AUSPOST_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_AUSPOST_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; } } MVS end */ } // MVS start function sort_order($vendors_id='1') { if (defined (@constant ('MODULE_SHIPPING_AUSPOST_SORT_ORDER_' . $vendors_id))) { $this->sort_order = @constant('MODULE_SHIPPING_AUSPOST_SORT_ORDER_' . $vendors_id); } else { $this->sort_order = '0'; } return $this->sort_order; } function tax_class($vendors_id='1') { $this->tax_class = constant('MODULE_SHIPPING_AUSPOST_TAX_CLASS_' . $vendors_id); return $this->tax_class; } function enabled($vendors_id='1') { $this->enabled = false; $status = @constant('MODULE_SHIPPING_AUSPOST_STATUS_' . $vendors_id); if (isset ($status) && $status != '') { $this->enabled = (($status == 'True') ? true : false); } return $this->enabled; } function zones($vendors_id='1') { if ( ($this->enabled == true) && ((int)constant('MODULE_SHIPPING_AUSPOST_ZONE_' . $vendors_id) > 0) ) { $check_flag = false; $check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . (int)constant('MODULE_SHIPPING_AUSPOST_ZONE_' . $vendors_id) . "' 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 } //while if ($check_flag == false) { $this->enabled = false; }//if }//if return $this->enabled; }//function // MVS end // class methods // MVS // function quote($method = '') { function quote($method = '', $module = '', $vendors_id = '1') { global $order, $cart, $shipping_weight, $shipping_num_boxes, $total_weight; // AUS ONLY Other countries HIDE if ($order->delivery['country']['iso_code_2'] == 'AU') { // ONLY SHOWN IF LESS OR EQUAL TO MAX WEIGHT if ($shipping_weight <= constant('MODULE_SHIPPING_AUSPOST_MAX_WEIGHT_' . $vendors_id)) { $frompcode = constant('MODULE_SHIPPING_AUSPOST_SPCODE_' . $vendors_id); $topcode = $order->delivery['postcode']; $sweight = $shipping_weight*1000; $swidth = constant('MODULE_SHIPPING_AUSPOST_SWIDTH_' . $vendors_id); $sheight = constant('MODULE_SHIPPING_AUSPOST_SHEIGHT_' . $vendors_id); $slength = constant('MODULE_SHIPPING_AUSPOST_SDEPTH_' . $vendors_id); $error = false; // If Insurance option selected - calculate insurance cost if (constant('MODULE_SHIPPING_AUSPOST_INS_STATUS_' . $vendors_id) == 'True') { // Start with Base Cost $insurance = constant('MODULE_SHIPPING_AUSPOST_INS_BASE_' . $vendors_id); if ($order->info['subtotal'] > constant('MODULE_SHIPPING_AUSPOST_INS_UNIT_' . $vendors_id)) { $how_often = ceil((($order->info['subtotal'] - constant('MODULE_SHIPPING_AUSPOST_INS_UNIT_' . $vendors_id))/constant('MODULE_SHIPPING_AUSPOST_INS_UNIT_' . $vendors_id))); $insurance =+ constant('MODULE_SHIPPING_AUSPOST_INS_BASE_' . $vendors_id) + ($how_often * constant('MODULE_SHIPPING_AUSPOST_INS_ADD_' . $vendors_id)); } } // End calculating Insurance $url = "http://drc.edeliver.com.au/ratecalc.asp?Pickup_Postcode=$frompcode&Destination_Postcode=$topcode&Country=AU&Weight=$sweight&Service_Type=STANDARD&Height=$sheight&Width=$swidth&Length=$slength&Quantity=$shipping_num_boxes"; $myfile = file($url); $i=0; foreach($myfile as $vals) { $bits = split("=", $vals); $$bits[0] = $bits[1]; } if ($charge <= 0) { $error = true; } else { $handling = constant('MODULE_SHIPPING_AUSPOST_HANDLING_' . $vendors_id); if ($handling >0) { $handling_details = " $" . constant('MODULE_SHIPPING_AUSPOST_HANDLING_' . $vendors_id) . " " .MODULE_SHIPPING_AUSPOST_TEXT_HANDLING; } else { $handling_details = ""; } if ($insurance >0) { $insurance_details = " $" .$insurance . " " .MODULE_SHIPPING_AUSPOST_TEXT_INSURANCE; } else { $insurance_details = ""; } if ($insurance == 0 && $handling == 0) { $auspost_addons = ""; } else { $auspost_addons = " (" . MODULE_SHIPPING_AUSPOST_TEXT_INCLUDE . $handling_details . $insurance_details . ") "; } $shipping_auspost_method = MODULE_SHIPPING_AUSPOST_TEXT_WAY. " <b>" . $topcode . "</b> - " . $days . " " . MODULE_SHIPPING_AUSPOST_TEXT_SHIPPINGDAYS . ", " .$shipping_num_boxes . MODULE_SHIPPING_AUSPOST_TEXT_BOXES . " " . $total_weight . MODULE_SHIPPING_AUSPOST_TEXT_UNITS . $auspost_addons; // MVS fudged this for tax - this might not be the best fix - $shipping_auspost_cost = (($charge/1.1)* $shipping_num_boxes); $shipping_auspost_cost = ($charge * $shipping_num_boxes); } // MVS start $vendors_data_query = tep_db_query("select handling_charge, handling_per_box, vendor_country from " . TABLE_VENDORS . " where vendors_id = '" . (int)$vendors_id . "'" ); $vendors_data = tep_db_fetch_array($vendors_data_query); $country_name = tep_get_countries($vendors_data['vendor_country'], true); $handling_charge = $vendors_data['handling_charge']; $handling_per_box = $vendors_data['handling_per_box']; if ($handling_charge > $handling_per_box*$shipping_num_boxes) { $handling = $handling_charge; } else { $handling = $handling_per_box*$shipping_num_boxes; } // MVS end $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_AUSPOST_TEXT_TITLE, 'methods' => array(array('id' => $this->code, 'title' => $shipping_auspost_method, // MVS start // 'cost' => ($shipping_auspost_cost + MODULE_SHIPPING_AUSPOST_HANDLING) + $insurance))); 'cost' => $shipping_auspost_cost + $handling))); // MVS end if ($this->tax_class($vendors_id)> 0) { $this->quotes['tax'] = tep_get_tax_rate($this->tax_class($vendors_id), $order->delivery['country']['id'], $order->delivery['zone_id']); } if (tep_not_null($this->icon)) $this->quotes['icon'] = tep_image($this->icon, $this->title); if ($error == true) $this->quotes['error'] = MODULE_SHIPPING_AUSPOST_TEXT_ERROR . " " . $total_weight . " " . $shipping_weight; return $this->quotes; } } } // MVS start // MVS function check() { function check($vendors_id='1') { if (!isset($this->_check)) { // $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_AUSPOST_STATUS'"); $check_query = tep_db_query("select configuration_value from " . TABLE_VENDOR_CONFIGURATION . " where vendors_id = '". $vendors_id ."' and configuration_key = 'MODULE_SHIPPING_AUSPOST_STATUS_" . $vendors_id . "'"); // MVS end $this->_check = tep_db_num_rows($check_query); } return $this->_check; } // MVS start // function install() { function install($vendors_id='1') { tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . "(configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added, vendors_id) VALUES ('Enable auspost', 'MODULE_SHIPPING_AUSPOST_STATUS_" . $vendors_id . "','True', 'Do you want to offer auspost?', '6', '0', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now(),'" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) VALUES ('Dispatch Postcode', 'MODULE_SHIPPING_AUSPOST_SPCODE_" . $vendors_id . "', '2000', 'Dispatch Postcode?', '6', '0', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added, vendors_id) VALUES ('Enable Insurance', 'MODULE_SHIPPING_AUSPOST_INS_STATUS_" . $vendors_id . "', 'True', 'Do you want to include insurance?', '6', '0', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) values ('Insurance Base Cost', 'MODULE_SHIPPING_AUSPOST_INS_BASE_" . $vendors_id . "', '4.35', 'Cost for the first unit of insurance. Needs to be sent <b>Registered Mail</b> for Insurance.', '6', '0', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) values ('Insurance Addition Cost', 'MODULE_SHIPPING_AUSPOST_INS_ADD_" . $vendors_id . "', '1.15', 'Cost for each addition unit of insurance over Base Cost.', '6', '0', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) values ('Insurance Unit Size', 'MODULE_SHIPPING_AUSPOST_INS_UNIT_" . $vendors_id . "', '100', 'Insurance units are based on these increments - (size in Dollars).', '6', '0', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) values ('Handling Fee', 'MODULE_SHIPPING_AUSPOST_HANDLING_" . $vendors_id . "', '5.00', 'Handling Fee for this shipping method', '6', '0', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) values ('Maximum Weight (kg)', 'MODULE_SHIPPING_AUSPOST_MAX_WEIGHT_" . $vendors_id . "', '20', 'Maximum weight allowed by AustPost (in kg). A packaging allowance of <b>3 kg</b> is allowed. EG. 20 - 3 = 17. 17 becomes cutoff point for use.', '6', '0', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) VALUES ('Parcel Height (mm)', 'MODULE_SHIPPING_AUSPOST_SHEIGHT_" . $vendors_id . "', '100', 'Parcel Height (in mm)', '6', '0', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) VALUES ('Parcel Width (mm)', 'MODULE_SHIPPING_AUSPOST_SWIDTH_" . $vendors_id . "', '100', 'Parcel Width (in mm)', '6', '0', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) VALUES ('Parcel Depth (mm)', 'MODULE_SHIPPING_AUSPOST_SDEPTH_" . $vendors_id . "', '100', 'Parcel Depth (in mm)', '6', '0', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added, vendors_id) values ('Shipping Zone', 'MODULE_SHIPPING_AUSPOST_ZONE_" . $vendors_id . "', '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(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added, vendors_id) values ('Tax Class', 'MODULE_SHIPPING_AUSPOST_TAX_CLASS_" . $vendors_id . "', '0', 'Use the following tax class on the shipping fee.', '6', '0', 'tep_get_tax_class_title', 'tep_cfg_pull_down_tax_classes(', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) values ('Sort order of display.', 'MODULE_SHIPPING_AUSPOST_SORT_ORDER_" . $vendors_id . "', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now(), '" . $vendors_id . "')"); } /* MVS start function remove() { tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')"); } MVS end */ function remove($vendors_id) { tep_db_query("delete from " . TABLE_VENDOR_CONFIGURATION . " where vendors_id = '". $vendors_id ."' and configuration_key in ('" . implode("', '", $this->keys($vendors_id)) . "')"); } function keys($vendors_id) { return array('MODULE_SHIPPING_AUSPOST_STATUS_' . $vendors_id, 'MODULE_SHIPPING_AUSPOST_SPCODE_' . $vendors_id,'MODULE_SHIPPING_AUSPOST_INS_STATUS_' . $vendors_id, 'MODULE_SHIPPING_AUSPOST_INS_BASE_' . $vendors_id, 'MODULE_SHIPPING_AUSPOST_INS_ADD_' . $vendors_id, 'MODULE_SHIPPING_AUSPOST_INS_UNIT_' . $vendors_id, 'MODULE_SHIPPING_AUSPOST_MAX_WEIGHT_' . $vendors_id, 'MODULE_SHIPPING_AUSPOST_HANDLING_' . $vendors_id, 'MODULE_SHIPPING_AUSPOST_SHEIGHT_' . $vendors_id, 'MODULE_SHIPPING_AUSPOST_SWIDTH_' . $vendors_id, 'MODULE_SHIPPING_AUSPOST_SDEPTH_' . $vendors_id, 'MODULE_SHIPPING_AUSPOST_ZONE_' . $vendors_id, 'MODULE_SHIPPING_AUSPOST_TAX_CLASS_' . $vendors_id, 'MODULE_SHIPPING_AUSPOST_SORT_ORDER_' . $vendors_id, ); } } ?> From memory, there are no other files to modify. I'm working on modifying the express module, but until then.. enjoy! Max
  18. To those who are seeking support here, Vger posted a while back that she will provide support for this contribution only via her web site at osc answers dot com. Give that site a go. Cheers, Max
  19. You're looking for a "cross sell" contribution. Search the contributions section for "cross sell" and "x-sell" and you should get a few hits. Cheers, Max
  20. Hi Kes, Have a look at this post: http://www.oscommerce.com/forums/index.php?sho...32&st=2420#. It contains the fix (as, I believe, do newer versions of Order Editor). Essentially, the fix is to replace all the "require" statements with "include" statements. DJmonkey is a little quiet at the moment, but to whoever said "I love it when someone writes a mod and then disappears.", you might take note that this thread is 132 pages long and DJ's been posting all the way through. My experience with him has been that he has been exceptionally helpful (ongoing tax bugs notwithstanding). Do try to be a little less ungrateful. Max.
  21. Hey cafri, I asked this question of Vger just the other day. The short answer is that as it stands, a customer can only apply a single voucher to a particular purchase. Cheers, Max
  22. Can do, with a couple caveats: the first is that this contains modifications relating to the graphical borders mod. The second is that this is still a work in progress. Right now, if a manually-entered cross-sell exists, it does not "fill in the blanks" with random x-sells, it just shows the manually-entered x-sell. So you're best off not entering a manual x-sell at all, let the random bit do its thing. Ideally, I want to change this so that I can manually set a particular item as an x-sell, and have the module populate the rest of the row, so there's always 3 x-sells no matter if they are all random, all manually set, or a bit of both. Here's catalog/includes/modules/xsell_products.php. All work belongs to the original authors, and TBH I can't quite remember which code is mine! <?php /* $Id: xsell_products.php, v1 2002/09/11 // adapted for Separate Pricing Per Customer v4 2005/02/24 osCommerce, Open Source E-Commerce Solutions <http://www.oscommerce.com> Copyright (c) 2002 osCommerce Released under the GNU General Public License */ require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_XSELL_PRODUCTS); // BOF Separate Pricing Per Customer if(!tep_session_is_registered('sppc_customer_group_id')) { $customer_group_id = '0'; } else { $customer_group_id = $sppc_customer_group_id; } if ($HTTP_GET_VARS['products_id']) { //Cache $dircache = DIR_FS_CACHE_XSELL . $HTTP_GET_VARS['products_id'] . '/'; $filename = $dircache . $languages_id . '-' . $customer_group_id . '.php'; $cache = '<?php $info_box_contents = array(); $info_box_contents[] = array(\'text\' => TEXT_XSELL_PRODUCTS); new contentBoxHeading($info_box_contents); $info_box_contents = array();'; if (file_exists($filename)) { require $filename; } else { //Fin cache if ($customer_group_id != '0') { $xsell_query = tep_db_query("select distinct p.products_id, p.products_image, pd.products_name, p.products_tax_class_id, IF(pg.customers_group_price IS NOT NULL, pg.customers_group_price, p.products_price) as products_price from " . TABLE_PRODUCTS_XSELL . " xp, " . TABLE_PRODUCTS . " p LEFT JOIN " . TABLE_PRODUCTS_GROUPS . " pg using(products_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd where xp.products_id = '" . $HTTP_GET_VARS['products_id'] . "' and xp.xsell_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' and p.products_status = '1' and pg.customers_group_id = '".$customer_group_id."' order by sort_order asc limit " . MAX_DISPLAY_ALSO_PURCHASED); } else { $xsell_query = tep_db_query("select distinct p.products_id, p.products_image, pd.products_name, p.products_tax_class_id, products_price from " . TABLE_PRODUCTS_XSELL . " xp, " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where xp.products_id = '" . $HTTP_GET_VARS['products_id'] . "' and xp.xsell_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' and p.products_status = '1' order by sort_order asc limit " . MAX_DISPLAY_ALSO_PURCHASED); } // EOF Separate Pricing Per Customer // echo "x_sell query is " . $xsell_query . "<br>"; $num_products_xsell = tep_db_num_rows($xsell_query); // echo "num_products_xsell is " . $num_products_xsell . "<br>"; if ($num_products_xsell > 0) { ?> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <?php echo mws_header(TEXT_XSELL_PRODUCTS); ?> <td> <!-- xsell_products //--> <?php $info_box_contents = array(); $info_box_contents[] = array('text' => TEXT_XSELL_PRODUCTS); new infoBoxHeading ($info_box_contents); $row = 0; $col = 0; $info_box_contents = array(); while ($xsell = tep_db_fetch_array($xsell_query)) { $xsell['specials_new_products_price'] = tep_get_products_special_price($xsell['products_id']); if ($xsell['specials_new_products_price']) { $xsell_price = '<s>' . $currencies->display_price($xsell['products_price'], tep_get_tax_rate($xsell['products_tax_class_id'])) . '</s><br>'; $xsell_price .= '<span class="productSpecialPrice">' . $currencies->display_price($xsell['specials_new_products_price'], tep_get_tax_rate($xsell['products_tax_class_id'])) . '</span>'; } else { $xsell_price = $currencies->display_price($xsell['products_price'], tep_get_tax_rate($xsell['products_tax_class_id'])); } //Cache $text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $xsell['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $xsell['products_image'], $xsell['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $xsell['products_id']) . '">' . $xsell['products_name'] .'</a><br>' . $xsell_price. '<br>'; //Fin cache $info_box_contents[$row][$col] = array('align' => 'center', 'params' => 'class="smallText" width="33%" valign="top"', 'text' => $text); //Cache $cache .= '$info_box_contents[' .$row . '][' . $col . '] = array(\'align\' => \'center\', \'params\' => \'class="smallText" width="33%" valign="top"\', \'text\' => \'' . str_replace("'", "\'", $text) .'\');'; //Fin cache $col ++; if ($col > 2) { $col = 0; $row ++; } } new noborderBox($info_box_contents); //Cache /* $cache .= 'new contentBox($info_box_contents); ?>'; if(!is_dir($dircache)) { mkdir($dircache,0777); } $fp = fopen($filename , 'w'); $fout = fwrite($fp , $cache); fclose($fp); */ //Fin Cache ?> </td> <?php echo mws_footer(''); ?> </tr> </table> <!-- xsell_products_eof //--> <?php } else { /* there are no xsell products registered at all for this product */ $mtm= rand(); $xsell_cat_query = tep_db_query("select categories_id from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . $HTTP_GET_VARS['products_id'] . "'"); $xsell_cat_array = tep_db_fetch_array($xsell_cat_query); //var_dump($xsell_cat_array); $xsell_category = $xsell_cat_array['categories_id']; //echo "xsell_category " . $xsell_category . "<br>"; $new_limit = 3 - $num_products_xsell; // $new_limit = 3; //echo "new_limit " . $new_limit . "<br>"; $xsell_prod_query = tep_db_query("select distinct p.products_id, p.products_image, pd.products_name, p.products_tax_class_id, products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " pc, " . TABLE_PRODUCTS_DESCRIPTION . " pd where pc.categories_id = '" . $xsell_category . "' and pc.products_id = p.products_id and p.products_id != '" . $HTTP_GET_VARS['products_id'] . "' and p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' and p.products_status = '1' order by rand($mtm) desc limit " . $new_limit); $num_prod_query_xsell = tep_db_num_rows($xsell_prod_query); // echo "num_products_xsell is " . $num_prod_query_xsell . "<br>"; if ($num_prod_query_xsell > 0) { ?> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <?php echo mws_header(TEXT_XSELL_PRODUCTS); ?> <td> <?php $info_box_contents = array(); $info_box_contents[] = array('text' => TEXT_XSELL_PRODUCTS); new infoBoxHeading ($info_box_contents); $row = 0; $col = 0; $info_box_contents = array(); /* fill the box with all random products from the same category */ while ($xsell = tep_db_fetch_array($xsell_prod_query)) { $xsell['products_name'] = tep_get_products_name($xsell['products_id']); $xsell['specials_new_products_price'] = tep_get_products_special_price($xsell['products_id']); if ($xsell['specials_new_products_price']) { $xsell_price = '<s>' . $currencies->display_price($xsell['products_price'], tep_get_tax_rate($xsell['products_tax_class_id'])) . '</s><br>'; $xsell_price .= '<span class="productSpecialPrice">' . $currencies->display_price($xsell['specials_new_products_price'], tep_get_tax_rate($xsell['products_tax_class_id'])) . '</span>'; } else { $xsell_price = $currencies->display_price($xsell['products_price'], tep_get_tax_rate($xsell['products_tax_class_id'])); } // $text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $xsell['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $xsell['products_image'], $xsell['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $xsell['products_id']) . '">' . $xsell['products_name'] .'</a><br>' . $xsell_price. '<br>'; /* $info_box_contents[$row][$col] = array('align' => 'center', 'params' => 'class="smallText" width="33%" valign="top"', 'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $xsell['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $xsell['products_image'], $xsell['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $xsell['products_id']) . '">' . $xsell['products_name'] . '</a>'); */ $text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $xsell['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $xsell['products_image'], $xsell['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $xsell['products_id']) . '">' . $xsell['products_name'] .'</a><br>' . $xsell_price. '<br>'; //Fin cache $info_box_contents[$row][$col] = array('align' => 'center', 'params' => 'class="smallText" width="33%" valign="top"', 'text' => $text); $col ++; if ($col > 2) { $col = 0; $row ++; } } new noborderBox($info_box_contents); ?> </td> <?php echo mws_footer(''); ?> </tr> </table> <?php } } } } ?> The idea behind this code is that it finds out the product's parent category, then yanks other products from that same category and populates the x-sell box with it. I hope this helps. :) Cheers, Max
  23. Do you mean something like at this page: http://www.gamesdepot.com.au/arma-armed-as...-dvd-p-211.html, where under the main picture are suggestions about other things the customer might like? If so, it sounds like you're looking for a cross-sell contribution. Have a look here: http://addons.oscommerce.com/category?search=cross+sell I use the "X-Sell v2-MS2 - Cross Sell for MS2" contribution, available at http://addons.oscommerce.com/info/1415, which I've modified a little to produce random results instead of having to manually enter in cross-sells for every item. I hope this helps! Max
  24. Cyber, have you explored the use of EasyPopulate (http://addons.oscommerce.com/info/500'>http://addons.oscommerce.com/info/500)? It will export your products to a tab-delimited text file, which is easy to use with Excel. There are other contributions that will export orders to CSV or similar. Try "Export Order into CSV" (I haven't used this, so I don't know how good or bad it is) - http://addons.oscommerce.com/info/4181. Try searching the Add-ons site (http://addons.oscommerce.com/) for the word "export". This should give you a starting point. Cheers, Max
  25. Hey Ruth, long time no chat :) I believe you're after this line in catalog/includes/modules/shipping/auspost.php (and the others too) - around line 110: $shipping_auspost_method = MODULE_SHIPPING_AUSPOST_TEXT_WAY. " <b>" . $topcode . "</b> - " . $days . " " . MODULE_SHIPPING_AUSPOST_TEXT_SHIPPINGDAYS . "<br>" .$shipping_num_boxes . " " .MODULE_SHIPPING_AUSPOST_TEXT_BOXES . " " . $total_weight . MODULE_SHIPPING_AUSPOST_TEXT_UNITS . $auspost_addons; The stuff in capitals corresponds to strings found in catalog/includes/languages/english/modules/shipping/auspost.php: define('MODULE_SHIPPING_AUSPOST_TEXT_TITLE', 'AusPOST Parcel Post'); define('MODULE_SHIPPING_AUSPOST_TEXT_DESCRIPTION', 'AusPOST Parcel Post'); define('MODULE_SHIPPING_AUSPOST_TEXT_UNITS', 'kg(s)'); define('MODULE_SHIPPING_AUSPOST_TEXT_BOXES', 'boxes'); //define('MODULE_SHIPPING_AUSPOST_TEXT_INCLUDE', 'incl'); define('MODULE_SHIPPING_AUSPOST_TEXT_HANDLING', 'handling'); define('MODULE_SHIPPING_AUSPOST_TEXT_INSURANCE', 'insurance'); // define('MODULE_SHIPPING_AUSPOST_TEXT_SHIPPINGDAYS', 'days Estimated Delivery Time*'); //define('MODULE_SHIPPING_AUSPOST_TEXT_SHIPPINGDAYS', 'days Estimated Delivery Time*'); define('MODULE_SHIPPING_AUSPOST_TEXT_SHIPPINGDAYS', 'days Estimated Delivery Time'); define('MODULE_SHIPPING_AUSPOST_TEXT_WAY', 'Delivery to'); define('MODULE_SHIPPING_AUSPOST_TEXT_ERROR', '<font color="#FF0000">ERROR:</font></b> The delivery rate for this option cannot be determined at this time<br>If you prefer to use this option as your shipping method, please contact the store owner.'); (note, this is from my store and is slightly modified, but you get the drift) I think you'll need to change the line of code above to something like: $shipping_auspost_method = MODULE_SHIPPING_AUSPOST_TEXT_WAY. " <b>" . $topcode . "</b> - " . $days . " " . MODULE_SHIPPING_AUSPOST_TEXT_SHIPPINGDAYS; The shipping module gets the delivery time estimate directly from the DRC web site, and is generally a reflection of the shipping estimates you'll get from looking on the auspost.com.au web site. The shipping module is just telling you what it's been told by DRC. When you say the shipping date estimates are wrong, have you checked on the aussie post site to see what their take is on it? Max
×
×
  • Create New...