Jump to content

jccw

Members
  • Content count

    8
  • Joined

  • Last visited

  1. I've just download v1.7 ms contribution and found the following code in admin/includes/categories.php around line 467 //rmh M-S_multi-stores edited next line $product_query = tep_db_query("select pd.products_name, pd.products_description, pd.products_url, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_popup_image, p.products_price, p.products_cog1, p.products_cog2, p.products_qty_blocks, p.products_weight, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_tax_class_id, p.distributors_id, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd " . ($admin_allowed_stores[0] == '*' ? " " : " LEFT JOIN " . TABLE_PRODUCTS_TO_STORES . " p2s ON p.products_id = p2s.products_id ") . "where p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'". ($admin_allowed_stores[0] == '*' ? " " : " and p2s.stores_id in(" . implode(',' , $admin_allowed_stores) . ") ")); There're some fields: proudcts_popup_image, cog1, cog2, ... I have no ideas about these fields and they didn't exist in my original os commerce database in my product table. And I checked the update.sql in the contribution, there's no codes to add these fields too. So when I get in to my store admin panel and try to edit an existing prouct, an sql error comes out: 1054 - Unknown column 'p.products_cog1' in 'field list' select pd.products_name, pd.products_description, pd.products_url, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_popup_image, p.products_price, p.products_cog1, p.products_cog2, p.products_qty_blocks, p.products_weight, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_tax_class_id, p.distributors_id, p.manufacturers_id from products p, products_description pd where p.products_id = '26' and p.products_id = pd.products_id and pd.language_id = '1' May anyone help me to solve this problem? Thanks a lot! :)
  2. The problem still there after I change the sort order value. But later on I found out what happen there. I d/l this module version 1.5 on Oct.14,2005 from this website. The file name was "points_reward_v1_1_2_3_4_5_6_7_8_9_10_11_12_13_14.zip". And I press the same link again today, I realize that the file name is change to "points_reward_v1_1_2_3_4_5_6_7_8_9_10_11_12.zip". Then I use winmerge to check all contents in this two files. The only different is in the checkout_confirmation.php : my new version: ##### Points/Rewards Module V1.50 check for error BOF ####### if (USE_REDEEM_SYSTEM == 'true') { if (!tep_session_is_registered('customer_shopping_points_spending')) tep_session_register('customer_shopping_points_spending'); if (isset($HTTP_POST_VARS['customer_shopping_points_spending']) && (POINTS_LIMIT_EXACT == 'false')){ $customer_shopping_points_spending = $HTTP_POST_VARS['customer_shopping_points_spending']; } // customer can't use other then the exact amount when enabled if (isset($HTTP_POST_VARS['customer_shopping_points_spending']) && (POINTS_LIMIT_EXACT == 'true')){ $customer_shopping_points_spending = POINTS_EXACT_VALUE; } if (isset($HTTP_POST_VARS['customer_shopping_points_spending']) && (!$customer_shopping_points_spending) && !is_object($$payment)){ tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(REDEEM_SYSTEM_ERROR_POINTS_EMPTY), 'SSL')); } // register customer shopping points $customer_shopping_points = tep_get_shopping_points(); // customer can't use invalid points amount if ($customer_shopping_points < $customer_shopping_points_spending) { $customer_shopping_points_spending = 0; tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(REDEEM_SYSTEM_ERROR_POINTS), 'SSL')); } // customer can't use points over the max allowed if ($customer_shopping_points_spending > POINTS_MAX_VALUE) { $customer_shopping_points_spending = 0; tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(REDEEM_SYSTEM_ERROR_POINTS_MAX), 'SSL')); } } //force customers to select other payment method if the points total not enough to cover the cost. if (tep_calc_shopping_pvalue($customer_shopping_points_spending) < $order->info['total'] && !is_object($$payment)) { tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(REDEEM_SYSTEM_ERROR_POINTS_NOT), 'SSL')); } // customer can't use points over the order total if (tep_calc_shopping_pvalue($customer_shopping_points_spending) > $order->info['total']) { $customer_shopping_points_spending = 0; tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(REDEEM_SYSTEM_ERROR_POINTS_OVER), 'SSL')); } // if ( ( is_array($payment_modules->modules) && (sizeof($payment_modules->modules) > 1) && !is_object($$payment) ) || (is_object($$payment) && ($$payment->enabled == false)) ) { if ( (is_array($payment_modules->modules)) && (sizeof($payment_modules->modules) > 1) && (!is_object($$payment)) && (!$customer_shopping_points_spending) || (is_object($$payment) && ($$payment->enabled == false)) ) { tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(ERROR_NO_PAYMENT_MODULE_SELECTED), 'SSL')); } ######## Points/Rewards Module V1.50 EOF #################*/ my old version: ##### Points/Rewards Module V1.50 check for error BOF ####### if (isset($HTTP_POST_VARS['customer_shopping_points_spending']) && (USE_REDEEM_SYSTEM == 'true')) { if (isset($HTTP_POST_VARS['customer_shopping_points_spending']) && (POINTS_LIMIT_EXACT == 'false')){ $customer_shopping_points_spending = $HTTP_POST_VARS['customer_shopping_points_spending']; } // customer can't use other then the exact amount when enabled if (isset($HTTP_POST_VARS['customer_shopping_points_spending']) && (POINTS_LIMIT_EXACT == 'true')){ $customer_shopping_points_spending = POINTS_EXACT_VALUE; } // register customer shopping points $customer_shopping_points = tep_get_shopping_points(); // customer can't use invalid points amount if ($customer_shopping_points < $customer_shopping_points_spending) { $customer_shopping_points_spending = 0; tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(REDEEM_SYSTEM_ERROR_POINTS), 'SSL')); } // customer can't use points over the max allowed if ($customer_shopping_points_spending > POINTS_MAX_VALUE) { $customer_shopping_points_spending = 0; tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(REDEEM_SYSTEM_ERROR_POINTS_MAX), 'SSL')); } //force customers to select other payment method if the points total not enough to cover the cost. if ( $customer_shopping_points_spending && tep_calc_shopping_pvalue($customer_shopping_points_spending) < $order->info['total'] && !is_object($$payment)) { tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(REDEEM_SYSTEM_ERROR_POINTS_NOT), 'SSL')); } // customer can't use points over the order total if (tep_calc_shopping_pvalue($customer_shopping_points_spending) > $order->info['total']) { $customer_shopping_points_spending = 0; tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(REDEEM_SYSTEM_ERROR_POINTS_OVER), 'SSL')); } } // if ( ( is_array($payment_modules->modules) && (sizeof($payment_modules->modules) > 1) && !is_object($$payment) ) || (is_object($$payment) && ($$payment->enabled == false)) ) { if ( (is_array($payment_modules->modules)) && (sizeof($payment_modules->modules) > 1) && (!is_object($$payment)) && (!$customer_shopping_points_spending) || (is_object($$payment) && ($$payment->enabled == false)) ) { tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(ERROR_NO_PAYMENT_MODULE_SELECTED), 'SSL')); } ######## Points/Rewards Module V1.50 EOF #################*/ after replaced the new version codes, the system works perfectly now. CHEERS!!!!!!!!!!!!!!! :) Jason
  3. I am so sorry for this silly mistake, deep sliver :'( I read the install text file, and thought that mean I need to set point redeemption higher than 4 instead of total. Thank you so much for your help. Jason :'(
  4. Thank you for your contribution and your great support, deep silver :) here's my system info in my oscommerce admin page. Server Host: (192.168.0.53) Database Host: 127.0.0.1 (127.0.0.1) Server OS: Database: MySQL 4.1.13a Server Date: 10/18/2005 17:27:34 Datebase Date: 10/18/2005 17:27:33 Server Up Time: HTTP Server: Apache/2.0.54 (Win32) mod_perl/1.99_16 Perl/v5.8.6 PHP/4.4.0 PHP Version: 4.4.0 (Zend: 1.3.0) I've only installed two contributions: Color Theme! v2.00 and Mail Validation Ver 1.6b. All files are same as the package except create account files because mail validation contribution need to activate account first. I hope that won't be the problem. and here's in my admin panel setting: point system configuration: Enable Points system true Enable Redemptions system true Points per 1.Yen purchase 1 Yen Redeem per point 0.1 Award points for shipping false Award points for Tax false Award points for Specials true Award points for order with redeemed points true Enable Products Restriction false If Restriction enabled set model Allowed. DVD-FRAN Or set Product ID Allowed. 15 Or set Category ID Allowed. Enable Products Price Restriction false If you wish to limit points before Redemptions, set points limit 0 If you wish to limit points to be use per order, set points Max 1000 Limit Points Redemptions to exact amount. false If Points Exact amount enabled, set the exact amount 100 New signup customers Welcome Points amount 0 Maximum number of points records to display 20 Display Points information in Product info page true Keep Records of Redeemed Points true Session configuration: Session Directory /tmp Force Cookie Use False Check SSL Session ID False Check User Agent False Check IP Address False Prevent Spider Sessions False Recreate Session False Order Module: Low Order Fee Points Redeemptions 5 Shipping 2 Sub-Total 1 Tax 3 Total 4
  5. I double checked all relevant files and database tables. They all looks fine. Every function in this module works fine except the system can't redeem the point. I think the major problem still in checkout_process.php file. And I don't know why all other variable like $customer_id works fine except $customer_shopping_points_spending which become null and can't hold the correct value. I have use winmerge to check my files and I am sure they are the same as the package one. Please give me some ideas to fix this problem. Thanks. Jason
  6. Moreover, I did few debugs test on that. I found out there's a problem between checkout_confirmation and checkout_process. The variable $customer_shopping_points_spending still correct in page checkout_confirmation but $customer_shopping_points_spending become NULL in checkout_process page. So when I add a code like $customer_shopping_points_spending = 500 at the beginning of checkout_process page, the system will reduce the customer's points. So may anyone tell me why this happen? thank you. Jason
  7. Hi, I am new to OS commerce but with some php and website knowledge. First, thanks for this contribution and it's really what i want for my web site. However, after I followed all install instrutions, there's a problem happen. When a customer used his points to purchase, the system didn't reduce his account's points. Do i need to set up session in conifiguration when i use this contribution? now my configuration for sessions are all set to false and the session direction is /tmp <--- but i didn't create tmp in my www folders. Thanks in advance. Jason Oct. 17, 2005
×