Jump to content

smurphy

Members
  • Content count

    23
  • Joined

  • Last visited

1 Follower

Profile Information

  • Real Name
    Sophia Murphy
  • Location
    MN
  1. Did anyone solve this problem? I need a fix for this ASAP - and I have spent days looking into it. Is it something with the shell_exec? Something with NETBPM? Any insight on this will be greatly appreciated it.
  2. If there a contrib out there that just has the code for discount coupons - without all the code for Gift Vouchers? I have no need for Gift Vouchers, and I don't even want them to be seen or have them be able to be activated or anything like that. Help?
  3. Doh. I found the problem. I wasn't even using Chandra's mod - I was using ConteZero's mod - and I missed a file - classes/order.php I am in the process of installing and configuring three carts at once - all using different mods - and I got mixed up! Sorry to waste your time - but thank you for all the help!!!
  4. I'll double, triple check those files again. It's not just the text boxes that don't work - it's all of them - in fact I'm not even using text boxes. I'm using mostly selects and checkboxes -and neither will work. Yes, the site is live - but... because we are so close to *finishing* I hesitate to give access for test orders - because we are in the process of cleaning up all test data - and the client is keeping a close eye on what's going on.
  5. My attributes show up EVERYWHERE (ie: shopping_cart.php) else But checkout_confirmation and the emails. Looking through Chandra's modifications a second and third time - I realized that those files are not even touched. Do you want we to attach some code?
  6. Yes- all of the attributes. For example - checkboxes. If I have selected 4 items - I see this in checkout_confirmation Product Name - ; - ; - ; -; So - it knows that there are four attributes - but for some reason it can't find their names. As for backups. I'm usually very uptight about backups - and make a fresh backup everytime I install something, and then again at the end of the day. Unfortunately - this catalog had a tight deadline - and I rushed to finish it. I was getting bombarded with "do this's" while I was in the process of installing. So reverting back to by pre-Chandra mod - would mean losing alot of other stuff - and I'm not sure exactly what that will be. Fortunately, at the last minute - the deadline was pushed back due to outside circumstances - so I have an additional week to fiqure this out. As for my version - where do I look for that?
  7. Yes- all of the attributes. For example - checkboxes. If I have selected 4 items - I see this in checkout_confirmation Product Name - ; - ; - ; -; So - it knows that there are four attributes - but for some reason it can't find their names. As for backups. I'm usually very uptight about backups - and make a fresh backup everytime I install something, and then again at the end of the day. Unfortunately - this catalog had a tight deadline - and I rushed to finish it. So reverting back to by pre-Chandra mod - would mean losing alot of other stuff - and I'm not sure exactly what that will be. As for my version - where do I look for that?
  8. Yes- all of the attributes. For example - checkboxes. If I have selected 4 items - I see this in checkout_confirmation Product Name - ; - ; - ; -; So - it knows that there are four attributes - but for some reason it can't find their names. As for backups. I'm usually very uptight about backups - and make a fresh backup everytime I install something, and then again at the end of the day. Unfortunately - this catalog had a tight deadline - and I rushed to finish it. So reverting back to by pre-Chandra mod - would mean losing alot of other stuff - and I'm not sure exactly what that will be. As for my version - where do I look for that?
  9. I've installed Chandra's mod, 1.4. And I'm not able to get the attributes to appear on checkout_confirmation.php or in the emails. I have ALOT of customization, so I absolutely cannot revert to my backup at this point - does anyone have any ideas?
  10. I think I solved the problem - I changed the collect_posts function in catalog/includes/modules/order_total/ot_coupon.php to the following: (ignore all my TEST markings, they just help identify which codes areas apply to which errors) function collect_posts() { global $HTTP_POST_VARS, $customer_id, $currencies, $cc_id, $order; // ,$order added if ($HTTP_POST_VARS['gv_redeem_code']) { // get some info from the coupon table $coupon_query=tep_db_query("select coupon_id, coupon_amount, coupon_type, coupon_minimum_order, uses_per_coupon, uses_per_user, restrict_to_products, restrict_to_categories from " . TABLE_COUPONS . " where coupon_code='".$HTTP_POST_VARS['gv_redeem_code']."' and coupon_active='Y'"); $coupon_result=tep_db_fetch_array($coupon_query); if ($coupon_result['coupon_type'] != 'G') { //TEST4 - this is an invalid coupon code if (tep_db_num_rows($coupon_query)==0) { tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(ERROR_NO_INVALID_REDEEM_COUPON), 'SSL')); } //END TEST4 //TEST9 - has this coupon been activated yet? $date_query=tep_db_query("select coupon_start_date from " . TABLE_COUPONS . " where coupon_start_date <= now() and coupon_code='".$HTTP_POST_VARS['gv_redeem_code']."'"); if (tep_db_num_rows($date_query)==0) { tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(ERROR_INVALID_STARTDATE_COUPON), 'SSL')); } //END TEST9 //TEST10 - is this coupon still valid, or has it expired? $date_query=tep_db_query("select coupon_expire_date from " . TABLE_COUPONS . " where coupon_expire_date >= now() and coupon_code='".$HTTP_POST_VARS['gv_redeem_code']."'"); if (tep_db_num_rows($date_query)==0) { tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(ERROR_INVALID_FINISDATE_COUPON), 'SSL')); } //END TEST10 //TEST5 - has this coupon been used too many times? $coupon_count = tep_db_query("select coupon_id from " . TABLE_COUPON_REDEEM_TRACK . " where coupon_id = '" . $coupon_result['coupon_id']."'"); $coupon_count_customer = tep_db_query("select coupon_id from " . TABLE_COUPON_REDEEM_TRACK . " where coupon_id = '" . $coupon_result['coupon_id']."' and customer_id = '" . $customer_id . "'"); if (tep_db_num_rows($coupon_count)>=$coupon_result['uses_per_coupon'] && $coupon_result['uses_per_coupon'] > 0) { tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(ERROR_INVALID_USES_COUPON . $coupon_result['uses_per_coupon'] . TIMES ), 'SSL')); } //END TEST5 //TEST6 - has this user used up all their coupon uses? if (tep_db_num_rows($coupon_count_customer)>=$coupon_result['uses_per_user'] && $coupon_result['uses_per_user'] > 0) { tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(ERROR_INVALID_USES_USER_COUPON . $coupon_result['uses_per_user'] . TIMES ), 'SSL')); } //END TEST6 //TEST2 - user gets free shipping ?? if ($coupon_result['coupon_type']=='S') { $coupon_amount = $order->info['shipping_cost']; } else { $coupon_amount = $currencies->format($coupon_result['coupon_amount']) . ' '; } //END TEST2 //TEST3 - user gets a percentage deduction if ($coupon_result['type']=='P') $coupon_amount = $coupon_result['coupon_amount'] . '% '; //END TEST3 //added for additional error messages //used for TEST1, TEST7, and TEST8 $_SESSION['cc_id'] = $coupon_result['coupon_id']; $cc_id = $_SESSION['cc_id']; $od_amount = 0; // if ($cc_id) { $coupon_query = tep_db_query("select coupon_code from " . TABLE_COUPONS . " where coupon_id = '" . $cc_id . "'"); if (tep_db_num_rows($coupon_query) !=0 ) { $coupon_result = tep_db_fetch_array($coupon_query); $this->coupon_code = $coupon_result['coupon_code']; $coupon_get = tep_db_query("select coupon_amount, coupon_minimum_order, restrict_to_products, restrict_to_categories, coupon_type from " . TABLE_COUPONS ." where coupon_code = '". $coupon_result['coupon_code'] . "'"); $get_result = tep_db_fetch_array($coupon_get); //$c_deduct = $get_result['coupon_amount']; //if ($get_result['coupon_type']=='S') $c_deduct = $order->info['shipping_cost']; if ($get_result['coupon_minimum_order']) $overMinOrder = false; if ($get_result['restrict_to_products']) $validProduct = false; if ($get_result['restrict_to_categories']) $validCategory = false; if ($get_result['coupon_minimum_order'] <= $this->get_order_total()) { if ($get_result['restrict_to_products'] || $get_result['restrict_to_categories']) { for ($i=0; $i<sizeof($order->products); $i++) { if ($get_result['restrict_to_products']) { $pr_ids = split("[,]", $get_result['restrict_to_products']); for ($ii = 0; $ii < count($pr_ids); $ii++) { if ($pr_ids[$ii] == tep_get_prid($order->products[$i]['id'])) { $validProduct = true; //$validCategory = true; } } } else { //$validCategory = false; $cat_ids = split("[,]", $get_result['restrict_to_categories']); for ($i=0; $i<sizeof($order->products); $i++) { $my_path = tep_get_product_path(tep_get_prid($order->products[$i]['id'])); $sub_cat_ids = split("[_]", $my_path); for ($iii = 0; $iii < count($sub_cat_ids); $iii++) { for ($ii = 0; $ii < count($cat_ids); $ii++) { if ($sub_cat_ids[$iii] == $cat_ids[$ii]) { $validCategory = true; } } } } } } } $overMinOrder = true; } } //if ($od_amount>$amount) $od_amount = $amount; // } //TEST1 - have they purchased enough to fulfill the min purchase requirement? if($get_result['coupon_minimum_order'] > 0) { if(!$overMinOrder) { tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=You must purchase a minimum of $' . number_format($get_result['coupon_minimum_order'],2) . ' before using this coupon.' . $overMinOrder, 'SSL')); } } //if ($coupon_result['coupon_minimum_order']>0) $coupon_amount .= 'on orders greater than ' . $coupon_result['coupon_minimum_order']; //END TEST1 //TEST7 - does this coupon require you buy a certain product - does the user have that product if($get_result['restrict_to_products'] > 0) { if(!$validProduct) { tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=This coupon has product restrictions, please click the Coupons: more info link in your Shopping Cart box for more information.', 'SSL')); } } //END TEST7 //TEST8 - does this coupon require you buy from a certain category - does the user have the right products? if($get_result['restrict_to_categories'] > 0) { if(!$validCategory) { tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=This coupon has category restrictions, please click the Coupons: more info link in your Shopping Cart box for more information.', 'SSL')); } } //END TEST8 }
  11. The following types of codes do not generate an error message to alert the user: 1. User does not meet the Minimum Order requirement for that particular discount code 2. User does not meet the Valid Product requirement. 3. User does not meet the Valid Category requirement. Granted, the discount code is not applied - but the user is not notified that there discount wasn't applied. Another error, catalog/includes/modules/order_total/ot_coupon.php line 73ish $selection_string .= ' <td align="right"' . $image_submit . '</td>'; shouldn't it be $selection_string .= ' <td align="right">' . $image_submit . '</td>'; ?? With the '>' in there - the redeem button shows up, otherwise it doesn't. Granted I still get the same errors with or without the redeem button. Any help with these error messages would be greatly, greatly appreciated. SMurphy
  12. I have the discount coupons working - and I disabled the gift vouchers - because I don't need them. I just buckled down and reinstalled. Things appear to be working well. SM
  13. Now it doesn't recognize gift vouchers either - I'm guessing that they both have the same problem. I sent myself, the customer, a gift voucher via the admin panel. I, the customer, logged in to use my voucher - but it never deducted from my order - instead it just gave me the option to send to a friend. So - I sent it to a friend - myself, again - and again, the voucher deducted nothing from my total - it only gave me the option to send it off again. ?? I'd really hate to reinstall all this stuff - because I had a lot of custom coding I had to dance around. So - if anyone can point me in the right direction I would greatly appreciate it. SM
  14. Hi - I am having problems getting the discount coupon codes to work. I have installed the Credit Class and Gift Voucher module along with it. Everything works great (as far as I can tell) on the admin side, but on the customer side it never comes up for a code to be entered? Where is the user suppose to enter it? Am I missing something? Thanks ahead of time. SMurphy
×