Jump to content

alex_rus

Members
  • Content count

    39
  • Joined

  • Last visited

Everything posted by alex_rus

  1. Support thread for Hide Product contribution. Post your questions and improvement here.
  2. alex_rus

    Newsdesk 1.49 - Unkown Column problem.

    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
  3. alex_rus

    OSC-Affiliate

    Issue resolved. Alex
  4. alex_rus

    OSC-Affiliate

    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
  5. alex_rus

    Dynamic SiteMap

    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
  6. alex_rus

    Dynamic SiteMap

    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
  7. alex_rus

    Dynamic SiteMap

    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
  8. alex_rus

    AJAX Attribute Manager support

    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
  9. alex_rus

    OSC-Affiliate

    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
  10. alex_rus

    Seperate Pricing Per Customer v3.5

    Yes it worked, I really forgot to call $customer_group_id Thanks a lot Alex
  11. alex_rus

    AJAX Attribute Manager support

    Issue solved - just change in attributeManager.php header('Content-type: text/html; charset=ISO-8859-1'); to what coding you need Alex
  12. alex_rus

    AJAX Attribute Manager support

    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
  13. alex_rus

    AJAX Attribute Manager support

    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
  14. alex_rus

    Seperate Pricing Per Customer v3.5

    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
  15. alex_rus

    Seperate Pricing Per Customer v3.5

    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
  16. 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
  17. Hi, can you send me this mod to "cc at compass-c dot com" or may be post it in contrib section? Thank you in advance Alexander
  18. alex_rus

    Easy Populate : cannot upload

    Hi, check that your temp dir has write permission (chmod 777) Alexander
  19. Hi, the "error" stated in your first post point 4-5 usually is due to, that your temp directory doesn't have right permissions. You must set chmod 777 to this dir. Or if yopu use IE, just right click on this TEMP dir and make sure that you allow write to everyone. (As first step tick al boxes, later you can disable some items). Alexander
  20. alex_rus

    PDF Catalog v.1.5

    Hi, set permission 777 on your "catalogues" directory Alexander
  21. alex_rus

    Wolfen Featured Sets SUPPORT

    Hi, do i correctly understand that i need to edit only featured_products.php? and the second: i have tried to change the code in featured_products.php, which handles the prices from: if ($featured_products_array[$i]['specials_price']) { $products_price = '<s>' . $currencies->display_price($featured_products_array[$i]['price'], tep_get_tax_rate($featured_products_array[$i]['tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($featured_products_array[$i]['specials_price'], tep_get_tax_rate($featured_products_array[$i]['tax_class_id'])) . '</span>'; } else { $products_price = $currencies->display_price($featured_products_array[$i]['price'], tep_get_tax_rate($featured_products_array[$i]['tax_class_id'])); } to $featured_products_array[$i]['price'] = $currencies->display_price($featured_products_array[$i]['price'], tep_get_tax_rate($featured_products_array[$i]['tax_class_id'])); global $customer_id; $customer_group_query = tep_db_query("select customers_group_id from " . TABLE_CUSTOMERS . " where customers_id = '" . $customer_id . "'"); $customer_group = tep_db_fetch_array($customer_group_query); $customer_group_price_query[$i] = tep_db_query("select customers_group_price from " . TABLE_PRODUCTS_GROUPS . " where products_id = '" . $featured_products_array[$i]['products_id'] . "' and customers_group_id = '" . $customer_group['customers_group_id'] . "'"); if ( $customer_group['customers_group_id'] != 0) { if ($customer_group_price = tep_db_fetch_array($customer_group_price_query)) { $featured_products_array[$i]['price'] = $currencies->display_price($customer_group_price[$i]['customers_group_price'], tep_get_tax_rate($featured_products_array[$i]['tax_class_id'])); } } if (PRICES_LOGGED_IN == 'false') { $product_price_d = $featured_products_array[$i]['price']; } if ((PRICES_LOGGED_IN == 'true') && (!tep_session_is_registered('customer_id'))) { $product_price_d = ('<a href="' . tep_href_link(FILENAME_LOGIN, '','SSL') . '">' . PRICES_LOGGED_IN_TEXT . '</a> ' ); } else { $product_price_d = $featured_products_array[$i]['price']; } but this shows only retail prices. Can you show where is a mistake? As I'm not a programmer it's very difficult for me to figure it out. Thanks for help. Alexander
  22. alex_rus

    Hide products from groups for B2BSuite

    Hi, i think yes, but you must rewrite some part of code to meet fields definition in Totalb2b Alexander
  23. alex_rus

    Wolfen Featured Sets SUPPORT

    Hi, can you post the code here if it possible? Thanks for help Alexander
  24. alex_rus

    Hide products from groups for B2BSuite

    Hide Product contribution can be taken here Post your questions and improvement here. I post it as contribution as may be more experience in PHP than I can help to solve the issues. If you have the existing shop with settled goods and want just to hide them from some customers on constant basis (and not make visible/invisible every day :rolleyes: ) you can use it without problems. Alexander
  25. alex_rus

    Wolfen Featured Sets SUPPORT

    hi, can anyone help with integration of Wolfen Featured Sets with B2BSuite? I played with the code, but as i'm not a programmer and couldn't make it work. Alexander
×