Jump to content
Latest News: (loading..)

Bozmium

Members
  • Content count

    88
  • Joined

  • Last visited

1 Follower

About Bozmium

  • Birthday 10/07/1975

Profile Information

Recent Profile Visitors

5,876 profile views
  1. Hey Max, Had a similar problem as i use the wolfen featured sets and realised that all my "buy now" buttons on the homepage were basically going nowhere and giving a 404 not found error. Its odd as the buy now buttons in the reviews section were still working fine but i note that they use a slightly different routine. My fix was to simply turn off automatic redirects in the SEO url config page and voila all my buy now buttons now work correctly. If anyone has a fix for this that i have missed would love to see it! Hope this helps someone - not exactly a fix but will give you your buttons back. Cheers
  2. Bozmium

    Multi_Vendor_Shipping new thread

    Hi Forum, Ok the very last thing i have to do to make MVS fully functional in my shop is to get the old shipping estimator working. It works at the moment but does not pull any values (obviously!) So is showing no info. I have had a look at the file i need to change which i have posted below (apologies in advance for the large post!) but am stumped as to where to begin. Has anybody done this before or is anyone able to point me in the right direction? shipping_estimator.php <!-- shipping_estimator //--> <script language="JavaScript"> function shipincart_submit(sid){ if(sid){ document.estimator.sid.value=sid; } document.estimator.submit(); return false; } </script> <table align="center"><tr valign="top"><td> <?php // Only do when something is in the cart if ($cart->count_contents() > 0) { require(DIR_WS_LANGUAGES . $language . '/modules/' . FILENAME_SHIPPING_ESTIMATOR); // shipping cost require('includes/classes/http_client.php'); // shipping in basket //if($cart->get_content_type() !== 'virtual') { if (tep_session_is_registered('customer_id')) { // user is logged in if (isset($HTTP_POST_VARS['address_id'])){ // user changed address $sendto = $HTTP_POST_VARS['address_id']; }elseif (tep_session_is_registered('cart_address_id')){ // user once changed address $sendto = $cart_address_id; }else{ // first timer $sendto = $customer_default_address_id; } // set session now $cart_address_id = $sendto; tep_session_register('cart_address_id'); // set shipping to null ! multipickup changes address to store address... $shipping=''; // include the order class (uses the sendto !) require(DIR_WS_CLASSES . 'order.php'); $order = new order; }else{ // user not logged in ! if (isset($HTTP_POST_VARS['country_id'])){ // country is selected $country_info = tep_get_countries($HTTP_POST_VARS['country_id'],true); $order->delivery = array('postcode' => $HTTP_POST_VARS['zip_code'], 'country' => array('id' => $HTTP_POST_VARS['country_id'], 'title' => $country_info['countries_name'], 'iso_code_2' => $country_info['countries_iso_code_2'], 'iso_code_3' => $country_info['countries_iso_code_3']), 'country_id' => $HTTP_POST_VARS['country_id'], //add state zone_id 'zone_id' => $HTTP_POST_VARS['state'], 'format_id' => tep_get_address_format_id($HTTP_POST_VARS['country_id'])); $cart_country_id = $HTTP_POST_VARS['country_id']; tep_session_register('cart_country_id'); //add state zone_id $cart_zone = $HTTP_POST_VARS['zone_id']; tep_session_register('cart_zone'); $cart_zip_code = $HTTP_POST_VARS['zip_code']; tep_session_register('cart_zip_code'); }elseif (tep_session_is_registered('cart_country_id')){ // session is available $country_info = tep_get_countries($cart_country_id,true); $order->delivery = array('postcode' => $cart_zip_code, 'country' => array('id' => $cart_country_id, 'title' => $country_info['countries_name'], 'iso_code_2' => $country_info['countries_iso_code_2'], 'iso_code_3' => $country_info['countries_iso_code_3']), 'country_id' => $cart_country_id, 'format_id' => tep_get_address_format_id($cart_country_id)); } else { // first timer $cart_country_id = STORE_COUNTRY; tep_session_register('cart_country_id'); $country_info = tep_get_countries(STORE_COUNTRY,true); tep_session_register('cart_zip_code'); $order->delivery = array(//'postcode' => '', 'country' => array('id' => STORE_COUNTRY, 'title' => $country_info['countries_name'], 'iso_code_2' => $country_info['countries_iso_code_2'], 'iso_code_3' => $country_info['countries_iso_code_3']), 'country_id' => STORE_COUNTRY, 'format_id' => tep_get_address_format_id($HTTP_POST_VARS['country_id'])); } // set the cost to be able to calculate free shipping $order->info = array('total' => $cart->show_total(), // TAX ???? 'currency' => $currency, 'currency_value'=> $currencies->currencies[$currency]['value']); } // weight and count needed for shipping $total_weight = $cart->show_weight(); $total_count = $cart->count_contents(); require(DIR_WS_CLASSES . 'shipping.php'); $shipping_modules = new shipping; $quotes = $shipping_modules->quote(); $order->info['subtotal'] = $cart->total; // set selections for displaying $selected_country = $order->delivery['country']['id']; $selected_address = $sendto; //} // eo shipping cost // check free shipping based on order total if ( defined('MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING') && (MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING == 'true')) { switch (MODULE_ORDER_TOTAL_SHIPPING_DESTINATION) { case 'national': if ($order->delivery['country_id'] == STORE_COUNTRY) $pass = true; break; case 'international': if ($order->delivery['country_id'] != STORE_COUNTRY) $pass = true; break; case 'both': $pass = true; break; default: $pass = false; break; } $free_shipping = false; if ( ($pass == true) && ($order->info['total'] >= MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER)) { $free_shipping = true; include(DIR_WS_LANGUAGES . $language . '/modules/order_total/ot_shipping.php'); } } else { $free_shipping = false; } // begin shipping cost if(!$free_shipping && $cart->get_content_type() !== 'virtual'){ if (tep_not_null($HTTP_POST_VARS['sid'])){ list($module, $method) = explode('_', $HTTP_POST_VARS['sid']); $cart_sid = $HTTP_POST_VARS['sid']; tep_session_register('cart_sid'); }elseif (tep_session_is_registered('cart_sid')){ list($module, $method) = explode('_', $cart_sid); }else{ $module=""; $method=""; } if (tep_not_null($module)){ $selected_quote = $shipping_modules->quote($method, $module); if($selected_quote[0]['error'] || !tep_not_null($selected_quote[0]['methods'][0]['cost'])){ $selected_shipping = $shipping_modules->cheapest(); $order->info['shipping_method'] = $selected_shipping['title']; $order->info['shipping_cost'] = $selected_shipping['cost']; $order->info['total']+= $selected_shipping['cost']; }else{ $order->info['shipping_method'] = $selected_quote[0]['module'].' ('.$selected_quote[0]['methods'][0]['title'].')'; $order->info['shipping_cost'] = $selected_quote[0]['methods'][0]['cost']; $order->info['total']+= $selected_quote[0]['methods'][0]['cost']; $selected_shipping['title'] = $order->info['shipping_method']; $selected_shipping['cost'] = $order->info['shipping_cost']; $selected_shipping['id'] = $selected_quote[0]['id'].'_'.$selected_quote[0]['methods'][0]['id']; } }else{ $selected_shipping = $shipping_modules->cheapest(); $order->info['shipping_method'] = $selected_shipping['title']; $order->info['shipping_cost'] = $selected_shipping['cost']; $order->info['total']+= $selected_shipping['cost']; } } // virtual products use free shipping if($cart->get_content_type() == 'virtual') { $order->info['shipping_method'] = CART_SHIPPING_METHOD_FREE_TEXT . ' ' . CART_SHIPPING_METHOD_ALL_DOWNLOADS; $order->info['shipping_cost'] = 0; } if($free_shipping) { $order->info['shipping_method'] = MODULE_ORDER_TOTAL_SHIPPING_TITLE; $order->info['shipping_cost'] = 0; } $shipping=$selected_shipping; // end of shipping cost // end free shipping based on order total $info_box_contents = array(); $info_box_contents[] = array('text' => CART_SHIPPING_OPTIONS); new ContentBoxHeading($info_box_contents, true, true); $ShipTxt= tep_draw_form('estimator', tep_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'), 'post'); //'onSubmit="return check_form();"' $ShipTxt.=tep_draw_hidden_field('sid', $selected_shipping['id']); $ShipTxt.='<table>'; if(sizeof($quotes)) { if (tep_session_is_registered('customer_id')) { // logged in if (CARTSHIP_SHOWWT == 'true') { $showweight = ' (' . $total_weight . ' ' . CARTSHIP_WTUNIT . ')'; } else { $showweight = ''; } if(CARTSHIP_SHOWIC == 'true'){ $ShipTxt.='<tr><td colspan=6><span class="smallAmber"><center>SELECT THE APPROPRIATE OPTION BELOW AS INDICATED AT THE BOTTOM OF THE PRODUCTS PAGE</span><BR><span class="smallText">AUSPOST ONLY SUITABLE FOR SMALLER NON ELECTRONIC ITEMS SUCH AS TORCHES & BATTERIES.<BR>AAE IS NORMALLY YOUR MOST EFFICIENT CHOICE FOR SMALLER ORDERS GOING INTERSTATE, STAR FOR LOCAL.<BR>AIRROAD FOR LARGER ITEMS GOING INTERSTATE SUCH AS MONITORS, SET TOP BOXES & PC CASES, PRINTERS<br>PLEASE NOTE: All figures shown here are based on despatch from Melbourne.<br>For large items such as printers, monitors & Cases please <a href="'.tep_ascii_email(1, "XXXXX@bozcorptech.com.au").'"><u>Contact Us</u></a><br>We can often have items despatched from our interstate warehouses located closer to you to reduce your freight costs. Its often worth the email!<BR>METRO: within approx 20km of the city center.<br>OUTER: Everywhere else<br>BCT DOES NOT OFFER PICKUPS</center></SPAN></td></tr><tr><td class="smallAmber">' . ($total_count == 1 ? ' <b>Item:</b></td><td colspan="2" class="smalltext">' : ' <b>Items:</b></td><td colspan="2" class="smalltext">') . $total_count . $showweight . '</td></tr>'; } $addresses_query = tep_db_query("select address_book_id, entry_city as city, entry_postcode as postcode, entry_state as state, entry_zone_id as zone_id, entry_country_id as country_id from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . $customer_id . "'"); // only display addresses if more than 1 if (tep_db_num_rows($addresses_query) > 1){ while ($addresses = tep_db_fetch_array($addresses_query)) { $addresses_array[] = array('id' => $addresses['address_book_id'], 'text' => tep_address_format(tep_get_address_format_id($addresses['country_id']), $addresses, 0, ' ', ' ')); } $ShipTxt.='<tr><td colspan="3" class="smallAmber" nowrap>' . CART_SHIPPING_METHOD_ADDRESS .' '. tep_draw_pull_down_menu('address_id', $addresses_array, $selected_address, 'onchange="return shipincart_submit(\'\');"').'</td></tr>'; } $ShipTxt.='<tr valign="top"><td class="smallAmber"><b>' . CART_SHIPPING_METHOD_TO .'</b> </td><td colspan="2" class="smalltext">'. tep_address_format($order->delivery['format_id'], $order->delivery, 1, ' ', '<br>') . '</td></tr>'; } else { // not logged in // $ShipTxt.=tep_output_warning(CART_SHIPPING_OPTIONS_LOGIN); if(CARTSHIP_SHOWIC == 'true'){ $ShipTxt.='<tr><td colspan=6><span class="smallAmber"><center>SELECT THE APPROPRIATE OPTION BELOW AS INDICATED AT THE BOTTOM OF THE PRODUCTS PAGE</span><BR><span class="smallText">AUSPOST ONLY SUITABLE FOR SMALLER NON ELECTRONIC ITEMS SUCH AS TORCHES & BATTERIES.<BR>AAE IS NORMALLY YOUR MOST EFFICIENT CHOICE FOR SMALLER ORDERS GOING INTERSTATE, STAR FOR LOCAL.<BR>AIRROAD FOR LARGER ITEMS GOING INTERSTATE SUCH AS MONITORS, SET TOP BOXES & PC CASES, PRINTERS<br>PLEASE NOTE: All figures shown here are based on despatch from Melbourne.<br>For large items such as printers, monitors & Cases please <a href="'.tep_ascii_email(1, "XXXXX@bozcorptech.com.au").'"><u>Contact Us</u></a><br>We can often have items despatched from our interstate warehouses located closer to you to reduce your freight costs. Its often worth the email!<BR>METRO: within approx 20km of the city center.<br>OUTER: Everywhere else<br>BCT DOES NOT OFFER PICKUPS</center></td></tr><tr><td class="smallAmber">' . ($total_count == 1 ? ' <b>Item:</b></td><td colspan="2" class="smalltext">' : ' <b>Items:</b></td><td colspan="2" class="smalltext">') . $total_count . $showweight . '</td></tr>'; } if($cart->get_content_type() != 'virtual'){ if(CARTSHIP_SHOWCDD == 'true'){ $ShipTxt.='<tr><td colspan="3" class="smallAmber" nowrap>' . ENTRY_COUNTRY .' '. tep_get_country_list('country_id', $selected_country,'style="width=200"'); } //add state zone_id $state_array[] = array('id' => '', 'text' => 'Please Select'); $state_query = tep_db_query("select zone_name, zone_id from " . TABLE_ZONES . " where zone_country_id = '$selected_country' order by zone_country_id DESC, zone_name"); while ($state_values = tep_db_fetch_array($state_query)) { $state_array[] = array('id' => $state_values['zone_id'], 'text' => $state_values['zone_name']); } if(CARTSHIP_SHOWSDD == 'true'){ $ShipTxt.=' ' .ENTRY_STATE .' '. tep_draw_pull_down_menu('state',$state_array); } if(CARTSHIP_SHOWZDD == 'true'){ $ShipTxt.=' '.ENTRY_POST_CODE .' '. tep_draw_input_field('zip_code', $selected_zip, 'size="5"'); } // $ShipTxt.=' <a href="_" onclick="return shipincart_submit(\'\');">'.CART_SHIPPING_METHOD_RECALCULATE.'</a></td></tr>'; if(CARTSHIP_SHOWUB == 'true'){ $ShipTxt.=' <td><a href="_" onclick="return shipincart_submit(\'\');">'. tep_image_button('Update.gif', IMAGE_BUTTON_UPDATE_CART) . ' </a></td></td></tr>'; } } } if($cart->get_content_type() == 'virtual'){ // virtual product-download //$ShipTxt.='<tr><td colspan="3" class="main">'.tep_draw_separator().'</td></tr>'; $ShipTxt.='<tr><td class="main" colspan="3"> </td></tr><tr><td class="main" colspan="3"><i>' . CART_SHIPPING_METHOD_FREE_TEXT . ' ' . CART_SHIPPING_METHOD_ALL_DOWNLOADS . '</i></td></tr>'; }elseif ($free_shipping==1) { // order $total is free //$ShipTxt.='<tr><td colspan="3" class="main">'.tep_draw_separator().'</td></tr>'; $ShipTxt.='<tr><td class="main" colspan="3"> </td></tr><tr><td class="largeGreen" colspan="3"><i>' . sprintf(FREE_SHIPPING_DESCRIPTION, $currencies->format(MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER)) . '</i></td><td> </td></tr>'; }else{ // shipping display $ShipTxt.='<tr><td colspan="3" class="main"> </td></tr><tr><td class="smallAmber"><b><u>' . CART_SHIPPING_CARRIER_TEXT . '</u></b></td><td class="smallAmber" align="left"><b><u>' . CART_SHIPPING_METHOD_TEXT . '</u></b></td><td class="smallAmber" colspan="2" align="right"><b><u>' . CART_SHIPPING_METHOD_RATES . '</u></b></td></tr>'; $ShipTxt.='<tr><td colspan="3" class="footer">'.tep_draw_separator().'</td></tr>'; for ($i=0, $n=sizeof($quotes); $i<$n; $i++) { if(sizeof($quotes[$i]['methods'])==1){ // simple shipping method $thisquoteid = $quotes[$i]['id'].'_'.$quotes[$i]['methods'][0]['id']; $ShipTxt.= '<tr class="'.$extra.'">'; $ShipTxt.='<td class="main">'.$quotes[$i]['icon'].' </td>'; if($quotes[$i]['error']){ $ShipTxt.='<td colspan="2" class="smallText">'.$quotes[$i]['module'].' '; $ShipTxt.= '('.$quotes[$i]['error'].')</td></tr>'; }else{ if($selected_shipping['id'] == $thisquoteid){ $ShipTxt.='<td class="infoBoxHeading"><a title="Select this method" href="_" onclick="return shipincart_submit(\''.$thisquoteid.'\');"><b>'.$quotes[$i]['module'].' '; $ShipTxt.= ''.$quotes[$i]['methods'][0]['title'].'</b></a> </td><td align="right" class="infoBoxHeading"><b>'.$currencies->format(tep_add_tax($quotes[$i]['methods'][0]['cost'], $quotes[$i]['tax'])).'</b></td><td class="smalltext">'.tep_image(DIR_WS_ICONS . 'selected.gif', 'Selected').'</td></tr>'; }else{ $ShipTxt.='<td class="smalltext"><a title="Select this method" href="_" onclick="return shipincart_submit(\''.$thisquoteid.'\');">'.$quotes[$i]['module'].' '; $ShipTxt.= ''.$quotes[$i]['methods'][0]['title'].'</a> </td><td align="right" colspan="2" class="smalltext">'.$currencies->format(tep_add_tax($quotes[$i]['methods'][0]['cost'], $quotes[$i]['tax'])).'</td></tr>'; } } } else { // shipping method with sub methods (multipickup) for ($j=0, $n2=sizeof($quotes[$i]['methods']); $j<$n2; $j++) { $thisquoteid = $quotes[$i]['id'].'_'.$quotes[$i]['methods'][$j]['id']; $ShipTxt.= '<tr class="'.$extra.'">'; $ShipTxt.='<td class="smalltext">'.$quotes[$i]['icon'].' </td>'; if($quotes[$i]['error']){ $ShipTxt.='<td colspan="2" class="smalltext">'.$quotes[$i]['module'].' '; $ShipTxt.= '('.$quotes[$i]['error'].')</td></tr>'; }else{ if($selected_shipping['id'] == $thisquoteid){ $ShipTxt.='<td class="infoBoxHeading"><a title="Select this method" href="_" onclick="return shipincart_submit(\''.$thisquoteid.'\');"><b>'.$quotes[$i]['module'].' '; $ShipTxt.= ''.$quotes[$i]['methods'][$j]['title'].'</b></a> </td><td align="right" class="infoBoxHeading"><b>'.$currencies->format(tep_add_tax($quotes[$i]['methods'][$j]['cost'], $quotes[$i]['tax'])).'</b></td><td class="smalltext">'.tep_image(DIR_WS_ICONS . 'selected.gif', 'Selected').'</td></tr>'; }else{ $ShipTxt.='<td class="smalltext"><a title="Select this method" href="_" onclick="return shipincart_submit(\''.$thisquoteid.'\');">'.$quotes[$i]['module'].' '; $ShipTxt.= ''.$quotes[$i]['methods'][$j]['title'].'</a> </td><td align="right" colspan="2" class="smalltext">'.$currencies->format(tep_add_tax($quotes[$i]['methods'][$j]['cost'], $quotes[$i]['tax'])).'</td><td class="smalltext"> </td></tr>'; } } } } } } } $ShipTxt.= '</table></form>'; $info_box_contents = array(); $info_box_contents[] = array('text' => $ShipTxt); new DarkInfoBox($info_box_contents); if (CARTSHIP_SHOWOT == 'true'){ // BOF get taxes if not logged in if (!tep_session_is_registered('customer_id')){ $products = $cart->get_products(); for ($i=0, $n=sizeof($products); $i<$n; $i++) { $products_tax = tep_get_tax_rate($products[$i]['tax_class_id'], $order->delivery['country_id'],$order->delivery['zone_id']); $products_tax_description = tep_get_tax_description($products[$i]['tax_class_id'], $order->delivery['country_id'], $order->delivery['zone_id']); if (DISPLAY_PRICE_WITH_TAX == 'true') { //Modified by Strider 42 to correct the tax calculation when a customer is not logged in // $tax_val = ($products[$i]['final_price']-(($products[$i]['final_price']*100)/(100+$products_tax)))*$products[$i]['quantity']; $tax_val = (($products[$i]['final_price']/100)*$products_tax)*$products[$i]['quantity']; } else { $tax_val = (($products[$i]['final_price']*$products_tax)/100)*$products[$i]['quantity']; } $order->info['tax'] += $tax_val; $order->info['tax_groups']["$products_tax_description"] += $tax_val; // Modified by Strider 42 to correct the order total figure when shop displays prices with tax if (DISPLAY_PRICE_WITH_TAX == 'true') { $order->info['total']; } else { $order->info['total']+=$tax_val; } } } // EOF get taxes if not logged in (seems like less code than in order class) require(DIR_WS_CLASSES . 'order_total.php'); $order_total_modules = new order_total; //echo '</td><td align="right">'; // order total code $order_total_modules->process(); $info_box_contents = array(); $info_box_contents[] = array('text' => CART_OT); new ContentBoxHeading($info_box_contents, true, true); $otTxt='<table align="right">'; $otTxt.=$order_total_modules->output().'</table>'; $info_box_contents = array(); $info_box_contents[] = array('text' => $otTxt); new DarkInfoBox($info_box_contents); } } else { echo '<table align="center"><tr><td class="largeGreen"><i>Please login to view shipping and order total estimates.</i></td></tr></table>'; } ?> </td></tr></table> Cheers & thanks!
  3. Bozmium

    Multi_Vendor_Shipping new thread

    Hi guys, Thanks for that not sure how i missed those my editor is supposed to match pairs of braces! Ill make sure i havent inadvertently switched it off and ill give it another whirl. Thanks again!
  4. Bozmium

    Multi_Vendor_Shipping new thread

    Ok heres one for one of the authors or someone more familiar with MVS. Trying to get the TNT shipping module working in MVS - this one here: TNT Aus based shipping on PCode I have followed the modules.txt rundown included with MVS on how to modify modules and think ive almost got it pegged. Unfortunately it keeps throwing this error up at me when in the Vendor manager window: Parse error: syntax error, unexpected $end in /home/bozcorpt/public_html/includes/modules/vendors_shipping/tntzipzonesroad.php on line 182 So i have missed or mucked something somewhere - line 182 incidentally is the very last line and is simply the closing php tag ?>. My parser is telling me that <?php is expected?! If there is anyone here who would be kind enough to have a quick look over this module and maybe point out where i have mucked up i would be very grateful. This can then be thrown onto the download page to join the other shipping modules already ported. This module is designed for Aus based TNT but no reason why it couldnt be altered easily via the rate tables and language files to be applicable anywhere. Here we go: <?php /* Released under the GNU General Public License */ class tntzipzonesroad { var $code, $title, $description, $enabled, $num_zones, $surcharge_factor, $sort_order, $vendors_id; // class constructor: function tntzipzonesroad() { global $order, $vendors_id; $this->vendors_id = ($products['vendors_id'] <= 0) ? 1 : $products['vendors_id']; $this->code = 'tntzipzonesroad'; $this->title = MODULE_SHIPPING_TNTZIPZONESROAD_TEXT_TITLE; $this->description = MODULE_SHIPPING_TNTZIPZONESROAD_TEXT_DESCRIPTION; $this->icon = DIR_WS_ICONS . ''; // $this->enabled = MODULE_SHIPPING_TNTZIPZONESROAD_STATUS; // Customize this setting for the number of zones needed (no change required by default) // $this->num_zones = 1; function num_zones($vendors_id='1') { $this->num_zones = constant('1' . $vendors_id); return $this->num_zones; } //More options can be added later for Express, Overnight etc when someone codes it. $this->types = array('TNT Off-Peak' => 'std'); // Change this surcharge factor to increase your profit margin on freight // $this->surcharge_factor = 1.1; function surcharge_factor($vendors_id='1') { $this->surcharge_factor = constant('1.1' . $vendors_id); return $this->surcharge_factor; } function sort_order($vendors_id='1') { $sort_order = 'MODULE_SHIPPING_TNTZIPZONESROAD_SORT_ORDER_' . $vendors_id; if (defined($sort_order)) { $this->sort_order = constant($sort_order); } else { $this->sort_order = '-'; } return $this->sort_order; } function tax_class($vendors_id='1') { $this->tax_class = constant('MODULE_SHIPPING_TNTZIPZONESROAD_CLASS_' . $vendors_id); return $this->tax_class; } function enabled($vendors_id='1') { $this->enabled = false; $status = @constant('MODULE_SHIPPING_TNTZIPZONESROAD_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_TNTZIPZONESROAD_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_TABLE_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; } // class methods function quote($method = '', $module = '', $vendors_id = '1') { global $HTTP_POST_VARS, $order, $shipping_weight, $shipping_num_boxes, $cart; // First get the dest zip and check the db for our dest zone $zip = $order->delivery['postcode']; if ( $zip == '' ){ // Something is wrong, we didn't find any zone if ($this->enabled($vendors_id) < 1) { $this->quotes['error'] = MODULE_SHIPPING_TNTZIPZONESROAD_NO_ZIPCODE_FOUND; return $this->quotes; } $sql = "SELECT * FROM tnt_zones WHERE $zip >= t_postcode and $zip <= t_postcode"; $qResult = tep_db_query($sql); // run the query $rec = tep_db_fetch_array($qResult); // get the first row of the result $zone_id = $rec['t_zone']; if ( $zone_id == '' ){ // Something is wrong, we didn't find any zone $this->quotes['error'] = MODULE_SHIPPING_TNTZIPZONESROAD_NO_ZONE_FOUND; return $this->quotes; } $sql = "SELECT t_rate FROM tnt_rates_road WHERE t_zone_id = '$zone_id'"; $qResult = tep_db_query($sql); while ($rec = tep_db_fetch_array($qResult)) {$retArr[] = $rec;} foreach($retArr as $aquote){ $cost = $aquote['t_rate']; } // Consignment charge insertion start $sql = "SELECT t_ccharge FROM tnt_rates_road WHERE t_zone_id = '$zone_id'"; $qResult = tep_db_query($sql); while ($rec = tep_db_fetch_array($qResult)) {$retArr[] = $rec;} foreach($retArr as $aquote){ $ccharge = $aquote['t_ccharge']; // Consignment charge insertion end } $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; } if ($shipping_weight <= '15') { $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_TNTZIPZONESROAD_TEXT_TITLE, 'methods' => array(array('id' => $this_code, 'title' => MODULE_SHIPPING_TNTZIPZONESROAD_TEXT_DESCRIPTION, // 'cost' => ((($ccharge)*1.10)* $this->surcharge_factor)+ MODULE_SHIPPING_TNTZIPZONESROAD_HANDLING))); 'cost' => $shipping + $handling)));} else { $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_TNTZIPZONESROAD_TEXT_TITLE, 'methods' => array(array('id' => $this_code, 'title' => MODULE_SHIPPING_TNTZIPZONESROAD_TEXT_DESCRIPTION, // 'cost' => ((($cost * ($shipping_weight - 15) + $ccharge)*1.10)* $this->surcharge_factor)+ MODULE_SHIPPING_TNTZIPZONESROAD_HANDLING))); 'cost' => $shipping + $handling)));} //1.10 added to calculate 10% GST on freight in Australia // if (tep_not_null($this->icon)) $this->quotes['icon'] = tep_image($this->icon, $this->title); if ($error == true) $this->quotes['error'] = MODULE_SHIPPING_TNTLZIPZONES_INVALID_ZONE; return $this->quotes; } // function check() { function check($vendors_id='1') { if (!isset($this->_check)) { $check_query = tep_db_query("select configuration_value from " . TABLE_VENDOR_CONFIGURATION . "where vendors_id = '". $vendors_id ."' and configuration_key = 'MODULE_SHIPPING_TNTZIPZONESROAD_STATUS_".$vendors_id . "'"); $this->_check = tep_db_num_rows($check_query); } return $this->_check; } // 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, date_added, vendors_id) VALUES ('Enable TNT Postcode Zones Method', 'MODULE_SHIPPING_TNTZIPZONESROAD_STATUS_" . $vendors_id . "', '1', 'Do you want to offer TNT postcode/zone rate shipping?', '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_TNTZIPZONESROAD_HANDLING_" . $vendors_id . "', '0', 'Handling Fee for this shipping method', '6', '0', now(), '" . $vendors_id . "')"); } // function remove() { function remove($vendors_id) { $keys = ''; $keys_array = $this->keys(); for ($i=0; $i<sizeof($keys_array); $i++) { $keys .= "'" . $keys_array[$i] . "',"; } $keys = substr($keys, 0, -1); 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) { $keys = array( 'MODULE_SHIPPING_TNTZIPZONESROAD_STATUS_'. $vendors_id, 'MODULE_SHIPPING_TNTZIPZONESROAD_HANDLING_' . $vendors_id ); return $keys; } } ?> Any help appreciated!
  5. Bozmium

    Multi_Vendor_Shipping new thread

    Just a quicky in addition to this - i am looking at installing the individual prices addon to handle a couple of my heavy items but wanted to confirm: If there is no individual price specified on an item will it default back to the tables or does a value have to be input for every item? i.e. Does it work in addition to, or as a replacement for the tables? Any clarification appreciated!
  6. Bozmium

    Multi_Vendor_Shipping new thread

    No one done this before - hmmmmmm. The alternative is to create a heap of standard table rates (now those i do know how to duplicate no probs!) This would mean having about 14 seperate tables installed - 2 zones in each of 7 states - no big issue to do but would that entail any performance issues i should be aware of? My thinking was if i could make an instance of MZMT for each Vendor then it would be a way around this but seems not possible. Any tips from those in the know? :huh: Cheers!
  7. Hi Guys, Love this mod its an absolute must have - one question - i need to duplicate the MZMT file so that i can have two seperate instances with seperate language files - anyone know what i have to change? Im running the MVS mod with the tweaked MZMT module to suit (which is 'almost' identical) and need to apply MZMT to a second vendor, and hence a second MZMT language file. Have had a roll amongst the code and ALMOST got it working by calling everything MZMT2 but its still seeing it as an installed version of the original so i have obviously missed something. So how do i go about duplicating this baby for a second MZMT module. Any tips met with fawning gratitude! Cheers! :)
  8. Bozmium

    Multi_Vendor_Shipping new thread

    Ok a quicky for those familiar with the MZMT addon for MVS - i need to instigate a second instance of MZMT for a second vendor. Whats the easiest way to duplicate the MZMT.php file to create a second instance? The reason for this is i need another set of zones and tables for another courier and i have already customised the one existing MZMT language file in its current setup - so i basically need to be able to activate a seperate MZMT for another vendor. Anyone know the tweaks? Have tried by creating MZMT2_ in place of MZMT in all the calls and tables & renaming the file MZMT2.php but it sees it as an installed instance of the original - so i have missed something somewhere that im not seeing! Cheers & thanks! :)
  9. Bozmium

    Multi_Vendor_Shipping new thread

    OOps sorry for the double post there guys. Just for anyone else who has experienced tax issues - somehow/somewhere my tax zone id in my SQL database has been changed and not been repointed - i went into SQL and changed the tax zone id to match my Australia country code - and voila all my prices are now showing correctly - but still not on shipping taxes - im guessing thats a similar issue with the zones to geozeones or a tax rate id somewhere and will poke around in the database till i find it, but expect that once i do all my shipping will revert to normal and i can take out all my temporary hacks . :D Just for anyone else having tax issues with or without MVS. Cheers & thanks!
  10. Bozmium

    Multi_Vendor_Shipping new thread

    Hi guys, Whoa - been some serious work going on here! See the new V1.1 is up - looks like i have some serious comparing to do as i am still running the beta versions (hacked to bits of course) - and yes still having shipping tax issues so might just find the problem in the new files. Just a quick one - has anyone got this working with the Ship In Cart (aka Shipping Estimator) v2.20 by Acheron? (Or any of its derivitives)? Used to have this working mighty fine with the standard shipping but of course now shes died as she knows not where to look for the info - have started to have a play amongst the code but would love to hear anything from someone who actually knows what they are doing. :blush: Keep up the good work guys - this is going to be the single biggest addition to OScomm in my opinion. :thumbsup: Cheers!
  11. Bozmium

    Multi_Vendor_Shipping new thread

    Hi guys, Whoa - been some serious work going on here! See the new V1.1 is up - looks like i have some serious comparing to do as i am still running the beta versions (hacked to bits of course) - and yes still having shipping tax issues so might just find the problem in the new files. Just a quick one - has anyone got this working with the Ship In Cart (aka Shipping Estimator) v2.20 by Acheron? (Or any of its derivitives)? Used to have this working mighty fine with the standard shipping but of course now shes died as she knows not where to look for the info - have started to have a play amongst the code but would love to hear anything from someone who actually knows what they are doing. :blush: Keep up the good work guys - this is going to be the single biggest addition to OScomm in my opinion. :thumbsup: Cheers!
  12. Bozmium

    Multi_Vendor_Shipping new thread

    Thanks DJ for sharing that fix - I was playing with this way back before MVS went final and nearly burst a blood vessel in my eye trying to fix it. Works a treat! Thanks heaps. :D
  13. Bozmium

    TinyMCE

    Greetings Forum, There seems to be a few scattered mentions of good old tinyMCE about the forums but i cant see a forum dedicated to it, so i have started this thread. Some like TinyMCE, some prefer FCK Editor - tell us the pros and cons and why! Ill kick this thread off with some info i posted in some other thread somewhere about the place - perhaps it will be of interest, and found by more people, in a specifically TinyMCE thread. I have found an interesting fork on this great little WYSIWYG editor called TinyFCK - some clever chap has integrated the FCK file browser functions with TinyMCE which only has a paid file browser and sorely cries out for this addition. See it here: http://p4a.sourceforge.net/tinyfck or if you go here there is an updated Zip posted with the latest TinyMCE: http://sourceforge.net/forum/forum.php?forum_id=528776 There is also a plethora of groovy plugins for TinyMCE here: http://sourceforge.net/tracker/?atid=73874...281&func=browse The iBrowser plugin rocks and i highly recommend getting it added onto your TinyMCE. It even caches your product thumbs in admin via the GDLibrary, and you can set all sorts of limits and purge controls for controlling the number and size of thumb files in your cache folder! Tiny MCE runs a treat in all my editing fields but i have one question for someone who may be more familiar/more intelligent than a splice hack like myself: I wish to integrate tinymce into the image URL where i now have the MAXIDVD WYSIWYG html area. This currently works by popping up a file browser window from which you select an image and then it plops your URL into the text field - beautiful. Im sure most shops have this by now. Id like to be able to do the same thing with TinyMCE but am not sure how to achieve it. Alternatively if anyone knows how to replace the product description field with tinymce while retaining the HTML area image URL functionality - that would also be great - as it stands i havent yet figured out how to do this - its one or the other! Anyone else with some great TinyMCE or FCK edit hacks or add ons/skins/mods or updates please feel free to comment! Cheers! :D
  14. Bozmium

    Multi_Vendor_Shipping new thread

    Hi Jim, Ok i have tried a few things and found: Chemos tep get tax rate was in fact upsetting my tax system & zones. I have found a fix relating to it which means i have now set my tax zones up the way they are meant to be - all good - but im wondering if it is an issue with shipping somehow as far as tax goes? Who knows. All i know is that selecting a tax zone or tax rate in any of the shipping module drop downs in MVS has 0 effect. I have one tax class - Taxable goods - set at a rate of 10% at priority 1 and it gets applied to goods and shipping alike. At the moment i have brutally hacked my way through all the shipping and ordering pages and hardcoded a 10% tax in on all the prices. *1.1 & /11 & all sorts of ugly dividers and multipliers all over the place but it works. I am also wondering if i am supposed to be setting a special "shipping tax" tax zone with a seperate shipping tax class? I have seen a number of different variations on the theme but none seem to have any effect. All is working anyway - the only thing i cant get it to do is add the credit card surcharge tax to the tax total, but i can live with that for the moment. All my order total/OT_XXX.php files are still bog standard oscommerce i have compared them all. I would post the hacks i have done but fear it may be darkly disturbing for some. For now i will get my shop up and running again, and will come back to tweak the code when it calms down a bit. Great add on guys thanks. :thumbsup:
  15. Bozmium

    Multi_Vendor_Shipping new thread

    Hi Jim, Aha! I see! Thanks for getting back. What i will do if that is the case is just disable the rowSelect function so that the clients will have to go by the radio button. Be interested to see if its actually possible to do the way you said. Cheers :thumbsup:
×