Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

alex_rus

Archived
  • Posts

    39
  • Joined

  • Last visited

Profile Information

  • Real Name
    Alexander

alex_rus's Achievements

  1. better solution can be: change the identified code to the following code: $listing_sql = "select " . $select_column_list . " p.newsdesk_id, p.newsdesk_status, p.newsdesk_date_added, pd.newsdesk_article_name, pd.newsdesk_article_shorttext, pd.newsdesk_article_description, pd.newsdesk_article_url, pd.newsdesk_article_url_name, p.newsdesk_image, p.newsdesk_image_two, p.newsdesk_image_three, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, NULL) as final_price from (" . TABLE_NEWSDESK_DESCRIPTION . " pd, " . TABLE_NEWSDESK . " p left join " . TABLE_MANUFACTURERS . " m on p.newsdesk_id = m.manufacturers_id, " . TABLE_NEWSDESK_TO_CATEGORIES . " p2c ) left join " . TABLE_SPECIALS . " s on p.newsdesk_id = s.products_id where p.newsdesk_status = '1' and p.newsdesk_id = p2c.newsdesk_id and pd.newsdesk_id = p2c.newsdesk_id and pd.language_id = '" . $languages_id . "' and p2c.categories_id = '" . $current_category_id . "'"; Alex
  2. Addition to my previous post, the error is generated by the following line: $affiliate_query = tep_db_query("SELECT affiliate_rgt, affiliate_lft, affiliate_root FROM (" . TABLE_AFFILIATE . ") WHERE affiliate_id = '" . $affiliate_id . "' "); in the function, which is in file affiliate_functions.php: function affiliate_delete ($affiliate_id) { $affiliate_query = tep_db_query("SELECT affiliate_rgt, affiliate_lft, affiliate_root FROM (" . TABLE_AFFILIATE . ") WHERE affiliate_id = '" . $affiliate_id . "' "); if ($affiliate = tep_db_fetch_array($affiliate_query)) { if ($affiliate['affiliate_root'] == $affiliate_id) { // a root entry is deleted -> his childs get root $affiliate_child_query = tep_db_query(" SELECT aa1.affiliate_id, aa1.affiliate_lft, aa1.affiliate_rgt, COUNT(*) AS level FROM affiliate_affiliate AS aa1, affiliate_affiliate AS aa2 WHERE aa1.affiliate_root = " . $affiliate['affiliate_root'] . " AND aa2.affiliate_root = aa1.affiliate_root AND aa1.affiliate_lft BETWEEN aa2.affiliate_lft AND aa2.affiliate_rgt AND aa1.affiliate_rgt BETWEEN aa2.affiliate_lft AND aa2.affiliate_rgt GROUP BY aa1.affiliate_id, aa1.affiliate_lft, aa1.affiliate_rgt HAVING level = 2 ORDER BY aa1.affiliate_id "); tep_db_query("LOCK TABLES " . TABLE_AFFILIATE . " WRITE"); while ($affiliate_child = tep_db_fetch_array($affiliate_child_query)) { tep_db_query ("UPDATE " . TABLE_AFFILIATE . " SET affiliate_root = " . $affiliate_child['affiliate_id'] . " WHERE affiliate_root = " . $affiliate['affiliate_root'] . " AND affiliate_lft >= " . $affiliate_child['affiliate_lft'] . " AND affiliate_rgt <= " . $affiliate_child['affiliate_rgt'] . " "); $substract = $affiliate_child['affiliate_lft'] -1; tep_db_query ("UPDATE " . TABLE_AFFILIATE . " SET affiliate_lft = affiliate_lft - " . $substract . " WHERE affiliate_root = " . $affiliate_child['affiliate_id']); tep_db_query ("UPDATE " . TABLE_AFFILIATE . " SET affiliate_rgt = affiliate_rgt - " . $substract . " WHERE affiliate_root = " . $affiliate_child['affiliate_id']); } tep_db_query("DELETE FROM " . TABLE_AFFILIATE . " WHERE affiliate_id = " . $affiliate_id); tep_db_query("UNLOCK TABLES"); } else { tep_db_query("LOCK TABLES " . TABLE_AFFILIATE . " WRITE"); tep_db_query("DELETE FROM " . TABLE_AFFILIATE . " WHERE affiliate_id = " . $affiliate_id . " AND affiliate_root = " . $affiliate['affiliate_root'] . " "); tep_db_query("UPDATE " . TABLE_AFFILIATE . " SET affiliate_lft = affiliate_lft -1, affiliate_rgt=affiliate_rgt-1 WHERE affiliate_lft BETWEEN " . $affiliate['affiliate_lft'] . " and " . $affiliate['affiliate_rgt'] . " AND affiliate_root = " . $affiliate['affiliate_root'] . " "); tep_db_query("UPDATE " . TABLE_AFFILIATE . " SET affiliate_lft = affiliate_lft-2 WHERE affiliate_lft > " . $affiliate['affiliate_rgt'] . " AND affiliate_root = " . $affiliate['affiliate_root'] . " "); tep_db_query("UPDATE " . TABLE_AFFILIATE . " SET affiliate_rgt = affiliate_rgt-2 WHERE affiliate_rgt > " . $affiliate['affiliate_rgt'] . " AND affiliate_root = " . $affiliate['affiliate_root'] . " "); tep_db_query("UNLOCK TABLES"); } } } Does anyone have ideas how to solve this issue? Alex
  3. Unfortunately this didn't help. The following code cause this issue: if (count($boxHeading) > 0) { for ($b = 0; $b < count($boxHeading); ++$b) { echo '<li>'.$boxHeading[$b]['heading'][$b].'</li>'; ?> <ul><?php for ($f = 0; $f < count($boxHeading[$b]['filename']); ++$f) if (tep_not_null($boxHeading[$b]['filename'][$f])) echo '<li><a title="'. $boxHeading[$b]['boxtext'][$f] .'" href="' . tep_href_link($boxHeading[$b]['filename'][$f]) . '">' . $boxHeading[$b]['boxtext'][$f] . '</a></li>'; ?> </ul> Any other ideas, thanks for help Alex
  4. Unfortunately this didn't help. The following code cause this issue: if (count($boxHeading) > 0) { for ($b = 0; $b < count($boxHeading); ++$b) { echo '<li>'.$boxHeading[$b]['heading'][$b].'</li>'; ?> <ul><?php for ($f = 0; $f < count($boxHeading[$b]['filename']); ++$f) if (tep_not_null($boxHeading[$b]['filename'][$f])) echo '<li><a title="'. $boxHeading[$b]['boxtext'][$f] .'" href="' . tep_href_link($boxHeading[$b]['filename'][$f]) . '">' . $boxHeading[$b]['boxtext'][$f] . '</a></li>'; ?> </ul> Any other ideas, thanks for help Alex
  5. Hi, I've installed Dynamic Sitemap v.2.0, and have the following issue: Product categories shows Ok, than Login (login.php) and than Shoping cart info (info_shopping_cart.php) are shown and then I get error message: [b]Fatal error[/b]: Cannot use string offset as an array in [b]/www/vhosts/alex-rus.com/html/oscommerce/dynamic_sitemap.php[/b] on line [b]70[/b] I can exclude all php files in catalog and boxes in admin area not to be shown but the error remains. Can any one help? Alex
  6. In file attributeManagerConfig.class.php just find line $this->add('AM_USE_SORT_ORDER' - that is around line 59 In 2.5 it reads as $this->add('AM_USE_SORT_ORDER' , true); , and in 2.4 by default it is set to false, so just change it in 2.5 to $this->add('AM_USE_SORT_ORDER' , false); and there won't be any errors regarding Unknown column 'products_options_sort_order' in 'order clause' Alex
  7. Hi, does any one know how to solve again SQL 1064 error (I searched forum, but didn't find any solution regardind this particular issue). Error as usual is following: [color="#000000"][b]1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' FROM affiliate_affiliate WHERE affiliate_id = '1'' at line 1 SELECT affiliate_rgt, affiliate_lft, affiliate_root FROM affiliate_affiliate WHERE affiliate_id = '1' [color="#ff0000"][TEP STOP][/color][/b][/color] But this happens only when trying to delete affiliate, in all other places everything is normal. In browser address looks like: http://site.com/admin/affiliate_affiliates.php?page=1&acID=1&action=deleteconfirm Thanks for your help. Alex
  8. Yes it worked, I really forgot to call $customer_group_id Thanks a lot Alex
  9. Issue solved - just change in attributeManager.php header('Content-type: text/html; charset=ISO-8859-1'); to what coding you need Alex
  10. Run in phpMyadmin the following: INSERT INTO `admin_files` VALUES ('', 'attributeManager.php', 0, 3, '1'); change last '1' to what ever group you need, or write '1,2,3' to allow access to groups 1, 2 and 3 P.S. \this is written in manual :thumbsup: Alex
  11. Hi, Does any one faced the following problem or know how to solve it? Please refer to the screen shot The characters should be in Cyrillic Alex
  12. Here is addition to my previous post: in pad_base.php the function where the second and third changes (as per instructions) should be made looks the following way: function _build_attributes_array($build_stocked, $build_nonstocked) { global $languages_id; global $currencies; global $cart; if (!($build_stocked | $build_nonstocked)) return null; if ($build_stocked && $build_nonstocked) { $stocked_where=''; } elseif ($build_stocked) { $stocked_where="and popt.products_options_track_stock = '1'"; } elseif ($build_nonstocked) { $stocked_where="and popt.products_options_track_stock = '0'"; } $products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name, popt.products_options_track_stock from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$this->products_id . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' " . $stocked_where . " order by popt.products_options_name"); $attributes=array(); while ($products_options_name = tep_db_fetch_array($products_options_name_query)) { $products_options_array = array(); $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$this->products_id . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'"); while ($products_options = tep_db_fetch_array($products_options_query)) { $products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']); if ($products_options['options_values_price'] != '0') { $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($this->products_tax_class_id)) .')'; } } if (isset($cart->contents[$this->products_id]['attributes'][$products_options_name['products_options_id']])) $selected = $cart->contents[$this->products_id]['attributes'][$products_options_name['products_options_id']]; else $selected = 0; $attributes[]=array('oid'=>$products_options_name['products_options_id'], 'oname'=>$products_options_name['products_options_name'], 'ovals'=>$products_options_array, 'default'=>$selected); } return $attributes; } i changed it to the following: function _build_attributes_array($build_stocked, $build_nonstocked) { global $languages_id; global $currencies; global $cart; if (!($build_stocked | $build_nonstocked)) return null; if ($build_stocked && $build_nonstocked) { $stocked_where=''; } elseif ($build_stocked) { $stocked_where="and popt.products_options_track_stock = '1'"; } elseif ($build_nonstocked) { $stocked_where="and popt.products_options_track_stock = '0'"; } $products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name, popt.products_options_track_stock from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$this->products_id . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' " . $stocked_where . " and find_in_set('".$customer_group_id."', attributes_hide_from_groups) = 0 order by popt.products_options_name"); $attributes=array(); while ($products_options_name = tep_db_fetch_array($products_options_name_query)) { $products_options_array = array(); $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix, pa.products_attributes_id from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$this->products_id . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "' and find_in_set('".$customer_group_id."', attributes_hide_from_groups) = 0"); $list_of_prdcts_attributes_id = ''; $products_options = array(); // makes sure this array is empty again while ($_products_options = tep_db_fetch_array($products_options_query)) { $products_options[] = $_products_options; $list_of_prdcts_attributes_id .= $_products_options['products_attributes_id'].","; } if (tep_not_null($list_of_prdcts_attributes_id) && $customer_group_id != '0') { $select_list_of_prdcts_attributes_ids = "(" . substr($list_of_prdcts_attributes_id, 0 , -1) . ")"; $pag_query = tep_db_query("select products_attributes_id, options_values_price, price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES_GROUPS . " where products_attributes_id IN " . $select_list_of_prdcts_attributes_ids . " AND customers_group_id = '" . $customer_group_id . "'"); while ($pag_array = tep_db_fetch_array($pag_query)) { $cg_attr_prices[] = $pag_array; } // substitute options_values_price and prefix for those for the customer group (if available) if ($customer_group_id != '0' && tep_not_null($cg_attr_prices)) { for ($n = 0; $n < count($products_options); $n++) { for ($i = 0; $i < count($cg_attr_prices); $i++) { if ($cg_attr_prices[$i]['products_attributes_id'] == $products_options[$n]['products_attributes_id']) { $products_options[$n]['price_prefix'] = $cg_attr_prices[$i]['price_prefix']; $products_options[$n]['options_values_price'] = $cg_attr_prices[$i]['options_values_price']; } } // end for ($i = 0; $i < count($cg_att_prices); $i++) } } // end if ($customer_group_id != '0' && (tep_not_null($cg_attr_prices)) } // end if (tep_not_null($list_of_prdcts_attributes_id) && $customer_group_id != '0') for ($n = 0; $n < count($products_options); $n++) { $products_options_array[] = array('id' => $products_options[$n]['products_options_values_id'], 'text' => $products_options[$n]['products_options_values_name']); if ($products_options[$n]['options_values_price'] != '0') { $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options[$n]['price_prefix'] . $currencies->display_price($products_options[$n]['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') '; } } // EOF SPPC attributes mod if (isset($cart->contents[$this->products_id]['attributes'][$products_options_name['products_options_id']])) $selected = $cart->contents[$this->products_id]['attributes'][$products_options_name['products_options_id']]; else $selected = 0; $attributes[]=array('oid'=>$products_options_name['products_options_id'], 'oname'=>$products_options_name['products_options_name'], 'ovals'=>$products_options_array, 'default'=>$selected); } return $attributes; } Can any one help? Alex
  13. Hi does any one have a success to combine QTPro 4.3 and SPPC attributes mod rev. 1. I have tried and faced the following issue: everything went smoothly except one thing on product_info.php I need to change the blocks of code. The first suggested change is within file product_info.php **REPLACE** $products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'"); **WITH** // BOF SPPC Hide attributes from customer groups $products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' and find_in_set('".$customer_group_id."', attributes_hide_from_groups) = 0 "); But the second and third chandes are within file pad_base.php, basically the suggested changes can be made, they are not changed (significantly) by QTPro but when I just change them nothing works. No errors in standard view. If I just replace my product_info.php with supplied in archive everything starts to work, except QTPro :( . Does any one solved this? Alexander
  14. Hi, I've installed PDF data sheet maker and it writes the following error: Warning: _parsegif(gif.php): failed to open stream: No such file or directory in /www/1vhosts/mycompany.com/html/dealers/pdf/fpdf/fpdf.php on line 1596 Fatal error: _parsegif(): Failed opening required 'gif.php' (include_path='') in /www/1vhosts/mycompany.com/html/dealers/pdf/fpdf/fpdf.php on line 1596 Can some one help, does it write this error? File gif.php is present in destination dir. Also I have this mod installed on other site (same host provider), but osC is in root dir and it works fine. Thanks for help. Alexander
×
×
  • Create New...