osjunkie

Members
  • Content count

    225
  • Joined

  • Last visited

Community Reputation

0 Neutral

1 Follower

About osjunkie

  • Birthday 02/13/1979

Profile Information

  • Real Name
    Brad Thompson
  • Location
    Winnipeg, Canada
  • Interests
    OSC

Contact Methods

  1. Great work guys. Enough info here to get it working with images. Only question now is how to make the editor larger (longer) and how to make it work with FireFox. Anyone?
  2. Cool.
  3. 90 SECONDS FOR A QUERY! Well, what can I say... I am stress testing this contribution and found eveything very good except for one query. Fix this and you have a great system going on. Products: 60,000 Categories: 561 Manufacturers: 285 Query EXPLAIN SELECT DISTINCT m.manufacturers_id AS id, m.manufacturers_name AS name FROM products p, products_to_categories p2c, products_to_stores p2s, manufacturers m, manufacturers_to_stores m2s WHERE p.products_status = '1' AND p.manufacturers_id = m.manufacturers_id AND m.manufacturers_id = m2s.manufacturers_id AND p.products_id = p2c.products_id AND p2c.categories_id = '336' AND p2s.stores_id = m2s.stores_id AND m2s.stores_id = '1' ORDER BY m.manufacturers_name Explain output id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE p2c index PRIMARY PRIMARY 8 NULL 44437 Using where; Using index; Using temporary; Using f... 1 SIMPLE p eq_ref PRIMARY PRIMARY 4 digital_hardware.p2c.products_id 1 Using where 1 SIMPLE p2s index NULL PRIMARY 8 NULL 59075 Using index 1 SIMPLE m eq_ref PRIMARY PRIMARY 4 digital_hardware.p.manufacturers_id 1 1 SIMPLE m2s eq_ref PRIMARY PRIMARY 8 digital_hardware.m.manufacturers_id,const 1 Using where; Using index; Distinct Any ideas on optimization?
  4. Shouldn't your root dir be the file system?
  5. Easy Populate is a very important file for owners with virtual inventories that need to maintain their inventory. Currently I have two solutions to manage my site. I have a custom update program that updates the Qty, cost and marks up the retail a given percentage that is set in the code. I use Easy Populate for intial installation of products, usually 25,000+ at a time. The features that should be included to perfect EP are the following: - Ability to on the fly adjust the retail price by percentage. (Round of to .99) (Would be cool to set categories or products a percentage to mark up and have it updated every time you run a easy populate qty/model/price update.) - Able to delete products that have been discontinued (Use date tracking where if the price is older than the rest to delete it) - Product Options & Attributes (done) - Easy to add custom fields for heavily modified shops - Check for any problems with a file that may be corrupt before inserting itself into the database (Maybe build in a backup and restore feature) - Have most of the customizeable settings of the easy populate file put into the database for easier adjustment. - Foreign price file compatibility allowing you to setup field structures so easy Populate can read them. Have a radio button for a defined pricefile and then execute the update. Saves time parsing a file to be compatible with Easy Populate. I think that would make the ultimate Easy Populate, hope it happens. Cheers, Brad
  6. Anyone got a good order editor working for the backend? Looking for something really great for reps to enter orders in the backend easily.
  7. SITEMAP for MS Hi, Been having some trouble getting sitemap to work properly with MS. This is the code for the categories and is showing categories that are not provisioned to the store. $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by c.parent_id, c.sort_order, cd.categories_name"); I've been able to get the master categories working, but not the sub categories which will limit SEO using this... $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd, " . TABLE_CATEGORIES_TO_STORES . " c2s where c.parent_id = '0' and c.categories_id = cd.categories_id and c.categories_id = c2s.categories_id and c2s.stores_id = '" . STORES_ID . "' and cd.language_id='" . (int)$languages_id ."' order by c.parent_id, c.sort_order, cd.categories_name"); This is from the categories_tree.php file for sitemap. Anyone explain why sub categories not showing up?
  8. You are completely dead on with that statement. Once people found out the loop hole you'd have a tonne of bunk orders. Unfortunately this mod didn't get fixed up, just tried it and it's horribly broken. Maybe the gracious OSC genie will fix it one day.
  9. Has anyone gotten this working yet? If not I am willing to try to help as long as other people are there to collaborate with me.
  10. Tax not calculating for non-registered users When you do an estimate the tax isn't being calculated for a non-registered user. Registered users work no problem. Anyone know how to fix this? Running MS2 with the MS2 shipping estimate. <?php /* $Id: shipping_estimator.php,v 2.00 2004/07/01 15:16:07 eml Exp $ v2.00 by Acheron (see Install.txt for partial version history) Copyright (c) 2004 Released under the GNU General Public License */ ?> <!-- 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 infoBoxHeading($info_box_contents, false, false); $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 class="main">' . ($total_count == 1 ? ' <b>Item:</b></td><td colspan="2" class="main">' : ' <b>Items:</b></td><td colspan="2" class="main">') . $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="main" 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="main"><b>' . CART_SHIPPING_METHOD_TO .'</b> </td><td colspan="2" class="main">'. 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 class="main">' . ($total_count == 1 ? ' <b>Item:</b></td><td colspan="2" class="main">' : ' <b>Items:</b></td><td colspan="2" class="main">') . $total_count . $showweight . '</td></tr>'; } if($cart->get_content_type() != 'virtual'){ if(CARTSHIP_SHOWCDD == 'true'){ $ShipTxt.='<tr><td colspan="3" class="main" 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('button_update_cart.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="main" 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="main"><b>' . CART_SHIPPING_CARRIER_TEXT . '</b></td><td class="main" align="left"><b>' . CART_SHIPPING_METHOD_TEXT . '</b></td><td class="main" align="right"><b>' . CART_SHIPPING_METHOD_RATES . '</b></td></tr>'; $ShipTxt.='<tr><td colspan="3" class="main">'.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="main">'.$quotes[$i]['module'].' '; $ShipTxt.= '('.$quotes[$i]['error'].')</td></tr>'; }else{ if($selected_shipping['id'] == $thisquoteid){ $ShipTxt.='<td class="main"><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="main"><b>'.$currencies->format(tep_add_tax($quotes[$i]['methods'][0]['cost'], $quotes[$i]['tax'])).'</b></td></tr>'; }else{ $ShipTxt.='<td class="main"><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" class="main">'.$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="main">'.$quotes[$i]['icon'].' </td>'; if($quotes[$i]['error']){ $ShipTxt.='<td colspan="2" class="main">'.$quotes[$i]['module'].' '; $ShipTxt.= '('.$quotes[$i]['error'].')</td></tr>'; }else{ if($selected_shipping['id'] == $thisquoteid){ $ShipTxt.='<td class="main"><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="main"><b>'.$currencies->format(tep_add_tax($quotes[$i]['methods'][$j]['cost'], $quotes[$i]['tax'])).'</b></td><td class="main">'.tep_image(DIR_WS_ICONS . 'selected.gif', 'Selected').'</td></tr>'; }else{ $ShipTxt.='<td class="main"><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" class="main">'.$currencies->format(tep_add_tax($quotes[$i]['methods'][$j]['cost'], $quotes[$i]['tax'])).'</td><td class="main"> </td></tr>'; } } } } } } } $ShipTxt.= '</table></form>'; $info_box_contents = array(); $info_box_contents[] = array('text' => $ShipTxt); new infoBox($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 infoBoxHeading($info_box_contents, false, false); $otTxt='<table align="right">'; $otTxt.=$order_total_modules->output().'</table>'; $info_box_contents = array(); $info_box_contents[] = array('text' => $otTxt); new infoBox($info_box_contents); } } // Use only when cart_contents > 0 ?> </td></tr></table> After this is fixed it should be posted on the contribution download site.
  11. Could someone convert this to MS compatibility? This way you can have featured sets properly display on your stores. (Wolfen Featured Sets catalog/includes/modules/featured_sets.php) <?php $featured_products_category_id = $new_products_category_id; if ( (!isset($featured_products_category_id)) || ($featured_products_category_id == '0') ) { // We are not in category depth; we are on the main page $featured_products_query_raw = "SELECT p.products_id, pd.products_name, pd.products_description, pd.products_short, p.products_image, p.products_tax_class_id, s.status as specstat, s.specials_new_products_price, p.products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' where p.products_status = '1' and p.products_featured = '1' order by " . FEATURED_PRODUCTS_SORT_ORDER . " " . FEATURED_PRODUCTS_DIRECTION . " limit " . MAX_DISPLAY_FEATURED_PRODUCTS; } else { // We are in category depth $featured_products_query_raw = "SELECT distinct p.products_id, pd.products_name, p.products_image, p.products_tax_class_id, pd.products_description, pd.products_short, s.status as specstat, s.specials_new_products_price, p.products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . (int)$featured_products_category_id . "' and p.products_status = '1' and p.products_featured = '1' order by " . FEATURED_PRODUCTS_SORT_ORDER . " " . FEATURED_PRODUCTS_DIRECTION . " limit " . MAX_DISPLAY_FEATURED_PRODUCTS; } $featured_products_query = tep_db_query($featured_products_query_raw); while ($featured_products = tep_db_fetch_array($featured_products_query)) { $featured_products_array[] = array('id' => $featured_products['products_id'], 'name' => $featured_products['products_name'], 'description' => $featured_products['products_description'], 'shortdescription' => $featured_products['products_short'], 'image' => $featured_products['products_image'], 'price' => $featured_products['products_price'], 'specials_price' => $featured_products['specials_new_products_price'], 'tax_class_id' => $featured_products['products_tax_class_id']); } ?> <?php $featured_manufacturers_id = $manufacturers_id; if ((!isset($featured_manufacturers_id)) || ($featured_manufacturers_id == '0')) { $featured_manufacturers_query_raw = "SELECT m.manufacturers_id, m.manufacturers_name, m.manufacturers_image, m.manufacturers_featured_until, mi.manufacturers_id, mi.languages_id, mi.manufacturers_url from " . TABLE_MANUFACTURERS . " m, " . TABLE_MANUFACTURERS_INFO . " mi where m.manufacturers_id = mi.manufacturers_id and mi.languages_id = '" . (int)$languages_id . "' and m.manufacturers_featured = '1' order by " . FEATURED_MANUFACTURER_SORT_ORDER . " " . FEATURED_MANUFACTURERS_DIRECTION . " limit " . MAX_DISPLAY_FEATURED_MANUFACTURERS; } $featured_manufacturers_query = tep_db_query($featured_manufacturers_query_raw); while ($featured_manufacturers = tep_db_fetch_array($featured_manufacturers_query)) { $featured_manufacturers_array[] = array('id' => $featured_manufacturers['manufacturers_id'], 'name' => $featured_manufacturers['manufacturers_name'], 'image' => $featured_manufacturers['manufacturers_image'], 'url' => $featured_manufacturers['manufacturers_url']); } ?> <?php $featured_manufacturer_products_id = $manufacturers_id; if ((!isset($featured_manufacturer_products_id)) || ($featured_manufacturer_products_id == '0')) { $featured_manufacturer_products_query_raw = "select p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, pd.products_name, pd.products_description, pd.products_short, p.products_image, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price, m.manufacturers_id, m.manufacturers_name, m.manufacturers_image, m.manufacturer_featured_until, mi.manufacturers_id, mi.languages_id, mi.manufacturers_url from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_MANUFACTURERS_INFO . " mi left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = mi.manufacturers_id and mi.languages_id = '" . (int)$languages_id . "' and m.manufacturer_featured = '1' order by " . FEATURED_MANUFACTURER_SORT_ORDER . " " . FEATURED_MANUFACTURER_DIRECTION . " limit " . MAX_DISPLAY_FEATURED_MANUFACTURER; } $featured_manufacturer_products_query = tep_db_query($featured_manufacturer_products_query_raw); while ($featured_manufacturer_products = tep_db_fetch_array($featured_manufacturer_products_query)) { $featured_manufacturer_products_array[] = array('pid' => $featured_manufacturer_products['products_id'], 'pname' => $featured_manufacturer_products['products_name'], 'pdescription' => $featured_manufacturer_products['products_description'], 'pshortdescription' => $featured_manufacturer_products['products_short'], 'pimage' => $featured_manufacturer_products['products_image'], 'pprice' => $featured_manufacturer_products['products_price'], 'pspecials_price' => $featured_manufacturer_products['specials_new_products_price'], 'ptax_class_id' => $featured_manufacturer_products['products_tax_class_id'], 'manufacturer' => $featured_manufacturer_products['manufacturers_name'], 'mid' => $featured_manufacturer_products['manufacturers_id'], 'mname' => $featured_manufacturer_products['manufacturers_name'], 'mimage' => $featured_manufacturer_products['manufacturers_image'], 'murl' => $featured_manufacturer_products['manufacturers_url']); } ?> <?php $featured_categories_id = $categories_id; if ((!isset($featured_categories_id)) || ($featured_categories_id == '0')) { $featured_categories_query_raw = "select c.categories_id, cd.categories_name, c.categories_image, c.parent_id, c.categories_featured_until, p.products_id, p.products_price, p.products_tax_class_id, pd.products_name, pd.products_description, pd.products_short, p.products_image, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where c.categories_featured = '1' and cd.language_id = '" . (int)$languages_id . "' and c.categories_id = cd.categories_id and c.categories_id = p2c.categories_id and cd.categories_id = p2c.categories_id and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' order by " . FEATURED_CATEGORIES_SORT_ORDER . " " . FEATURED_CATEGORIES_DIRECTION . " limit " . MAX_DISPLAY_FEATURED_CATEGORIES; }
  12. Extra Pages for MS yet? Anyone getting extra pages working for MS yet? Also Define Mainpage would also be helpful to be MS compatible.
  13. CSS Hookup Ok people, time for down and dirty with CSS and SPAW...took me 5 minutes and I figured it out. This is very useful and expands the functionality of using your CSS styles with the editor. Step 1 admin/includes/functions/html_output.php Find your declarations for your editors as mentioned in above posts. Add on a link to your css file. Here is an example. //// // Output a form textarea field full editor function tep_draw_textarea_field($name, $wrap, $width, $height, $text = '', $parameters = '', $reinsert_value = true) { if (tep_not_null($parameters)) $field .= ' ' . $parameters; $sw = new SPAW_Wysiwyg(tep_output_string($name), stripslashes($text), '', 'full', '', '600px', '500px','/home/ojunks/www/catalog/stylesheet.css'); $sw->show(); return $field; } Step 2 Open catalog/includes/edit_wysiwyg.php Add styles for the drop down. Here are mine, but yours may be different. Just go through your CSS for your site and add the appropriate ones. // here we add some styles to styles dropdown $spaw_dropdown_data['style']['default'] = 'No styles'; $spaw_dropdown_data['style']['main'] = 'Main Text'; $spaw_dropdown_data['style']['headdate'] = 'Tiny Date'; $spaw_dropdown_data['style']['boxText'] = 'Box Text'; $spaw_dropdown_data['style']['TEXTAREA'] = 'Text Area'; $spaw_dropdown_data['style']['msrp'] = 'MSRP Text'; $spaw_dropdown_data['style']['savings'] = 'Savings Text'; $spaw_dropdown_data['style']['price'] = 'Price Text'; $copy ="Wysiwyg Editor V1.04 modified SPAW for PHPNuke"; ?> Now you can set these styles to text you use in SPAW. You can even add extra CSS styles if you want for formatting emails, newletters..etc. If you want to PayPal me something for this, PM me.... Thanks, Brad
  14. Where there is a will, there is a way and where there is money is the intelligence to make it happen.
  15. The first thing in getting rid of the tax is that you have to look at the source of tax. Government. You need to plot a scheme to over-throw them by stagging a coup or by winning the hearts of millions of voters and run a solid corrupt free campaign. Once you are in power you can introduce new ledgistlation to bannish the tax and thus securing your seat when the next election comes around. The way in OSC to rid tax is to delete all rates and zones and make sure the products are set to no tax zone/rate. If you had sales already go through the system you can't change the tax unless you use some edit_orders.php contribution. I hope you do option 1!