Jump to content

PupStar

Members
  • Content count

    903
  • Joined

  • Last visited

  • Days Won

    10

Everything posted by PupStar

  1. Hi Chris, No there is no code in application top as it is all contained in the one file, this is what I have: <?php /* Printer Ink & Toner Filter V1.7 for Oscommerce v2.2 RC2a September 2010 osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2010 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); require(DIR_WS_MODULES . FILENAME_IMAGE_MAPS); if(isset($_REQUEST['filterid'])&&($_REQUEST['filterid']!='')) { $filterid = $_REQUEST['filterid']; $filterqueery = tep_db_query("select * from ".TABLE_PRINTER_CATEGORY." where parent_id = '0' AND printer_category_id = '".$filterid."'"); if(mysql_num_rows($filterqueery)>0) { $showfilter = true; } } require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_FILTER_PRINTER); $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_INKTONERFINDER)); require(DIR_WS_INCLUDES . 'template_top.php'); ?> <div style="clear: both; padding:5px;"></div> <div class="contentContainer"> <div class="ui-widget-header ui-corner-top infoBoxHeading"><?php echo TABLE_HEADING_PRODUCTS; ?> </div> <div class="contentContainer"> <div class="ui-widget ui-widget-content-white ui-corner-bottom contentText" style="padding:10px; background-color:#fdfdfd;"> <?php if($showfilter){?> <div class="contentContainer"> <div class="ui-widget ui-widget-content ui-corner-all contentText" style="padding: 10px; background: #f4f4f4 url(images/main-bg.png); background-repeat: repeat-xy; font-style: italic;"> <div class="contentText"><?php echo TEXT_PARTS_FINDER_DESCRIPTION;?> </div> </div> </div> <div> <?php getprintercatoptions($filterid); ?> </div> <div class="bodyContent"> <?php $printerid = 0; if(isset($_REQUEST['mode'])&&($_REQUEST['mode']=='showlist')) { $printerid= $_REQUEST['part_cat_'.$filterid]; } elseif(isset($_REQUEST['mode'])&&($_REQUEST['mode']=='searchlist')) { $vehidrow = @mysql_fetch_array(mysql_query("SELECT printer_category_id, categories_image FROM ".TABLE_PRINTER_CATEGORY." where category_name = '".$_REQUEST['keywords']."'")); if($vehidrow['printer_category_id']!='') { $printerid= $vehidrow['printer_category_id']; $printerid= $vehidrow['categories_image']; } } $define_list = array('PRODUCT_LIST_MEDIACAT_PART_NO' => PRODUCT_LIST_MEDIACAT_PART_NO, 'PRODUCT_LIST_MEDIACAT_QUANTITY' => PRODUCT_LIST_MEDIACAT_QUANTITY, 'PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL, 'PRODUCT_LIST_NAME' => PRODUCT_LIST_NAME, 'PRODUCT_LIST_MANUFACTURER' => PRODUCT_LIST_MANUFACTURER, 'PRODUCT_LIST_PRICE' => PRODUCT_LIST_PRICE, 'PRODUCT_LIST_QUANTITY' => PRODUCT_LIST_QUANTITY, 'PRODUCT_LIST_WEIGHT' => PRODUCT_LIST_WEIGHT, 'PRODUCT_LIST_BUY_NOW' => PRODUCT_LIST_BUY_NOW); asort($define_list); $column_list = array(); reset($define_list); while (list($key, $value) = each($define_list)) { if ($value > 0) $column_list[] = $key; } $select_column_list = ''; for ($i=0, $n=sizeof($column_list); $i<$n; $i++) { switch ($column_list[$i]) { case 'PRODUCT_LIST_MEDIACAT_PART_NO': $select_column_list .= 'pd.mediacat_part_no, '; break; case 'PRODUCT_LIST_MEDIACAT_QUANTITY': $select_column_list .= 'p.products_mediacat_quantity, '; break; case 'PRODUCT_LIST_MODEL': $select_column_list .= 'p.products_model, '; break; case 'PRODUCT_LIST_NAME': $select_column_list .= 'pd.products_name, '; break; case 'PRODUCT_LIST_MANUFACTURER': $select_column_list .= 'm.manufacturers_name, '; break; case 'PRODUCT_LIST_QUANTITY': $select_column_list .= 'p.products_quantity, '; break; case 'PRODUCT_LIST_IMAGE': $select_column_list .= 'p.products_image, '; break; case 'PRODUCT_LIST_WEIGHT': $select_column_list .= 'p.products_weight, '; break; } } if($printerid>0) { $printercat_query = tep_db_query("SELECT * FROM ".TABLE_PRINTER_CATEGORY." WHERE printer_category_id = '".$printerid."'"); $printercat_row = tep_db_fetch_array($printercat_query); $productids = $printercat_row['productids']; if($productids!='') { $listing_sql = "select distinct " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, pd.mediacat_part_no, products_mediacat_quantity, p.products_tax_class_id, 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_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and FIND_IN_SET(p.products_id,'".$productids."' )"; $listing_sql .= " order by pd.mediacat_part_no"; } ?> <?php $catimage_query = tep_db_query("select categories_image, category_image_name, category_imagemap_name FROM ".TABLE_PRINTER_CATEGORY." WHERE printer_category_id = '".$printerid."'"); while ($category_image = tep_db_fetch_array($catimage_query)) { if($productids!='') { $imagemap = $category_image['category_imagemap_name']; echo '<div style="clear: both; padding:5px;"></div><div class="contentContainer" style="font-weight: bold;">' . $category_image['category_image_name'] . '</div>'; echo '<div class="ui-widget ui-widget-content-white ui-corner-all contentText" style="padding-left: 80px;">' . tep_image_maps(DIR_WS_IMAGES . $category_image['categories_image'], '', $imagemap) .'</div>'; echo '<div class="contentContainer">'; echo ' <div style="clear: both; padding:5px;"></div><div class="ui-widget ui-widget-content ui-corner-all contentText" style="padding: 10px; background: #f4f4f4 url(images/main-bg.png); background-repeat: repeat-xy; font-style: italic;">'; echo ' <div class="contentText">' . TEXT_PARTS_FINDER_INFORMATION . ''; echo ' </div>'; echo "<a href=\"javascript:void(0);\" onclick=\"NewWindow('popup_order_trouble.php', 'toolbar=no,directories=no,location=no,status=yes,menubar=no,resizable=no,scrollbars=yes,width=300,height=300'); return false\"><b><u>Having trouble ordering, click here for help!</b></u></a>"; echo ' </div>'; echo '</div>'; echo '<div style="clear: both; padding:3px;"></div>'; include(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING_LIST); } } } ?> <?php }?> </div></div> <?php function getprintercatoptions($printer_category_id="",$curprintercatid="") { $fieldid = $printer_category_id; if(isset($_REQUEST['part_cat_'.$printer_category_id])&&($_REQUEST['part_cat_'.$printer_category_id]!='')) { $printer_category_id = $_REQUEST['part_cat_'.$printer_category_id]; $str = getprintercatpath($printer_category_id,""); $chkbottomROW = mysql_fetch_array(mysql_query("SELECT count(printer_category_id) FROM " . TABLE_PRINTER_CATEGORY . " where parent_id = '".$printer_category_id."'")); if($str =="") {$str = "0,";} if($chkbottomROW[0]>0) { $str .= $printer_category_id.","; } $catarr = explode(",",substr($str,0,-1)); sort($catarr); editprintercat($catarr,$fieldid,$printer_category_id,$curprintercatid); } else { if($curprintercatid>0) { $str = getprintercatpath($curprintercatid,""); if($str =="") {$str = $curprintercatid.",";} else { $str .= $curprintercatid.","; } } else { $str = getprintercatpath($printer_category_id,""); if($str =="") {$str = $printer_category_id.",";} } $catarr = explode(",",substr($str,0,-1)); sort($catarr); editprintercat($catarr,$fieldid,$printer_category_id,$curprintercatid); } } function editprintercat($catarr,$fieldid,$printer_category_id,$curprintercatid="") { ?> <?php $i=0; $cntvarr = count($catarr); foreach($catarr as $val) { $veh_cat_array = array(array('id' => '', 'text' => 'Please Select')); $printers_query = tep_db_query("select * from " . TABLE_PRINTER_CATEGORY . " where parent_id = '".$val."' order by category_name"); if(mysql_num_rows($printers_query)>0) { while ($printers = tep_db_fetch_array($printers_query)) { $veh_cat_array[] = array('id' => $printers['printer_category_id'], 'text' => $printers['category_name']); } ?> <?php if($cntvarr==$i+1) { $selval = $printer_category_id; } else { $selval = $catarr[$i+1]; } ?> <div class="parts_finder" align="left" valign="top"> <?php echo tep_draw_pull_down_menu('part_cat_'.$val, $veh_cat_array, $selval, 'onchange="document.frmveh.part_cat_'.$fieldid.'.value=this.value;document.frmveh.submit();"'); ?> </div> <?php $i++; } } ?> <?php } function getprintercatpath($printer_category_id, $str) { $str1 = $str; $printers_query = tep_db_query("select parent_id from " . TABLE_PRINTER_CATEGORY . " where printer_category_id = '".$printer_category_id."'"); $printers = tep_db_fetch_array($printers_query); $parent_id = $printers['parent_id']; if($parent_id==0) { return $str1; } else { $str1 .= $parent_id.","; $str1 = getprintercatpath($parent_id, $str1); return $str1; } } ?> </div></div> <div class="ui-widget ui-corner-all"> <form name="frmveh" action="" method="get"> <input type="hidden" name="part_cat_<?php echo $filterid;?>" value="<?php echo $_REQUEST['part_cat_1'];?>"> <input type="hidden" name="filterid" value="<?php echo $filterid;?>" /> <input type="hidden" name="mode" value="showlist" /> </form> </div> <?php require(DIR_WS_INCLUDES . 'template_bottom.php'); require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
  2. which bit of code in particular for YMM do you mean??? Thanks for the reply Mark
  3. Hi Chris, A big thumbs up from me :thumbsup: After a few cosmetic changes it is now working great woohoo :D However I have one problem, I am also using a the 'Printer Ink & Toner' contribution which I have modded to be a parts finder module. The issue is that when I am on the parts finder page I have this is the url and when I try to use the year, make, model the url changes to this is there anyway you know of that I can clear the url or some logic if that I am on that page then jump back to index.php and then perform the search??? Thanks Mark
  4. PupStar

    EP Option to Load Title & Tags

    As long as you are using the 'Header Tags' by 'Jack mcs' then change this line in admin/easypopulate.php // Header Tags Controller Support v2.0 define ('EP_HTC_SUPPORT', false); // default is false Change false to true Although if your using 2.3.1 then I am not sure if it will work as I have not tried it yet. Regards Mark
  5. PupStar

    Information pages unlimited for 2.3

    It should be like this ' ' . tep_information_show_category(1) . '' . Regards Mark
  6. PupStar

    Ajax Attribute Manager v2.8.2 beta

    you need to change the short tags ie '<?' to '<?php' without the quotes :thumbsup:
  7. PupStar

    Disk Space

    drop a support ticket to your host and ask them to upgrade your account, you may well have to pay more for the extra.
  8. PupStar

    Disk Space

    If you mean on your hosting account then you need to contact your web host.
  9. go to admin>tools>mindsparx admin and increase the width of the template.
  10. PupStar

    [Contribution] Documents Manager

    Thank you Jim that worked.
  11. PupStar

    [Contribution] Documents Manager

    Hi Jim, I have installed this contribution into 2.3.1 and it works (with a couple of glitches still to work out) Now the problem I am having is similar to the above poster with this error: I have checked everything. The file is in the correct location, size and also the link is correct Any ideas??? Thanks Mark
  12. PupStar

    Master Products - MS2

    Hi Toth, One major problem I have come across is that when I try and disable say the products description in the module by changing the config value to 0 I get this error on the product info page. Any ideas Mark
  13. PupStar

    Master Products - MS2

    ok I have it working now (I think). I went back to basics and used the contribs admin/categories.php and compared and merged my categories.php Mark
  14. PupStar

    Master Products - MS2

    Hi Guys, I am in the process of installing Master Products into 2.3.1 but I receive this error on admin/categories.php Any clues as to why this error is happening? Thanks Mark
  15. Hi Janne, Mindsparx Admin rocks! I agree its totally pointless to validate the code as it should be locked tight so no one including the search engines can see it. Keep up the good work :thumbsup: Mark
  16. Looking Good Janne! :thumbsup:
  17. PupStar

    Printer Ink & Toner Filter

    ok sussed it out, I changed $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, 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_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and FIND_IN_SET(p.products_id,'".$productids."')"; to $listing_sql = "select distinct " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, 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_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and FIND_IN_SET(p.products_id,'".$productids."')"; All I added was 'distinct' Regards PS
  18. PupStar

    Printer Ink & Toner Filter

    I think I may have found another little issue. I am testing with 2 products that I have linked to each other, the issue is that that both products show twice when selecting the top level category (see screenshot below) Anyone know a work around for this? Thanks
  19. PupStar

    Printer Ink & Toner Filter

    ok I sorted it by changing it to preg_match
  20. PupStar

    Printer Ink & Toner Filter

    Hi Guys, I am porting this contribution over to the new 2.3 and I have an admin error that is annoying me which is this line if ( eregi("(insert|update|setflag)", $action) ) include_once('includes/reset_seo_cache.php'); now this is because eregi is gone in php 5.3 Any ideas on what to replace it with??? Thanks PS
  21. PupStar

    Ultimate Osc Translator

    Its ok I grabbed the images from your site and placed them in /images/flag/ and all is now sweet. Maybe you should update the package with the missing folder. Regards PS
  22. PupStar

    Ultimate Osc Translator

    Ok I am testing this out all seems ok but instead of displaying flags for the languages all I see is text no flags. I have uploaded the osc_translator folder to public_html and I am using your product_info_vanilla.php Is there another step which is ommited from the install or is something broken??? Thanks PS
  23. PupStar

    Automatically send data feed to Froogle

    I had exactly the same error as this when updating my seo.class.php file and I add this to the end of that file which resolved the error. function tep_not_null($value) { if (is_array($value)) { if (sizeof($value) > 0) { return true; } else { return false; } } else { if (($value != '') && (strtolower($value) != 'null') && (strlen(trim($value)) > 0)) { return true; } else { return false; } } } Hope this helps PS
  24. Cheers Jack, such a simple thing although I am not sure why it stopped working with the server change. Its working again and thats all that matters :) Thanks PS
×