Jump to content

The Munch

Members
  • Content count

    69
  • Joined

  • Last visited

Everything posted by The Munch

  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>
  16. The Munch

    Country-State Selector

    (FOR AJAX v1.5.5 - using osc 2.3.1)... I don't know if this holds true for everyone, but I just fixed my problem (see previous post #1139). The instructions say : Just before this is the require for template_top (for osc 2.3.1): require(DIR_WS_INCLUDES . 'template_top.php'); Just above this you have to enter your scripts for the page, so I had to add the function refresh_form here: <!-- ## BOF: Country-State Selector v1.5.5 ## --> <script type="text/javascript"><!-- function refresh_form(form_name) { form_name.refresh.value = 'true'; form_name.submit(); return true; } //--></script> <!-- ## EOF: Country-State Selector v1.5.5 ## --><?php require(DIR_WS_INCLUDES . 'template_top.php'); So you get... ?><!-- ## BOF: Country-State Selector v1.5.5 ## --> <script type="text/javascript"><!-- function refresh_form(form_name) { form_name.refresh.value = 'true'; form_name.submit(); return true; } //--></script> <!-- ## EOF: Country-State Selector v1.5.5 ## --><?php require(DIR_WS_INCLUDES . 'template_top.php'); if (!isset($HTTP_GET_VARS['delete'])) { include('includes/form_check.js.php'); /* ## LINE ADD: Country-State Selector v1.5.5 ## */ require(DIR_WS_INCLUDES . 'ajax.js.php'); } ?> I'm not sure why I had to do this yet, as the other files didn't need it (I don't think). I haven't completely checked through this answer to this yet, but it certainly made that final page work for me! If someone knows the answer to this, I would love to be enlightened...
  17. The Munch

    Country-State Selector

    I've seen this question on here before, but haven't seen an answer for it... Using the AJAX v1.5.5 on osc 2.3.1. All seems to work correctly except one page - /address_book_process.php. The other pages all work correctly. The process page doesn't load at all - meaning I can select a country, but the states don't repopulate. My default country is 223 USA, so all I get are states on that page. All other pages work fine. I've compared to my heart's content, but can't get this figured out yet.
  18. The Munch

    Seperate Pricing Per Customer v3.5

    I have a heavily modified product_info.php, but a little over half way down... a bunch of stuff got moved to /includes/classes/pad_base.php for QT Pro. /* ### LINE EDIT: Separate Pricing Per Customer v4.2.2 - Hide attributes from customer groups - ADD: and find_in_set()=0 ### */ $products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' and find_in_set('".$customer_group_id."', attributes_hide_from_groups) = 0 "); $products_attributes = tep_db_fetch_array($products_attributes_query); if ($products_attributes['total'] > 0) { //++++ QT Pro: Begin Changed code /* EVERYTHING IN HERE WAS PUT INTO /includes/classes/pad_base.php, LINES 287-313 FOR QT Pro */ $products_id=(preg_match("/^\d{1,10}(\{\d{1,10}\}\d{1,10})*$/",$HTTP_GET_VARS['products_id']) ? $HTTP_GET_VARS['products_id'] : (int)$HTTP_GET_VARS['products_id']); require(DIR_WS_CLASSES . 'pad_' . PRODINFO_ATTRIBUTE_PLUGIN . '.php'); $class = 'pad_' . PRODINFO_ATTRIBUTE_PLUGIN; $pad = new $class($products_id); echo $pad->draw(); } //Display a table with which attribute combinations is in stock to the customer? if(PRODINFO_ATTRIBUTE_DISPLAY_STOCK_LIST == 'True'): require(DIR_WS_MODULES . "qtpro_stock_table.php"); endif; //++++ QT Pro: End Changed Code
  19. The Munch

    [Contrib] Quick Price Updates for SPPC

    After installing the QU 2.9.2 for osc 2.3.1, the QU for SPPC really only needed a couple of changes: admin/includes/languages/english.php: (Was: BOX_CATALOG_QUICK_UPDATES) /* ## LINE ADD: Quick Updates 292 for osc 2.3.1 ## */ define('BOX_CATALOG_CATEGORIES_QUICK_UPDATES', 'Quick Updates'); admin/includes/boxes/catalog.php: (This is how it gets written in 2.3.1) /* ### BOF: Quick Updates 292 for osc 2.3.1 ### */ array( 'code' => FILENAME_QUICK_UPDATES, 'title' => BOX_CATALOG_CATEGORIES_QUICK_UPDATES, 'link' => tep_href_link(FILENAME_QUICK_UPDATES,'') ), /* ### EOF: Quick Updates 292 for osc 2.3.1 ### */
  20. The Munch

    Products Attributes Sort v1.0

    newtech - it appears as though you needed to redo the require(..application_top.php) in admin/products_attributes.php. gearheadgary - I get... 1054 - Unknown column 'pa.attributes_sort' in 'order clause' ...so I went back to original with SPPC. I get no errors with that, but I haven't really tested much as I just installed it...
  21. The Munch

    AJAX Attribute Manager support

    Well, I guess nevermind... I had v2.8.9.2. I reinstalled the folder for attributeManager for v2.8.9.3 and it all works fine. I'm sure reloading the v2.8.9.2 would've worked too. Somehow I must have gotten a file missing or awry.
  22. The Munch

    AJAX Attribute Manager support

    This contribution had been working great until I started using it again right now. When I'm editing a product, I select the first option box - the default is the first one in the list - when I click on another option in the list, it quickly shows that it was selected, then it reverts back to the default option. Any thoughts on this? As far as I can see, I'm not able to add any attributes unless I first use the top option - and no Values for the Option show up.
  23. The Munch

    OSC 2.3 order editor?

    I use that for any page that will be displayed on the regular site or the admin portion. It works the same. It's basically a small portion that converts those items from 2.2 to display properly in 2.3.1. The only discrepancy I've noticed is that they discuss how to do it if there's any <script> within the portion that you would be deleting to make the template_top requirement, by using a $head_tag.='...'."\n";... That has actually screwed things up for me, so I still keep whatever is included between any <script>..</script> even if there's multiple scripts - and put the require(..template_top..) below the scripts. And that works great for me. <script>.....</script> <script>.....</script> <?php require(DIR_WS_INCLUDES . 'template_top.php'); ?>
  24. The Munch

    [Contrib] Quick Price Updates for SPPC

    I finally got this installed into osc 2.3.1 (Quick Updates 2.9.2 for osc 2.3.1, then Quick Updates for SPPC v1.5 for osc 2.2). -- although it seems that the v1.5 is actually v1.4 in the package... The original admin/quick_updates.php that came with the package did have to be tweaked a bit. There are four instances of [$x] that need to be deleted in order for the pricing to display correctly when switching between groups. As there is no documentation for converting the original file, especially for a heavily modified site, this did take a bit of time to decipher this one file to make all the changes for SPPC. Since I have the MSRP contribution, I added the MSRP and a Cost (COGS) field to Quick Updates and they work great. I love the Quick Updates and SPPC!! It's so nice to have everything in one editable list!
  25. The Munch

    OSC 2.3 order editor?

    I do this whenever converting 2.2 contributions into 2.3.1: http://forums.oscommerce.com/topic/368538-guide-to-converting-addons-from-22x-to-23x/ This takes care of the top and left side, and the bottom.
×