Jump to content

The Munch

Members
  • Content count

    69
  • Joined

  • Last visited

1 Follower

Profile Information

  • Real Name
    Scott
  • Gender
    Male
  • Location
    Iowa, USA
  1. I've just loaded this onto my test site in osc 2.3.1. It does seem to be working correctly, except deleting the dummy account. I haven't fully tested a purchase yet, so I'll try to add comments about that when I've finished testing and ready to load it live. My site is heavily modified. For PWA, I installed the: Purchase Without Account v2.1 - FullPackage faaliyet 9 Mar 2009 create_account bug fix reflex-ocasion 8 Oct 2009 PWA typo fix double-happiness 1 Feb 2010 PWA 2.1 account delete fix JimbobobHacker 27 Sep 2010 PWA 2.1 account delete fix B JimbobobHacker 30 Sep 2010 If you did the manual install, editing all of your files, it's good to compare yours to the contribution's, as I found a couple things referenced by the fix on 27 Sep 2010 that were not in the instructions. I'll have to post more later...
  2. The Munch

    ### POINTS AND REWARDS MODULE V1.00 ###

    For anyone interested, I finally sat back down to figure out the Partial Points. I have it installed on my osc 2.3.1, but the module was based on 2.2. Here it is: Use Partial Points for Points & Rewards Module v1.0 (12.16.2011) Based from Points & Rewards Module v2.1beta (3 Feb 2011) For osC 2.2 or 2.3.1 Author: Scott "Munch" Bearden +++++++++++++++++++++++++++ in PhpMyAdmin: Step 1 ADD THE FOLLOWING SQL: INSERT INTO `configuration`(`configuration_id`, `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ('','Use Partial Points Fake','USE_POINTS_PART_FAKE','yes','Do you want to use Partial Points instead of All Points?','888010','18','now()','now()','','tep_cfg_select_option(array(yes, no))') +++++++++++++++++++++++++++ in catalog/checkout_confirmation.php: Step 2.0 Find: ##### Points/Rewards Module V2.1beta check for error BOF ####### if ((USE_POINTS_SYSTEM == 'true') && (USE_REDEEM_SYSTEM == 'true')) { if (isset($_POST['customer_shopping_points_spending']) && is_numeric($_POST['customer_shopping_points_spending'])) { $customer_shopping_points_spending = false; Insert This Before: ### BOF: Partial Points ### $_POST['customer_shopping_points_spending'] = ($_POST['customer_shopping_points_spending'] + $_POST['customer_shopping_points_spending_part']); $customer_shopping_points_spending = ($customer_shopping_points_spending + $customer_shopping_points_spending_part); ### EOF: Partial Points ### +++++++++++++++++++++++++++ Step 2.1 A few lines down find: // This if sentence should include check for amount of points on account compared to the transferred point from checkout_payment.php // Possible Hack Fix included if (tep_calc_shopping_pvalue($_POST['customer_shopping_points_spending']) < $order->info['total'] && !is_object($$payment) || (tep_get_shopping_points($customer_id) < $_POST['customer_shopping_points_spending'])) { $customer_shopping_points_spending = false; tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(REDEEM_SYSTEM_ERROR_POINTS_NOT), 'SSL')); ### IF THE COMBINATION OF THE CUSTOMER'S MAXIMUM POINTS ALLOWED PER ORDER CHECKBOX AND THE PARTIAL POINTS BOX EXCEEDS THE MAXIMUM POINTS ALLOWED PER ORDER, AND YOU WANT TO USE AN ERROR MESSAGE ... Insert This After: ### ### BOF: Partial Points ### } elseif ($_POST['customer_shopping_points_spending'] > POINTS_MAX_VALUE){ $customer_shopping_points_spending = false; tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(REDEEM_SYSTEM_ERROR_POINTS_OVER_MAX), 'SSL')); } ### EOF: Partial Points ### ### IF THE COMBINATION OF THE CUSTOMER'S MAXIMUM POINTS ALLOWED PER ORDER CHECKBOX AND THE PARTIAL POINTS BOX EXCEEDS THE MAXIMUM POINTS ALLOWED PER ORDER, AND YOU WANT THE POINTS TO DEFAULT TO THE MAXIMUM POINTS ALLOWED PER ORDER ... Insert This After: ### ### BOF: Partial Points ### } elseif ($_POST['customer_shopping_points_spending'] > POINTS_MAX_VALUE){ $customer_shopping_points_spending = POINTS_MAX_VALUE; } ### EOF: Partial Points ### +++++++++++++++++++++++++++ in catalog/checkout_payment.php: Step 3 Find: <!-- Points/Rewards Module V2.1beta Redeemption box bof --> <?php if ((USE_POINTS_SYSTEM == 'true') && (USE_REDEEM_SYSTEM == 'true')) { //echo points_selection(); $cart_show_total= $cart->show_total(); echo points_selection($cart_show_total); NOTE*** IF YOU USE THE CONTRIBUTION 'REMEMBER REFERRER', THIS LAST LINE READS: echo points_selection($cart_show_total);} Insert After: ### BOF: Partial Points ### if($cart_show_total > (POINTS_MIN_AMOUNT-.01)) { if(USE_POINTS_PART == 'yes'){ ?><center><?php echo TEXT_REDEEM_SYSTEM_SPENDING_PART . ' ' .tep_draw_input_field('customer_shopping_points_spending_part', $customer_shopping_points_spending_part , 'onBlur="validate(this)" onFocus="clearText(this)" maxlength="7" style="width:70px"')?></center><?php; } } ### EOF: Partial Points ### +++++++++++++++++++++++++++ IF YOU ARE USING AN ERROR MESSAGE IN Step 2.1, PROCEED WITH STEP 4. IF YOU ARE USING THE DEFAULT TO THE MAXIMUM POINTS ALLOWED IN Step 2.1, SKIP Step 4 AND YOU'RE DONE!! in catalog/includes/languages/english.php: Step 4 Find: define('REDEEM_SYSTEM_ERROR_POINTS_OVER', 'REDEEM POINTS ERROR ! Points value can not be over the total value. Please Re enter points'); Insert After: ### LINE ADD: Partial Points ### define('REDEEM_SYSTEM_ERROR_POINTS_OVER_MAX', 'REDEEM POINTS ERROR ! Points value can not be greater than $'.POINTS_MAX_VALUE.'.00'); +++++++++++++++++++++++++++ YOU ARE FINISHED!!
  3. The Munch

    ### POINTS AND REWARDS MODULE V1.00 ###

    So I've downloaded Points & Rewards v1.60 dated 3 Nov 2005 in my attempt to get the partial points, as that seems to be the last version with that active before it got traded for the All-Points checkbox. In checkout_payment.php, I have: if ((USE_POINTS_SYSTEM == 'true') && (USE_REDEEM_SYSTEM == 'true')) { //echo points_selection(); $cart_show_total= $cart->show_total(); echo points_selection($cart_show_total);} ?><center><?php echo TEXT_REDEEM_SYSTEM_SPENDING_PART . ' ' .tep_draw_input_field('customer_shopping_points_spending', $customer_shopping_points_spending , 'onBlur="validate(this)" onFocus="clearText(this)" maxlength="7" style="width:70px"')?></center><?php; if (tep_not_null(USE_REFERRAL_SYSTEM) && (tep_count_customer_orders() == 0) && KEEP_REFERRER_ID=='true' && tep_get_referral() == 0) { echo referral_input();} This does calculate in the checkout_confirmation.php (when a value is entered into the input field for the partial points), and it's correct. The problem is that the field has the same name as the original with the checkbox, so having both of them makes the first one effectively disabled, which in this case is the checkbox. The calculation is correct though, and when trying to enter a value above what the customer has, it rightfully pulls up the error message. So it does work wonderfully. I'm just wondering if someone knows how to make both the checkbox and the partial points field work, so that customers have the choice of spending all of their points or spending only part of them. Obviously it comes down to renaming the partial points field, but I'm needing a little help with that, and it's proving to be too much for the ole noggin tonight... Any help would be greatly appreciated... (Currently using osC 2.3.1 with Points & Rewards v2.1beta dated 3 Feb 2011)
  4. The Munch

    Country-State Selector

    It works great in osc 2.3.1
  5. The Munch

    [Contrib] Quick Price Updates for SPPC

    Fixed it - scrapped the old version, took the quick_updates.php from the "Quick Price Updates for SPPC v1.5" and put my mods for MSRP and Cost price info into that file, which is what I should've done to begin with, instead of trying to modify the old file. Now everything works beautifully!! Thanks for this great contribution - I really need it!! There's so much potential for what can be included in this - as long as you have the real estate for it!
  6. The Munch

    [Contrib] Quick Price Updates for SPPC

    If I use the Commercial Margin, the prices reflect in the preview, but when I hit Update, everything goes back to zero.
  7. The Munch

    [Contrib] Quick Price Updates for SPPC

    I can't get the prices to update in quick_updates.php. The regular Retail prices update just fine, but none of the other groups will save. This is what I have in the Case 'update': if($_POST['product_new_price']){ foreach($_POST['product_new_price'] as $id => $new_price) { if ($_POST['product_new_price'][$id] != $_POST['product_old_price'][$id] && $_POST['update_price'][$id] == 'yes') { $count_update++; $item_updated[$id] = 'updated'; /* ### LINE ADD: Quick Updates for SPPC-Separate Price Per Customer v1.3 ### */ if ($_POST['customers_group_id'] == '0') { mysql_query("UPDATE " . TABLE_PRODUCTS . " SET products_price=$new_price, products_last_modified=now() WHERE products_id=$id"); /* ### BOF: Quick Updates for SPPC-Separate Price Per Customer v1.3 ### */ } else { if ($_POST['cg_price_in_db'][$id] == 'yes') { if (trim($_POST['product_new_price'][$id]) == '') { mysql_query("DELETE FROM " . TABLE_PRODUCTS_GROUPS . " WHERE products_id='" . $id . "' AND customers_group_id = '" . $_POST['customers_group_id'] ."'"); } else { mysql_query("UPDATE " . TABLE_PRODUCTS_GROUPS . " SET customers_group_price='" . $new_price . "' WHERE products_id='" . $id . "' AND customers_group_id = '" . $_POST['customers_group_id'] ."'"); } } elseif ($_POST['cg_price_in_db'][$id] == 'no') { mysql_query("INSERT INTO " . TABLE_PRODUCTS_GROUPS . " SET products_id='" . $id . "', customers_group_price='" . $new_price . "', customers_group_id = '" . $_POST['customers_group_id'] ."'"); } } /* ### EOF: Quick Updates for SPPC-Separate Price Per Customer v1.3 ### */ } } } I had also tried the suggestion from Post 56, but it had no affect.
  8. The Munch

    ### POINTS AND REWARDS MODULE V1.00 ###

    I've seen this question on different pages in here, but haven't seen a solution. Apparently this contribution at one time was experimenting with giving the customer the option of using all of their points or just part of them by (I'm assuming) a box to enter how many of their points (or how much money) they want to use on the order to deduct from their current points. Does anyone know how to get that to work?
  9. The Munch

    ### POINTS AND REWARDS MODULE V1.00 ###

    The query: <?php $accumulated_points_query = tep_db_query("select c.customers_id, c.customers_shopping_points, pp.customer_id, sum(pp.points_pending) as points_redeemed from " . TABLE_CUSTOMERS . " c, " . TABLE_CUSTOMERS_POINTS_PENDING . " pp where points_status = 4 and c.customers_id = pp.customer_id and customers_id = '" . (int)$customer_id . "'"); $accumulated = tep_db_fetch_array($accumulated_points_query);?> And to display the data: Lifetime Accumulated Loyalty Points: <?php echo number_format($accumulated['customers_shopping_points'] - $accumulated['points_redeemed'],POINTS_DECIMAL_PLACES); ?> The query: $customers_query_raw = "select c.customers_id, c.customers_firstname, c.customers_lastname, c.customers_email_address, c.customers_points_expires, c.customers_shopping_points, pp.customer_id, (c.customers_shopping_points - sum(case when pp.points_status = 4 then pp.points_pending else 0 end)) as points_accumulated from " . TABLE_CUSTOMERS . " c, " . TABLE_CUSTOMERS_POINTS_PENDING . " pp where c.customers_id = pp.customer_id group by c.customers_firstname, c.customers_lastname order by $sort "; The output: <?php echo number_format($customers['points_accumulated'],POINTS_DECIMAL_PLACES); ?> Sorry, just after posting that last one I figured it out. duh! I have it in the account.php at the bottom and it works great. Thanks!! I'm also trying to get the same thing going with a membership level program based on their lifetime points, which for me is based on referrals, not really how much they spend. But it's the same principle. If you make any headway on this, please post it here..
  10. The Munch

    ### POINTS AND REWARDS MODULE V1.00 ###

    Where do you have these installed in your files?
  11. The Munch

    ### POINTS AND REWARDS MODULE V1.00 ###

    I'll just say that if you take the time to do it, it can be installed osc 2.3.1. I have it in mine and love it, although I do have a couple issues that I need to resolve. The first one off-hand is when redeeming points, if subtotal is less than points, it gives customer credit for negative amount. 7.00 - 15.00 Points = -8.00 Credit. This lets them not pay for shipping or tax basically. I'm thinking I read about this some time ago in this forum, so I'll have to keep searching unless someone knows off-hand how to resolve this...
  12. The Munch

    osc 2.3.1 - Member Type Control v1.1 (MOD)

    Sorry - but I figured it out, at least for me. The instructions say, in a number of places... (I changed the names to Diamond, etc. from Iron, etc.) if ($account['customers_type'] == 'D') { $mem_type=ENTRY_CUSTOMERS_TYPE_DIAMOND; } else if($account['customers_type'] == 'P') { $mem_type=ENTRY_CUSTOMERS_TYPE_PLATINUM; OR.... $type_array = array(array('id' => 'D', 'text' => ENTRY_CUSTOMERS_TYPE_DIAMOND), array('id' => 'P', 'text' => ENTRY_CUSTOMERS_TYPE_PLATINUM), array('id' => 'G', 'text' => ENTRY_CUSTOMERS_TYPE_GOLD), array('id' => 'S', 'text' => ENTRY_CUSTOMERS_TYPE_SILVER), array('id' => 'N', 'text' => ENTRY_CUSTOMERS_TYPE_NONE)); etc......... but it SHOULD say... if ($account['customers_type'] == '5') { $mem_type=ENTRY_CUSTOMERS_TYPE_DIAMOND; } else if($account['customers_type'] == '4') { $mem_type=ENTRY_CUSTOMERS_TYPE_PLATINUM; AND.... $type_array = array(array('id' => '5', 'text' => ENTRY_CUSTOMERS_TYPE_DIAMOND), array('id' => '4', 'text' => ENTRY_CUSTOMERS_TYPE_PLATINUM), array('id' => '3', 'text' => ENTRY_CUSTOMERS_TYPE_GOLD), array('id' => '2', 'text' => ENTRY_CUSTOMERS_TYPE_SILVER), array('id' => '0', 'text' => ENTRY_CUSTOMERS_TYPE_NONE)); etc..................... I replaced the letters D,P,G,S,N with 5,4,3,2,0. And I think there were a couple places where there was only one "=" where it should be "==".
  13. I've installed the Member Type Control v1.1, but I can't get the admin/customers.php to write everything to the database. There are two simple fields, customers_type (dropdown menu) and customers_membership_no (text box). the customers_membership_no does save and write to the db, but I can't get customers_type to save and write to the db. In the customer's account_edit.php, it always reads: "Membership Type: Basic Member" Can anyone assist with this?
  14. The Munch

    AJAX Attribute Manager support

    Where is the "+" showing up? It sounds like you're on the edit or new products page, using the attribute manager there. There's the +/- dropdown, then a price box. This is only if the attribute adds to or reduces from the actual price of the product. Then you would +$5.00 or -$5.00 from the Products Price (net) above. If that price was $20.00, then the end price would be either $25.00 or $15.00, respectively. This box is not to put the actual price of the product into. If I'm wrong about my assumption, I apologize.
  15. The Munch

    [Contribution] Admin Notes

    I kept wanting to have the category of the note displayed on the main page of the Admin Notes, so I did this simple mod - if anyone else has wanted this, I hope it helps. in admin/includes/languages/english/admin_notes.php, just for conformity, make sure these are included: define('TABLE_HEADING_CATEGORY', 'Category'); define('TEXT_CATEGORY', 'Category'); Then in admin/admin_notes.php after (about Line 234): <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_NAME; ?></td> Add: <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_CATEGORY; ?></td> Further down (about Line 305 now), after: <td class="dataTableContent"><?php echo '<a name="' . $admin_quer['admin_note'] . '" title="' . $admin_quer['category'] . '">' . $admin_quer['admin_note']; ?></a></td> Add: <td class="dataTableContent"><?php echo $admin_quer['category']; ?></td>
×