If this is your first visit, check our documentation. To post, register or login.
Forums / Addon Payment Modules / Store credit and reward point module

Store credit and reward point module

Started by yellow1912 on 4 Mar 2008, 2:23 PM · Views: 71,311

Results 121 to 140 of 171
17 Jan 2010, 4:20 AM
#121
greenhat avatar

greenhat

Zen Follower

Join Date:
May 2007
Posts:
108
Plugin Contributions:
0

Store credit and reward point module

This is a great plugin, but there was a one small issue for me - it would give reward points to all orders with status id >= than the one specified. Unfortunately, this is not practical in my shopping cart as I have scattered statuses for which I need to give reward points. I believe this is the case for most carts with default setup (Cancel status = 5 , which is less than Shipped status = 3 , etc. )
I figured out a fix, so if anyone else is interested, you can do the same:

  1. Replace function "_check_order_status" in store_credit.php file with:
    function _check_order_status($orders_id) {
        global $db;
        $order_query = "SELECT orders_status FROM " . TABLE_ORDERS . "
                                        WHERE orders_id = " . $orders_id . "
                                        LIMIT 1";
        $order_status = $db->Execute($order_query);

        $order_status_rewarded = explode(",", MODULE_ORDER_TOTAL_SC_ORDER_REWARD_STATUS);

        if (in_array($order_status->fields['orders_status'], $order_status_rewarded)) {
            return true;
        } else {
            return false;
        } 
        
    }
