Jump to content

petsk

Members
  • Content count

    102
  • Joined

  • Last visited

About petsk

  • Birthday 01/01/1911

Profile Information

  1. 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.
  2. 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) {
  3. 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:
  4. 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:
  5. 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 . ")");
  6. 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 . ")");
  7. 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]
  8. 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? <_<
  9. 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
  10. petsk

    AJAX Quick Search

    I have the same problem :( Any help whit this would be appreciated :)
  11. My product counts wrap too :/ How do I make it stop wrapping, is there a solution? I'm using the latest version 2.1
  12. 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
  13. 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
  14. Lovely contribution :D But I have two strange problems.. 1. When sending a Gift Voucher to a friend using the page gv_send.php in storefront the gv-link in the recived mail is outputted like this: http://localhost/store/gv_redeem.php?gv_no= In other words, no ID/number is added at the end of the trail. :blink: If I send a Gift Voucher trough admin the url is generated properly, eg: http://localhost/store/gv_redeem.php?gv_no=6eb0e4 2. If I try to send the same Gift Voucher once again, or trying to send a new Gift Voucher to a friend using the page gv_send.php in storefront the server stops responding :blink: :blink: When I drop/recreate the Gift Voucher database tables the server start responding again. <_< I'm using Gift Voucher version 5.14 on MS2.2. I've also reinstalled Gift Voucher contribution several times. I've also tested this on a clean shop, I did overwrite the stores files whit the changed files whitin this contribution, and it's still not working when trying to send Gift Voucher to friends. Very strange to me :( I have searched trough the web and this support tread and did find one other storeowner that had the exact same problem, but no one had replayed to the user. Please somebody, give me hint about what could be wrong :'(
×