Jump to content

data2700

Members
  • Content count

    56
  • Joined

  • Last visited

1 Follower

Profile Information

  1. Hi there, I've installed this contribution: http://www.oscommerce.com/community/contributions,1250/ The message below is supposed to popup when the customer atttempts to make an order that does not meet the minimum. Instead the shopping cart is shown again until the minimum order amount is reached. I would really like the message to popup and tell the customer that they have not reached the minimum order amount to place an order. define('TEXT_ORDER_UNDER_MIN_AMOUNT', 'A minimum order amount of %s is required in order to checkout.'); Is there anyone that can help me get this working or anyone who has installed the contribution in the newest version of oscommerce? Thanks!
  2. data2700

    Random Catagorys Image

    Hi, Im wondering how to add the ability to select the random image only from active products? I think it can be done by modifying $produkt_query to include only products_status with a value of 1 , but Im unsure of the MySql syntax. Here is the entire file from the contribution, can anyone help ? Here is the specific query I was thinking needs to be modified. $produkt_query = tep_db_query( "select p.products_image as img from products p ". "LEFT OUTER JOIN products_to_categories ptc ON ". "p.products_id = ptc.products_id ". "WHERE LENGTH(p.products_image) > 0 ". "AND ptc.categories_id = ".$category_id); and the next piece is the entire contribution, in case there is more to this than I realize. Thank you <? /***********************************************/ /* Random Category Images v 1.3 / /* coded / /* by Bo Biene / /***********************************************/ define('EMPTY_CAT_IMAGE', 'empty.gif'); function get_random_cat_image($category_id, $count = 0) { srand ((double)microtime()*1000000); $retun_val; if($category_id > 0 && tep_count_products_in_category_without_sub($category_id) > 0 && $count < 10) { $randInt = rand(1,10); $randStart = $randInt -1; $produkt_query = tep_db_query( "select p.products_image as img from products p ". "LEFT OUTER JOIN products_to_categories ptc ON ". "p.products_id = ptc.products_id ". "WHERE LENGTH(p.products_image) > 0 ". "AND ptc.categories_id = ".$category_id); while($result = tep_db_fetch_array($produkt_query)) { $retun_val = $result['img']; if(rand(1,10) > 8) break; } if(!(tep_not_null($retun_val)) && tep_has_category_subcategories($category_id)) { $retun_val = get_random_cat_image_from_child($category_id,$count); } } else if($category_id > 0 && tep_has_category_subcategories($category_id) && $count < 10) { $retun_val = get_random_cat_image_from_child($category_id,$count); } else { $retun_val = EMPTY_CAT_IMAGE; } return $retun_val; } function get_random_cat_image_from_child($category_id,$count = 0) { $retun_val; $category_query = tep_db_query("select categories_id as ID from ". TABLE_CATEGORIES ." WHERE parent_id = ". $category_id ." LIMIT 0,". rand(1,10) ); while($ids = tep_db_fetch_array($category_query)) { $id = $ids['ID']; $retun_val = get_random_cat_image($id, $count++); if((tep_not_null($retun_val)) && $retun_val != EMPTY_CAT_IMAGE) break; } return $retun_val; } //Changed from osCommerce function tep_count_products_in_category_without_sub($category_id, $include_inactive = false) { $products_count = 0; if ($include_inactive == true) { $products_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = p2c.products_id and p2c.categories_id = '" . (int)$category_id . "'"); } else { $products_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = p2c.products_id and p.products_status = '1' and p2c.categories_id = '" . (int)$category_id . "'"); } $products = tep_db_fetch_array($products_query); return $products['total']; } ?>
  3. Brilliant piece of code on the facebook like button. Thanks!

    href="" show_faces="false" align="right" width="350">

  4. Hi forum readers! I'm trying to install this contribution but my site has been modified so I'm not quite sure how to combine this instruction: Before: onclick="document.location.href=\'' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products['products_id'] . '&action=new_product_preview&read=only') . '\'" Add: ondblclick="document.location.href=\'' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products['products_id'] . '&action=new_product') . '\'" Into this bit of modified code: if (isset($pInfo) && is_object($pInfo) && ($products['products_id'] == $pInfo->products_id) ) { echo ' <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products['products_id'] . '&action=new_product_preview&read=only') . '\'">' . "\n"; } else { echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products['products_id']) . '\'">' . "\n"; I have tried, but I have limited php skills. Can anyone help? Thanks in advance! }
  5. data2700

    Official PayPal IPN Support Thread

    Hi Steve, I had the same problem... where are those lines of code? After digging around I found them in checkout_process.php, but they did not solve the problem for me. I was able to get the ipn working along with my discount codes using ver 2.2 instead of version 2.3.3 and setting the cart to aggregate.
  6. data2700

    Official PayPal IPN Support Thread

    Hi, I also experienced the same problems you describe when using contributions that offered the customer a discount at checkout. I was also using ver 2.3.3 (the latest). I searched and searched and eventually decided to downgrade to an earlier version of the Paypal IPN and it seems to be working. I am currently using osCommerce_PayPal_IPN_v2.2. I am not sure if this will help to solve your problem, but it is worth a shot. I am still testing but so far the results are positive. make sure to set the Paypal IPN to aggregate . good luck
  7. data2700

    Official PayPal IPN Support Thread

    Is this an edit to a file you are suggesting? Can you explain where to add this and what this does? What file needs to be edited and exactly where does this code belong in the file that needs to be edited ?
  8. data2700

    Official PayPal IPN Support Thread

    Hi, I am using the price sensitive discount module and paypal ipn 2.3.3 (the ipn is set to aggregate) The problem is that the correct total is not being forwarded to paypal and Im not sure where to edit to make sure the adjusted total is forwarded to paypal. Here is the price sensitive discount module code. If anyone can help me solve the problem or give me some ideas about where to begin, I would appreciate it. Thanks in advance. <?php /* <<<<<<< ot_lev_discount.php $Id: ot_lev_discount.php,v 1.0 2002/04/08 01:13:43 hpdl Exp $ ======= $Id: ot_lev_discount.php,v 1.3 2002/09/04 22:49:11 wilt Exp $ $Id: ot_lev_discount.php,v 2.4 2006/02/28 12:10:01 maniac101 Exp $ modified to calc discount correctly when tax is included in discount >>>>>>> 2.4 osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2002 osCommerce Released under the GNU General Public License */ class ot_lev_discount { var $title, $output; function ot_lev_discount() { $this->code = 'ot_lev_discount'; $this->title = MODULE_LEV_DISCOUNT_TITLE; $this->description = MODULE_LEV_DISCOUNT_DESCRIPTION; $this->enabled = MODULE_LEV_DISCOUNT_STATUS; $this->sort_order = MODULE_LEV_DISCOUNT_SORT_ORDER; $this->include_shipping = MODULE_LEV_DISCOUNT_INC_SHIPPING; $this->include_tax = MODULE_LEV_DISCOUNT_INC_TAX; $this->calculate_tax = MODULE_LEV_DISCOUNT_CALC_TAX; $this->table = MODULE_LEV_DISCOUNT_TABLE; // $this->credit_class = true; $this->output = array(); } function process() { global $order, $ot_subtotal, $currencies; $od_amount = $this->calculate_credit($this->get_order_total()); if ($od_amount>0) { $this->deduction = $od_amount; $this->output[] = array('title' => $this->title . ':', 'text' => '<b>' . $currencies->format($od_amount) . '</b>', 'value' => $od_amount); $order->info['total'] = $order->info['total'] - $od_amount; if ($this->sort_order < $ot_subtotal->sort_order) { $order->info['subtotal'] = $order->info['subtotal'] - $od_amount; } } } function calculate_credit($amount) { global $order; $od_amount=0; $table_cost = split("[:,]" , MODULE_LEV_DISCOUNT_TABLE); for ($i = 0; $i < count($table_cost); $i+=2) { if ($amount >= $table_cost[$i]) { $od_pc = $table_cost[$i+1]; } } // Calculate tax reduction if necessary if($this->calculate_tax == 'true') { // Calculate main tax reduction $tod_amount = round($order->info['tax']*10)/10*$od_pc/100; $order->info['tax'] = $order->info['tax'] - $tod_amount; // Calculate tax group deductions reset($order->info['tax_groups']); while (list($key, $value) = each($order->info['tax_groups'])) { $god_amount = round($value*10)/10*$od_pc/100; $order->info['tax_groups'][$key] = $order->info['tax_groups'][$key] - $god_amount; } } $od_amount = round($amount*10)/10*$od_pc/100; // $od_amount = $od_amount + $tod_amount; // maniac101 above line was adding tax back into discount incorrectly for me return $od_amount; } function get_order_total() { global $order, $cart; $order_total = $order->info['total']; // Check if gift voucher is in cart and adjust total $products = $cart->get_products(); for ($i=0; $i<sizeof($products); $i++) { $t_prid = tep_get_prid($products[$i]['id']); $gv_query = tep_db_query("select products_price, products_tax_class_id, products_model from " . TABLE_PRODUCTS . " where products_id = '" . $t_prid . "'"); $gv_result = tep_db_fetch_array($gv_query); if (ereg('^GIFT', addslashes($gv_result['products_model']))) { $qty = $cart->get_quantity($t_prid); $products_tax = tep_get_tax_rate($gv_result['products_tax_class_id']); if ($this->include_tax =='false') { $gv_amount = $gv_result['products_price'] * $qty; } else { $gv_amount = ($gv_result['products_price'] + tep_calculate_tax($gv_result['products_price'],$products_tax)) * $qty; } $order_total=$order_total - $gv_amount; } } if ($this->include_tax == 'false') $order_total=$order_total-$order->info['tax']; if ($this->include_shipping == 'false') $order_total=$order_total-$order->info['shipping_cost']; return $order_total; } function check() { if (!isset($this->check)) { $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_LEV_DISCOUNT_STATUS'"); $this->check = tep_db_num_rows($check_query); } return $this->check; } function keys() { return array('MODULE_LEV_DISCOUNT_STATUS', 'MODULE_LEV_DISCOUNT_SORT_ORDER','MODULE_LEV_DISCOUNT_TABLE', 'MODULE_LEV_DISCOUNT_INC_SHIPPING', 'MODULE_LEV_DISCOUNT_INC_TAX','MODULE_LEV_DISCOUNT_CALC_TAX'); } function install() { tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Display Total', 'MODULE_LEV_DISCOUNT_STATUS', 'true', 'Do you want to enable the Order Discount?', '6', '1','tep_cfg_select_option(array(\'true\', \'false\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_LEV_DISCOUNT_SORT_ORDER', '999', 'Sort order of display.', '6', '2', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function ,date_added) values ('Include Shipping', 'MODULE_LEV_DISCOUNT_INC_SHIPPING', 'true', 'Include Shipping in calculation', '6', '3', 'tep_cfg_select_option(array(\'true\', \'false\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function ,date_added) values ('Include Tax', 'MODULE_LEV_DISCOUNT_INC_TAX', 'true', 'Include Tax in calculation.', '6', '4','tep_cfg_select_option(array(\'true\', \'false\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function ,date_added) values ('Calculate Tax', 'MODULE_LEV_DISCOUNT_CALC_TAX', 'false', 'Re-calculate Tax on discounted amount.', '6', '5','tep_cfg_select_option(array(\'true\', \'false\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Discount Percentage', 'MODULE_LEV_DISCOUNT_TABLE', '100:7.5,250:10,500:12.5,1000:15', 'Set the price breaks and discount percentages', '6', '6', now())"); } function remove() { $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_CONFIGURATION . " where configuration_key in (" . $keys . ")"); } } ?>
  9. data2700

    Specials & Products_new

    Has anyone gotten this contribution to work properly? I made the changes, but the listing showed categories that had no new products added to them. Also the instructions left out which query to find in the specials.php. I was able to locate it and updated the instructions, but if anyone else has any addtional improvements please post them here or make a new rev of this contrib and put it on the oscommerce site code with complete instructions (not working 100% for me, but might work for others because the author says it works for "older sites") Specials & Products_new sort category & sub-category dropdown menu ------------------------------- Products_new / What will it do? ------------------------------- (Example) Currently if you had 1000 items in your site and a customer clicked on your Products_new.php page, they would get a list of your hole site, pretty much of 1000 items 50 items in Specials. They are shown in the order they have been inserted, just in (reverse) latest first. You guys know what I mean. So, if a customer wanted to see your latest products in a particular category / sub-category they will probably have to browse through 20 or 30 pages. That would NOT be me! So, chances are that you will lose a potencial sale with me. Products_new dropdown menu mod is the solution to this issue. 1). Once a Customer clicks on Products_new.php your page will still display your 1000 items by pages. + a dropdown menu on the top of your page that will allow you to sort your 1000 items by categories. 2). That said,(Example) customer selects category (DVD Movies), page will refresh and show all product in DVD Movies category in the order they have been inserted, just in (reverse) latest first. 3). Here's where it gets better! Now the customer is viewing all your DVDs in said category. The dropdown menu will now allow the customer to sort the DVDs by Sub-categories in the order they have been inserted, just in (reverse) latest first. ------------------------------- Specials / What will it do? ------------------------------- It is basicly the same as Products_new. (Example) Currently if you had 50 items in Specials and a customer clicked on your specials.php page, they would get a list of all 50 items in Specials. So, if a customer wanted to see your specials in a particular category / sub-category they will probably have to browse more than they need to. So, chances are that you can lose a potencial sale in the long run. Again, Specials dropdown menu mod is the solution to this issue. 1). Once a Customer clicks on specials.php your page will still display 50 Special items. + a dropdown menu on the top of your page that will allow you to sort those 50 Special items by categories. 2). That said,(Example) customer selects category (DVD Movies), page will refresh and show all DVDs with specials in DVD Movies category. 3). Here's where it gets better! Now the customer is viewing all your DVDs with specials in said category. The dropdown menu will now allow the customer to sort the DVDs with specials by Sub-categories. ---------------------------------------------------------------------- ---------------------------------------------------------------------- Awsome Script!!!! I had it costome made for my site couple years ago. It will work for older versions Oscommerce, see it in action in the test site listed below. For some reason it will not work for the latest versions of Oscommerce. Someone with the knowledge & skills can fix this with eys closed. By next month I will finish a keyword coded advance search result page w/ dropdown menu to do the same as specials & products_new www.youregiftbasket.com/specials.php www.youregiftbasket.com/products_new.php Guys, feel free to add on to these scrips. ENJOY!!!!!!!!!!!!!!!!!!! This is a no brainner install, 1 cut & paste -- and -- 1 piece of script replaced SIMPLE but allways, BACKUP!!!BACKUP!!!BACKUP!!!BACKUP!!! your files before!!! It works for me, see test site ------------------------ Install Products_new.php ------------------------ ---------------- On about line 45 ---------------- Find: <?php echo HEADING_TITLE; ?> immidiately after insert: </td> <td class="pageHeading" align="right"> <FORM> <?php $cat_id1=0; $chkSub1 = 0; $conn1 = mysql_connect(DB_SERVER, DB_SERVER_USERNAME, DB_SERVER_PASSWORD) or die ('Error connecting to mysql'); mysql_select_db(DB_DATABASE); if (isset($categories_id)){ if (!empty($categories_id) && $categories_id!=""){ $rst = mysql_query("SELECT parent_id FROM categories WHERE categories_id = ".$categories_id); if(mysql_num_rows($rst) > 0){ $rparent = mysql_fetch_object($rst); if($rparent->parent_id > 0){ $cat_id1 = $rparent->parent_id; } else{ $cat_id1 = $categories_id; } } else{ $cat_id1 = $categories_id; } } else{ $cat_id1 = $categories_id; } } else{ $cat_id1 = $categories_id; } if (isset($categories_id)){ if (empty($categories_id) && $categories_id==""){ //$result = mysql_query("SELECT CD.*, C.* FROM categories AS C, categories_description AS CD WHERE CD.language_id=1 AND C.categories_id = CD.categories_id AND C.parent_id=0"); $result = mysql_query("select distinct CD.categories_id, CD.categories_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, categories AS C, categories_description AS CD, products_to_categories as pc where CD.language_id=1 AND p.products_status = '1' AND C.categories_id = CD.categories_id AND C.parent_id=0 and p.products_id = pc.products_id and pc.categories_id = C.categories_id and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'"); } else{ //$result = mysql_query("SELECT CD.*, C.* FROM categories AS C, categories_description AS CD WHERE CD.language_id=1 AND C.categories_id = CD.categories_id AND C.parent_id=$cat_id1"); $result = mysql_query("select distinct CD.categories_id, CD.categories_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, categories AS C, categories_description AS CD, products_to_categories as pc where CD.language_id=1 AND p.products_status = '1' AND C.categories_id = CD.categories_id AND C.parent_id=$cat_id1 and p.products_id = pc.products_id and pc.categories_id = C.categories_id and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'"); $chkSub1 = 1; } } else{ //$result = mysql_query("SELECT CD.*, C.* FROM categories AS C, categories_description AS CD WHERE CD.language_id=1 AND C.categories_id = CD.categories_id AND C.parent_id=0"); $result = mysql_query("select distinct CD.categories_id, CD.categories_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, categories AS C, categories_description AS CD, products_to_categories as pc where CD.language_id=1 AND p.products_status = '1' AND C.categories_id = CD.categories_id AND C.parent_id=0 and p.products_id = pc.products_id and pc.categories_id = C.categories_id and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'"); } //print("<br><br>select distinct CD.categories_id, CD.categories_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, categories AS C, categories_description AS CD, products_to_categories as pc where CD.language_id=1 AND p.products_status = '1' AND C.categories_id = CD.categories_id AND C.parent_id=0 and p.products_id = pc.products_id and pc.categories_id = C.categories_id and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_date_added DESC, pd.products_name"); //$result = mysql_query("SELECT CD.*, C.* FROM categories AS C, categories_description AS CD WHERE CD.language_id=1 AND C.categories_id = CD.categories_id AND C.parent_id=0"); ?> <SELECT NAME="clicklist"style="background-color:#F0F1F4" onChange="location.href=this.form.clicklist.options[this.form.clicklist.selectedIndex ].value"> <?php if ($chkSub1 == 1){ ?> <OPTION>Sub-categories <?php } else{ ?> <OPTION>Select by category <?php } ?> <option>---------------------- <?php while ($row = mysql_fetch_object($result)) { print('<option value="products_new.php?categories_id='.$row->categories_id.'&inc_subcat=1&manufacturers_id">'.$row->categories_name); } mysql_free_result($result); ?> <option value="products_new.php?categories_id=&inc_subcat=1&manufacturers_id">View All </SELECT NAME></form></div> ----- Find: ----- <?php $products_new_array = array(); $products_new_query_raw = "select p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, p.products_date_added, m.manufacturers_name from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on (p.manufacturers_id = m.manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_date_added DESC, pd.products_name"; $products_new_split = new splitPageResults($products_new_query_raw, MAX_DISPLAY_PRODUCTS_NEW); if (($products_new_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3'))) { ?> ----------------- And replace with: ----------------- <?php $products_new_array = array(); if (isset($categories_id)){ if (empty($categories_id) && $categories_id==""){ $products_new_query_raw = "select p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, p.products_date_added, m.manufacturers_name from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on (p.manufacturers_id = m.manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_date_added DESC, pd.products_name"; } else{ $products_new_query_raw = "select p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, p.products_date_added, m.manufacturers_name from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on (p.manufacturers_id = m.manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " pcat, " . TABLE_CATEGORIES . " cat where p.products_status = '1' and p.products_id = pcat.products_id and pcat.categories_id = cat.categories_id and ((cat.categories_id = " . $categories_id . " or cat.parent_id = " . $categories_id . ")) and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_date_added DESC, pd.products_name"; } } else{ $products_new_query_raw = "select p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, p.products_date_added, m.manufacturers_name from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on (p.manufacturers_id = m.manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_date_added DESC, pd.products_name"; } $products_new_split = new splitPageResults($products_new_query_raw, MAX_DISPLAY_PRODUCTS_NEW); if (($products_new_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3'))) { ?> ---------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------- ------------------------ Install specials.php ------------------------ ---------------- On about line 45 ---------------- Find: <?php echo HEADING_TITLE; ?> immidiately after insert: </td> <td class="pageHeading" align="right"> <FORM><?php $cat_id1=0; $chkSub1 = 0; $conn1 = mysql_connect(DB_SERVER, DB_SERVER_USERNAME, DB_SERVER_PASSWORD) or die ('Error connecting to mysql'); mysql_select_db(DB_DATABASE); if (isset($categories_id)){ if (!empty($categories_id) && $categories_id!=""){ $rst = mysql_query("SELECT parent_id FROM categories WHERE categories_id = ".$categories_id); if(mysql_num_rows($rst) > 0){ $rparent = mysql_fetch_object($rst); if($rparent->parent_id > 0){ $cat_id1 = $rparent->parent_id; $chkSub1 = 1; } else{ $cat_id1 = $categories_id; } } else{ $cat_id1 = $categories_id; } } else{ $cat_id1 = $categories_id; } } else{ $cat_id1 = $categories_id; } if (isset($categories_id)){ if (empty($categories_id) && $categories_id==""){ //$result = mysql_query("SELECT CD.*, C.* FROM categories AS C, categories_description AS CD WHERE CD.language_id=1 AND C.categories_id = CD.categories_id AND C.parent_id=0"); $result = mysql_query("select distinct CD.categories_id, CD.categories_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SPECIALS . " s, categories AS C, categories_description AS CD, products_to_categories as pc where CD.language_id=1 AND p.products_status = '1' AND C.categories_id = CD.categories_id AND C.parent_id=0 and p.products_id = pc.products_id and pc.categories_id = C.categories_id and s.products_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and s.status = '1'"); } else{ //$result = mysql_query("SELECT CD.*, C.* FROM categories AS C, categories_description AS CD WHERE CD.language_id=1 AND C.categories_id = CD.categories_id AND C.parent_id=".$cat_id1); $result = mysql_query("select distinct CD.categories_id, CD.categories_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SPECIALS . " s, categories AS C, categories_description AS CD, products_to_categories as pc where CD.language_id=1 AND p.products_status = '1' AND C.categories_id = CD.categories_id AND C.parent_id=".$cat_id1." and p.products_id = pc.products_id and pc.categories_id = C.categories_id and s.products_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and s.status = '1'"); $chkSub1 = 1; } } else{ //$result = mysql_query("SELECT CD.*, C.* FROM categories AS C, categories_description AS CD WHERE CD.language_id=1 AND C.categories_id = CD.categories_id AND C.parent_id=0"); $result = mysql_query("select distinct CD.categories_id, CD.categories_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SPECIALS . " s, categories AS C, categories_description AS CD, products_to_categories as pc where CD.language_id=1 AND p.products_status = '1' AND C.categories_id = CD.categories_id AND C.parent_id=0 and p.products_id = pc.products_id and pc.categories_id = C.categories_id and s.products_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and s.status = '1'"); } //print("<br><br>select distinct CD.categories_id, CD.categories_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SPECIALS . " s, categories AS C, categories_description AS CD, products_to_categories as pc where CD.language_id=1 AND p.products_status = '1' AND C.categories_id = CD.categories_id AND C.parent_id=0 and p.products_id = pc.products_id and pc.categories_id = C.categories_id and s.products_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and s.status = '1'"); //$result = mysql_query("SELECT CD.*, C.* FROM categories AS C, categories_description AS CD WHERE CD.language_id=1 AND C.categories_id = CD.categories_id AND C.parent_id=0"); ?> <SELECT NAME="clicklist"style="background-color:#F0F1F4" onChange="location.href=this.form.clicklist.options[this.form.clicklist.selectedIndex ].value"> <?php if ($chkSub1 == 1){ ?> <OPTION>Sub-categories <?php } else{ ?> <OPTION>Select by category <?php } ?> <option>---------------------- <?php while($row=mysql_fetch_object($result)) { print('<option value="specials.php?categories_id='.$row->categories_id.'&inc_subcat=1&manufacturers_id">'.$row->categories_name); } //mysql_free_result($result); ?> <option value="specials.php?categories_id=&inc_subcat=1&manufacturers_id">View All </SELECT NAME></form> ----- Find: ----- <?php $specials_query_raw = "select p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SPECIALS . " s where p.products_status = '1' and s.products_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and s.status = '1' order by s.specials_date_added DESC"; $specials_split = new splitPageResults($specials_query_raw, MAX_DISPLAY_SPECIAL_PRODUCTS); if (($specials_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3'))) { ?> ----------------- And replace with: ----------------- <?php if (isset($categories_id)){ if (empty($categories_id) && $categories_id==""){ $specials_query_raw = "select p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SPECIALS . " s where p.products_status = '1' and s.products_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and s.status = '1' order by s.specials_date_added DESC"; } else{ $specials_query_raw = "select p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SPECIALS . " s, " . TABLE_PRODUCTS_TO_CATEGORIES . " pcat, " . TABLE_CATEGORIES . " cat where p.products_status = '1' and p.products_id = pcat.products_id and pcat.categories_id = cat.categories_id and ((cat.categories_id = " . $categories_id . " or cat.parent_id = " . $categories_id . ")) and s.products_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and s.status = '1' order by s.specials_date_added DESC"; } } else{ $specials_query_raw = "select p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SPECIALS . " s where p.products_status = '1' and s.products_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and s.status = '1' order by s.specials_date_added DESC"; } $specials_split = new splitPageResults($specials_query_raw, MAX_DISPLAY_SPECIAL_PRODUCTS); if (($specials_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3'))) { ?>
  10. How can I slow down the rate at which the text switches from one message to the next... I would like to allow my customers a little extra time to read the message but Im not sure where to make the change. Thanks again for a great contribution!
  11. Unfortunately the only way I can get the international characters to work is by editing the file directly and using the HTML codes, but if you open the WYSWYG editor it will change your file BACK to the nonworking format. I am using the newsticker in the header so maybe the problem is that the header does not have UTF-8 capability? In either case, here is an example of my working tickercontent.ticker with an international character. <DIV class=message> <DIV class=message>Tack för att du handla hos oss! </DIV></DIV> It will display as: Tack för att du handla hos oss! If I change the tickercontent.ticker file and then open it in admin using the wyswyg editor I cannot use it. Hope someone posts a fix for this but the contribution is GREAT as it is and I don't mind the little extra work.
  12. Im using Quick Price Update v2.7 Full Version with CRE Loaded dated september 4 2007. I love this contribution it is saving me ALOT of time. How can I change the form layout so that I can see my entire MODEL name, which I have modified to be longer than the standard OSC model number of 8 characters? I have looked through quick_updates.php but Im not sure what to change.
  13. data2700

    Quickly Update Product Stock

    Hi, Im back again... has anyone found a way to modify quick_stockupdate.php so it can also edit the product name?
  14. data2700

    Links Manager II

    Hi Matt, I also had the same problem you had and I have applied the recommended fix and it worked for me, so it is probably something in your config file.
  15. data2700

    Links Manager II

    Yessss! that worked! Thanks Jack. This contrib will really help make my sight "sticky". :thumbsup:
×