```2. Run this SQL on your DB:

UPDATE zen_configuration
SET use_function=NULL, set_function=NULL
WHERE configuration_title = "Required Order Status"



good luck
17 Jan 2010, 3:10 PM
#122
greenhat avatar

greenhat

Zen Follower

Join Date:
May 2007
Posts:
108
Plugin Contributions:
0

Re: Store credit and reward point module

Quick correction for the above. This is a more proper way to do it.

Instead of 2nd step, do the following:

  • in /includes/modules/order_total/ot_sc.php file, replace
//$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('Required Order Status', 'MODULE_ORDER_TOTAL_SC_ORDER_REWARD_STATUS', '2', 'What order status is required to receive reward points?', '6', '4', 'zen_cfg_pull_down_order_statuses(', 'zen_get_order_status_name', now())");

by

        $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Required Order Status', 'MODULE_ORDER_TOTAL_SC_ORDER_REWARD_STATUS', '2', 'What order status is required to receive reward points?', '6', '4', now())");
  • under Admin -> Modules -> Order Total -> Store Credit -> click "Remove" followed by "Install"
18 Jan 2010, 6:02 AM
#123
notageek avatar

notageek

Zen Follower

Join Date:
Mar 2009
Posts:
418
Plugin Contributions:
0

Re: Store credit and reward point module

First, I apologize that I am really out of my depth with this module. I believe I installed it per the instructions.

In Admin->Order Total, I had a conflict between my gift voucher GV sort order of 840 which was also the default sort order for the store credit module, so I put the store credit sort order at 850, thinking if the gift voucher is used the store credit would not be used--a wild guess. I selected the default where I could, and true to show the store credit box.

I installed the .sql patch by cut and paste, as per instructions, instead of uploading; and when I installed the 3.x .sql patch, per the instructions, the program feedback said it was already installed.

I went to my store to see the changes, and now the print is large in my store and the following message appears on top of my "Authorize Net is in test mode" message:

'); define('TEXT_SC_CRON_ORDERS_UPDATED', '%s order(s) updated.'); define('TEXT_SC_CRON_PRODUCTS_UPDATED', '%s product(s) updated.'); define('TEXT_SC_PRODUCTS_INFO', 'Earn up to %s in rewards points when you purchase this product!'); /* End Store Credit Order Total Module */ ?>

Also, I placed the chron file in my www directory where the next step up are the Admin and Includes directories, but didn't actually understand where it was supposed to go, so that was a guess. Then I read online about cron jobs and it refers to Unix and Linux which I do not have; I am working on a test WAMP server in a Windows environment. It may be that my online web host uses Unix or Linux, though. So I really do not know where to start in using cron, or if it will work on my WAMP server. Cron is totally new to me, and I do not know what it means to "run" it.

I really do not know whether I should be asking for instructions here as maybe I am too ill-prepared to really figure out a mod with instructions that seem to be directed to more knowledgeable persons. Shall I uninstall or is there hope for me getting this running? I am seeing in the instructions and the forum that people are figuring things out but not stating what they figured out, and sometimes only responding to parts of questions.

Is there anything basic to read on how to proceed and how to really work with this module? Does anyone know what I might have done to alter my site as stated above? (I do have a backup.)

Thanks.

19 Jan 2010, 2:06 PM
#124
notageek avatar

notageek

Zen Follower

Join Date:
Mar 2009
Posts:
418
Plugin Contributions:
0

Re: Store credit and reward point module

Still working on getting rid of the stray messages that came up when I installed this module:

'); define('TEXT_SC_CRON_ORDERS_UPDATED', '%s order(s) updated.'); define('TEXT_SC_CRON_PRODUCTS_UPDATED', '%s product(s) updated.'); define('TEXT_SC_PRODUCTS_INFO', 'Earn up to %s in rewards points when you purchase this product!'); /* End Store Credit Order Total Module */ ?>

in the admin screen:
BOX_CUSTOMERS_CREDIT, 'link' => zen_href_link(FILENAME_STORE_CREDIT, '', 'NONSSL')); ?>

I have tried to wipe the above error messages out by performing a backup of the root database and the store, and then 2 entire WAMP backup restorals from different backup dates, and although my other changes disappeared with the restoral of earlier versions of my website and local test WAMP server, the above two error messages have persisted, and the Store Credit Module also persisted.

I have cleared my browser's cache and the Zen Cart cache, and have used the developer's tool to compare my files with the original download files with Winmerge, and the compared files are identical.

Where would I look for the Admin headers to remove the BOX_CUSTOMERS_CREDIT....that appears there?

Where would I look for text appearing on my home page above the Authorize Net is in testing mode message?

Are these messages more likely to be in php files or in the MySQL database?

Thanks.

23 Jan 2010, 3:04 AM
#125
greenhat avatar

greenhat

Zen Follower

Join Date:
May 2007
Posts:
108
Plugin Contributions:
0

Re: Store credit and reward point module

This probably has nothing to do with installing this module, but to get authorize.net out of Test mode:
ADMIN -> Modules -> Payment -> Authorize.net -> Edit -> Transaction Mode -> Production.

Your other errors seem very odd.. i suggest to completely uninstall the module and reinstall it ..

you can also check this file:
/store/includes/languages/english/extra_definitions/store_credit_definitions.php to make sure everything looks right there. it looks as if you went to modify it and accidentally pressed enter before " '); " on this line:
define('TEXT_SC_CRON_COMPLETED', 'Completed in %s seconds.<br>');

good luck

notageek:

Still working on getting rid of the stray messages that came up when I installed this module:

'); define('TEXT_SC_CRON_ORDERS_UPDATED', '%s order(s) updated.'); define('TEXT_SC_CRON_PRODUCTS_UPDATED', '%s product(s) updated.'); define('TEXT_SC_PRODUCTS_INFO', 'Earn up to %s in rewards points when you purchase this product!'); /* End Store Credit Order Total Module */ ?>

in the admin screen:
BOX_CUSTOMERS_CREDIT, 'link' => zen_href_link(FILENAME_STORE_CREDIT, '', 'NONSSL')); ?>

I have tried to wipe the above error messages out by performing a backup of the root database and the store, and then 2 entire WAMP backup restorals from different backup dates, and although my other changes disappeared with the restoral of earlier versions of my website and local test WAMP server, the above two error messages have persisted, and the Store Credit Module also persisted.

I have cleared my browser's cache and the Zen Cart cache, and have used the developer's tool to compare my files with the original download files with Winmerge, and the compared files are identical.

Where would I look for the Admin headers to remove the BOX_CUSTOMERS_CREDIT....that appears there?

Where would I look for text appearing on my home page above the Authorize Net is in testing mode message?

Are these messages more likely to be in php files or in the MySQL database?

Thanks.

23 Jan 2010, 4:41 AM
#127
notageek avatar

notageek

Zen Follower

Join Date:
Mar 2009
Posts:
418
Plugin Contributions:
0

Re: Store credit and reward point module

Greenhat,

I really appreciate your comments. It was getting very lonely talking to myself.

You will be glad to hear that I just resolved the stray message problem.

On Numinix's site on page 7 relating to the Store Credit Module, spikescot2005 had posted the problem and I had felt slomojojo's response was a sort of "jerryrig" solution, and completely missed his clarification #107.

Slomojojo's solution reveals that there is more than one type of tag in PHP: apparently Store Credit Module uses a short opening php tag: <?.

Slomojojo stated he went into each of the files (there are many) and searched for <? and replaced it with <?php.

When I read his clarification today that (thank you so much, slomojojo), the same thing is accomplished on a test WAMP server by simply opening PHP settings and enabling "short open tag" if it's off, it finally made sense to me as being a PHP tag problem.

That did indeed fix the error everywhere AT ONCE.

I am so worn out from spinning my wheels for days (despite all the extraneous learning I accomplished) the fix seems anticlimatic, but I am so greatly encouraged by your having taken the time to try to shed some light on my problem.

23 Jan 2010, 2:56 PM
#128
greenhat avatar

greenhat

Zen Follower

Join Date:
May 2007
Posts:
108
Plugin Contributions:
0

Re: Store credit and reward point module

no problem.. i can see that it wasnt really helpful..
great that you figured it out and posted the solution here.. i think i ran into this problem a long time ago also . a lot of people probably do .

31 Jan 2010, 3:13 PM
#129
pokerdis avatar

pokerdis

New Zenner

Join Date:
Apr 2007
Posts:
20
Plugin Contributions:
0

Re: Store credit and reward point module

Hello,

I installed without issues, activated sidebox. Issued my test account a credit, credit showed fine in sidebox. My issue is that when trying to use the credit and the total in the cart (with shipping and tax) is a lower dollar amount it still asks and requires that I choose a a payment method even though the store credit is greater than the total purchase.

I do have the box checked that says "do you want to apply your store credit"

Any ideas?

Thanks,
Tom

3 Feb 2010, 10:20 PM
#130
2004g35 avatar

2004g35

Zen Follower

Join Date:
Jan 2005
Location:
Winter Haven, FL
Posts:
156
Plugin Contributions:
0

Re: Store credit and reward point module

is 3.05 the latest version? I saw reference somewhere to a 3.1 version. Thanks

7 Feb 2010, 10:01 AM
#131
silkhouse avatar

silkhouse

New Zenner

Join Date:
Jun 2008
Posts:
17
Plugin Contributions:
0

Re: Store credit and reward point module

does this module work with Paypal IPN? please note that the old mode” Reward Point Full Sui” don’t work with it. I attached what the author said here:


The official status of this issue is: The mod works with PayPal- just not with PayPal IPN. Hopefully this will change when ZenCart 2.0 is released.

but the PayPal IPN mod does this without calling any of the ZenCart notifiers. And as the RP award mod is attached to one of these notifiers, PayPal IPN does not let the RP mod know that there are points which need to be stored. Hence the problem. Contrast to this Google Checkout which runs the same way as PayPal IPN under ZenCart- It makes the correct calls and points are stored.
.

10 Feb 2010, 4:19 AM
#132
silkhouse avatar

silkhouse

New Zenner

Join Date:
Jun 2008
Posts:
17
Plugin Contributions:
0

Re: Store credit and reward point module

We want customers to be able to view their current rewards credits and pending credits by checking their own account. I followed the following and added the code to the end of includes/templates/YOUR_TEMPLATE/templates/ tpl_account_history_info_default.php

But it showed nothing about credits. I guess I need more codes. I am willing to pay for it. Please contact me dancingever###################### thanks.

++++++++++++++++++++++++++++++++
• Display a customer's current store credits/rewards
In includes/templates/YOUR_TEMPLATE/templates/[select_a_template_file_of_your_choice].php, add the following to an appropriate location in your template file:

<!-- bof Store Credit Display --> <?php if (MODULE_ORDER_TOTAL_SC_ORDER_PRODUCT_POINTS == 'true') { require_once(DIR_WS_CLASSES . 'store_credit.php'); $store_credit = new storeCredit(); echo $store_credit->retrieve_customer_credit($_SESSION['customer_id']); } ?> <!-- eof Store Credit Display -->
5 Mar 2010, 5:23 PM
#133
lauriesscraps avatar

lauriesscraps

Zen Follower

Join Date:
Sep 2009
Posts:
255
Plugin Contributions:
0

Re: Store credit and reward point module

I think I am also needing someone to install this for me. I am willing to pay. Can someone please contact me at lauriesscraps(at)live(dot)com? Thank you!

5 Mar 2010, 5:43 PM
#134
lauriesscraps avatar

lauriesscraps

Zen Follower

Join Date:
Sep 2009
Posts:
255
Plugin Contributions:
0

Re: Store credit and reward point module

I think I got it all installed with just a few things that I think I can fix with help..... so I won't need someone to install.

numinix:

Apologies, the documentation has been corrected.

I am having the same problems. All the documentation says is this:

Find (around line 70)
if ($credit_covers) {

Replace With
// BEGIN REWARDS POINTS

    // if credit does not cover order total or isn't   selected
      if ($_SESSION['credit_covers'] != true) {
      // check that a gift   voucher isn't being used that is larger than the order
        if ($_SESSION['cot_gv'] < $order->info['total']) {
          $credit_covers =   false;
        }
      }
    // END REWARDS POINTS

    if ($credit_covers) {

So does this mean that I add all this right above if ($credit_covers)? If I do that my check out page does not show up. Please advise. Thank you.

18 Apr 2010, 5:04 PM
#135
fiji avatar

fiji

New Zenner

Join Date:
Oct 2007
Posts:
42
Plugin Contributions:
0

Re: Store credit and reward point module

Hi, yellow1912

Thank you for the mod, I tested and running well.
Only one Bug I found is:

I set a 5% discount group in the admin.
Add a member to this group.
Issue $500 store credit to this member.
This member place $200 order and check out.

Here is a mistake:
Sub-Total: $200
Group Discount: -$10
Store Credit: -$200
Total : $-10

The store credit doesn't subtract the Group Discount before apply. Store credit direct apply the Sub-Total, omit the Group Discount.
If finish checkout, there is only $300 store credit in member's account.
The correct store credit should be $310, I owe this member $10.
and the invoice displays Total : $-10.

This mistake only happen if the group member has enough store credit.
and only happen on the group member.

Maybe the mod omit the group pricing.

Would you please have a look?
Thank you.

18 Apr 2010, 5:31 PM
#136
fiji avatar

fiji

New Zenner

Join Date:
Oct 2007
Posts:
42
Plugin Contributions:
0

Re: Store credit and reward point module

  1. I found another bug:

sometimes, after member applied the store credit to check out, I found in the admin-store credit, Credit Balance-display 0, but when click the member's name - edit, it displays " 7.62939e-07 ", it's strange number.

Do you know why?
thanks

20 Jun 2010, 8:59 PM
#137
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

Re: Store credit and reward point module

I have a question. Under admin/customers/store_credit when I click on a customer to give them a store credit it want let me. It shows this kind of stuff. Can anybody help me. Thank You

Customers Balance

customers_firstname); ?> customers_lastname); ?>

Store Credit Balance amount==null || is_nan($cInfo->amount)) $cInfo->amount = 0; $amount = number_format($cInfo->amount, 2); $str_balance = "".($amount); echo zen_draw_input_field('customers_balance', $str_balance); ?>

Is your site Upgraded to the current version 1.5.4 Yet?
zencart-upgrades-website-installation

24 Jun 2010, 7:17 AM
#138
dealbyethan_com avatar

dealbyethan_com

Totally Zenned

Join Date:
Dec 2005
Location:
Perth, Western Australia, Australia
Posts:
782
Plugin Contributions:
0

Re: Store credit and reward point module

Hi,

Installed the latest version but when I go to Customers > Store Credit, I am getting the following error. Please help.
1054 Unknown column 'pending' in 'field list'
in:
[SELECT customers_id, pending FROM zen_sc_customers WHERE customers_id = 3 LIMIT 1]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

**The Team Behind DealByEthan.com | **Curating unique finds for a discerning community. Committed to a seamless and inspiring shopping experience. *Connect with us: *https://linktr.ee/dealbyethan

16 Jul 2010, 6:14 AM
#139
silkhouse avatar

silkhouse

New Zenner

Join Date:
Jun 2008
Posts:
17
Plugin Contributions:
0

Re: Store credit and reward point module

when a customer check out with paypal IPN (not paypal express checkout), will he get store credit automatically? Does anyone has ever make this module work with paypal IPN before?

16 Jul 2010, 3:45 PM
#140
paul3648 avatar

paul3648

Zen Follower

Join Date:
Mar 2007
Location:
Taiwan
Posts:
239
Plugin Contributions:
0

Re: Store credit and reward point module

silkhouse:

when a customer check out with paypal IPN (not paypal express checkout), will he get store credit automatically? Does anyone has ever make this module work with paypal IPN before?

I use it with PayPal IPN without any problems. The customer has the choice of using his available credit before the total is finalized, so the store credit module should be compatible with any payment system.