Jump to content

petsk

Members
  • Content count

    103
  • Joined

  • Last visited

About petsk

  • Birthday 01/01/1911

Profile Information

Recent Profile Visitors

10,928 profile views
  1. petsk

    DB1064 Error

    Is this actual code for osC v4? If so, I’m shocked.
  2. petsk

    AJAX Attribute Manager support

    Can you also have a look why the contribution breaks if you set SESSION_FORCE_COOKIE_USE to True. It looks like the contribution can't find the session and is redirecting to admin/index.php. 'Force cookie usage' in the admin directory was introduced with oscommerce-2.3.4. oscommerce-2.3.3.2 line 76 in catalog/admin/functions/sessions.php: if (isset($HTTP_GET_VARS[tep_session_name()])) { if (preg_match('/^[a-zA-Z0-9,-]+$/', $HTTP_GET_VARS[tep_session_name()]) == false) { oscommerce-2.3.4 changed to: if ( isset($HTTP_GET_VARS[tep_session_name()]) ) { if ( (SESSION_FORCE_COOKIE_USE == 'True') || (preg_match('/^[a-zA-Z0-9,-]+$/', $HTTP_GET_VARS[tep_session_name()]) == false) ) { If you remove (SESSION_FORCE_COOKIE_USE == 'True') || in the line above the contribution load as normal.
  3. petsk

    AJAX Attribute Manager support

    This is issue occurs when sorting is activated. Open /catalog/admin/attributeManager/includes/attributeManagerPrompts.inc.php Change this, around line 40: $optionSortDrop = array('1', '2', '3', '4', '5', '6', '7', '8', '9'); $return .= ' <tr>'; if(AM_USE_SORT_ORDER) { To this: $optionSortDrop = array(); for ($i=1; $i<=10; $i++) { $optionSortDrop[] = array('id' => $i, 'text' => $i); } $return .= ' <tr>'; if(AM_USE_SORT_ORDER) {
  4. Does anyone know how to get images from a external domain working, eg: www.your-store.com/product_thumb.php?img=http://www.external-domain.com/some_image.jpg I can't find the problem in product_thumb.php. There's nothing wrong with the tep_image(); function anyway. Any ideas? :thumbsup:
  5. Have anyone managed to get the Page Cache contribution working with STS? It's truly a wonderful contribution that significantly increases the page loading time but I can't get the shopping cart items updated dynamically, it cache's the whole page. Any help is highly appreciated :thumbsup:
  6. petsk

    Newsletter products, HTML email

    A missing () caused the problem: $images_query = tep_db_query("select p.products_id, pd.language_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, if(s.status, s.specials_new_products_price, NULL) as specials_price from (" . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd) left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where pd.language_id = '1' and pd.products_id = p.products_id and p.products_id in(" . $this->products . ")");
  7. petsk

    Newsletter products, HTML email

    I belive it's the "left join " . TABLE_SPECIALS . "" that needs to be changed in $images_query... My code: $images_query = tep_db_query("select p.products_id, pd.language_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, if(s.status, s.specials_new_products_price, NULL) as specials_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where pd.language_id = '1' and pd.products_id = p.products_id and p.products_id in(" . $this->products . ")");
  8. petsk

    Newsletter products, HTML email

    I get the following sql error. Does anyone have a solution? :) The problem occurs using MySQL 5, version 4 doesn't give any errors. 1054 - Unknown column 'p.products_id' in 'on clause' select p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, if(s.status, s.specials_new_products_price, NULL) as specials_price from products p, products_description pd left join specials s on p.products_id = s.products_id where pd.products_id = p.products_id and p.products_id in(738,990,938,855,175,353,1059,1043,874,895,884,749,350) and pd.language_id=1 [TEP STOP]
  9. I'm reciving this SQL-error when I'm trying to reach admin/coupons.php: 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 '-50, 50' at line 1 select * from discount_coupons cd order by cd.coupons_date_end, coupons_date_start limit -50, 50 [TEP STOP] And this SQL-error when I'm trying to reach admin/stats_discount_coupons.php: 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 '-50, 50' at line 1 select dc.coupons_id, dc.coupons_discount_percent, dc.coupons_number_available, COUNT(dcto.discount_coupons_to_orders_id) AS coupons_use_count from discount_coupons AS dc left join discount_coupons_to_orders AS dcto ON dc.coupons_id = dcto.coupons_id group by dc.coupons_id order by coupons_use_count desc, dc.coupons_id asc limit -50, 50 [TEP STOP] Any suggestions? <_<
  10. Sure, here comes... Open: admin/includes/functions/general.php Find this at line ~199 $products_query = tep_db_query("select p.products_id, pd.products_name, p.products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by products_name"); while ($products = tep_db_fetch_array($products_query)) { if (!in_array($products['products_id'], $exclude)) { $select_string .= '<option value="' . $products['products_id'] . '">' . $products['products_name'] . ' (' . $currencies->format($products['products_price']) . ')</option>'; } } Change to: $products_query = tep_db_query("select p.products_id, p.products_model, pd.products_name, p.products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by products_name"); while ($products = tep_db_fetch_array($products_query)) { if (!in_array($products['products_id'], $exclude)) { $select_string .= '<option value="' . $products['products_id'] . '">[' . $products['products_model'] . ']?' . $products['products_name'] . '?(' . $currencies->format($products['products_price']) . ')</option>'; } } You can actually put almost any product information in the pulldown menu, eg stock quantity etc. // Peter EDIT: Note that this "hack" is going to show up in every pull down menu in admin
  11. petsk

    AJAX Quick Search

    I have the same problem :( Any help whit this would be appreciated :)
  12. My product counts wrap too :/ How do I make it stop wrapping, is there a solution? I'm using the latest version 2.1
  13. Chris, The code that generates the coupon code is added in general.php, the only thing missing in the instructions was defining the "SECURITY_CODE_LENGTH", therefor I did add it. But now I have a new problem, when enabling the "Downloadable Products" it jumps straight to checkout_payment.php instead of checkout_shipping.php. The problem is probably in includes/classes/shopping_cart.php, but does anyone know what to change in that file? Can I overwrite it whit the original osC file, or does it contain relevant code making the CCGV contribution stop working properly? :blush: /Peter
  14. Thanks! I have found out what it was now, It was a coding issue! If somebody else have the same problem, this is the fix.. In file: /includes/functions/general.php Add: define('SECURITY_CODE_LENGTH', '10'); /Peter
×