Jump to content
deep-silver

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

Recommended Posts

The only way this works is you specify how much the points are worth and then when the user checks out they will have the option to use points if they have it available. If they choose to use points they can only use max points that are available. Another words they cannot specifiy how many points they want to use. If I understand correctly they used to be able to with an older version of this addon but not with the version you are using. Although you may be able to use some of the old code from the older versions and set up what you want to do.

 

 

Yes, I think you can only specify to use ALL or NONE -

 

Does anybody know where to find the old code that enables users to type in how many they want to use?

 

ALSO

Can you guys confirm whether you installed the Phocea update or not (see previous page).

 

I'm still getting the problem of Zero transaction going through to Paypal. I tried Phocea's fix, but it didn't work.

 

RSVP!!

Thanks

Edited by ssnb

Share this post


Link to post
Share on other sites

hello everyone. I was just looking at the HUGE list of files that were uploaded to the contribution, and was wondering which package is the most recent FULL package??

 

The current mods that i have for the checkout process are the

Donate the Change

CCGV

PayPal Direct Payments

 

I would like to know the most about this mod as possible, as I assume its probably a pretty complicated install.


A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Share this post


Link to post
Share on other sites

Hi Lindsay

 

If you get the french 2d version you should be ok. that has all of the english files in there as well and it is pretty straight forward to install

 

hello everyone. I was just looking at the HUGE list of files that were uploaded to the contribution, and was wondering which package is the most recent FULL package??

 

The current mods that i have for the checkout process are the

Donate the Change

CCGV

PayPal Direct Payments

 

I would like to know the most about this mod as possible, as I assume its probably a pretty complicated install.

Share this post


Link to post
Share on other sites

i just dont get it.. why dont people put FULL PACKAGE in the description or title.. its just soo frustrating and confusing to me... Thanks for giving me an idea on where to start.


A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Share this post


Link to post
Share on other sites
i just dont get it.. why dont people put FULL PACKAGE in the description or title.. its just soo frustrating and confusing to me... Thanks for giving me an idea on where to start.

 

 

Hi Lindsay

 

I am currently working on a new instructions file - would you be willing to give it a test run for me??

 

If so - you can download it from here:

http://www.boomclothing.com/store2/p&r..._v1_1282008.doc

 

and tell me what you think....

Let me know

Cheers

Sol

Share this post


Link to post
Share on other sites

i will happily test it for you.. can you put it in a TEXT EDITOR instead?


A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Share this post


Link to post
Share on other sites
i will happily test it for you.. can you put it in a TEXT EDITOR instead?

 

No, I have purposely written it in MSWord so that it is easier to navigate.

 

I can upoad it as a zip if you wish?

Let me know.

Regards

Sol

Share this post


Link to post
Share on other sites

Now I have this working perfectly, the only problem is...

 

I get stuck in a payment trap at the end when the points are enough to cover the whole amount.... it just keeps saying "select payment method" and won't let me use all the points to cocer the zero cost.

 

Anyone?

Share this post


Link to post
Share on other sites
Now I have this working perfectly, the only problem is...

 

I get stuck in a payment trap at the end when the points are enough to cover the whole amount.... it just keeps saying "select payment method" and won't let me use all the points to cocer the zero cost.

 

Anyone?

 

 

Out of interest here is my checkout confirmation.php

 

 
##### Points/Rewards Module V2.00 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'])&&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'));
   } else {
   if (!tep_session_is_registered('customer_shopping_points_spending'))
     tep_session_register('customer_shopping_points_spending');
   }
 }
 if (isset($HTTP_POST_VARS['customer_referred']) && tep_not_null($HTTP_POST_VARS['customer_referred'])) {
   $valid_referral_query = tep_db_query("SELECT customers_id FROM " . TABLE_CUSTOMERS . " WHERE customers_email_address = '" . $HTTP_POST_VARS['customer_referred'] . "'");
$valid_referral = tep_db_fetch_array($valid_referral_query);
   if (!tep_db_num_rows($valid_referral_query)) {
     tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(REFERRAL_ERROR_NOT_FOUND), 'SSL'));
   }
   if ($HTTP_POST_VARS['customer_referred'] == $order->customer['email_address']) {
     tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(REFERRAL_ERROR_SELF), 'SSL'));
   } else {
     $customer_referral = $valid_referral['customers_id'];
     if (!tep_session_is_registered('customer_referral')) tep_session_register('customer_referral');
   }
 }
// 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 V2.00 EOF #################*/

Share this post


Link to post
Share on other sites

How can I avoid the shipping cost to be redeemed ?

 

Subtotal 40$

shipping 8$

points : 48$

total : 0$

 

And i would like :

 

Subtotal 40$

shipping 8$

points : 40$

total : 8$

 

The customer would have to pay each time for the shipping.

I'd like the shipping not to be redeemed.

 

I already added theses changes to have the option in the admin on file ot_redemptions.php :

 

   function keys() {
     return array('MODULE_ORDER_TOTAL_REDEMPTIONS_SORT_ORDER','MODULE_ORDER_TOTAL_REDEMPTIONS_SHIPPING');
   }

   function install() {
     tep_db_query("INSERT INTO " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Sort Order', 'MODULE_ORDER_TOTAL_REDEMPTIONS_SORT_ORDER', '4', 'Sort order of display.', '6', '2', now())");
  tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function ,date_added) values ('Include Shipping', 'MODULE_ORDER_TOTAL_REDEMPTIONS_SHIPPING', 'true', 'Include Shipping in calculation', '6', '3', 'tep_cfg_select_option(array(\'true\', \'false\'), ', now())");
}

and added this line on the same file :

$this->include_shipping = MODULE_ORDER_TOTAL_REDEMPTIONS_SHIPPING;

 

But when I try to act like in another module that doesnt allow reductions on shipping, i dont get the same results :

 

    if ($this->include_shipping == 'false') $order->info['total']=$order->info['total']-$order->info['shipping_cost'];

Share this post


Link to post
Share on other sites

To Avoid the shipping cost being redeemed with points you need to set up your order of your modules

Admin Area---->Modules--->Order Total

 

Here is the order below that I have mine. Keep in mind that there are no shipping costs on my site

 

Modules Sort Order

 

Points Redeemptions 4

Shipping 2

Sub-Total 1

Tax 3

Total 5

 

I would think that your order would be different. Just set the order that you want the points to be redeemed. For example your Points Redemtion should come before the shipping module.

 

Hope that helps!

 

How can I avoid the shipping cost to be redeemed ?

 

Subtotal 40$

shipping 8$

points : 48$

total : 0$

 

And i would like :

 

Subtotal 40$

shipping 8$

points : 40$

total : 8$

 

The customer would have to pay each time for the shipping.

I'd like the shipping not to be redeemed.

 

I already added theses changes to have the option in the admin on file ot_redemptions.php :

 

   function keys() {
     return array('MODULE_ORDER_TOTAL_REDEMPTIONS_SORT_ORDER','MODULE_ORDER_TOTAL_REDEMPTIONS_SHIPPING');
   }

   function install() {
     tep_db_query("INSERT INTO " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Sort Order', 'MODULE_ORDER_TOTAL_REDEMPTIONS_SORT_ORDER', '4', 'Sort order of display.', '6', '2', now())");
  tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function ,date_added) values ('Include Shipping', 'MODULE_ORDER_TOTAL_REDEMPTIONS_SHIPPING', 'true', 'Include Shipping in calculation', '6', '3', 'tep_cfg_select_option(array(\'true\', \'false\'), ', now())");
}

and added this line on the same file :

$this->include_shipping = MODULE_ORDER_TOTAL_REDEMPTIONS_SHIPPING;

 

But when I try to act like in another module that doesnt allow reductions on shipping, i dont get the same results :

 

    if ($this->include_shipping == 'false') $order->info['total']=$order->info['total']-$order->info['shipping_cost'];

Share this post


Link to post
Share on other sites

Hi,

 

I was wondering if anyone knew if this was compatible with "PayPal Website Payments Pro (US/UK) by dynamoeffects v1.0.2" as from what i can see, i've only ever seen paypal IPN mentioned.

 

Thanks,

Mike

Share this post


Link to post
Share on other sites

Hi Guys,

 

Just get it installed. So excited.

 

But i have one big problem need your advise.

 

When i am checking out, at Payment Information, i clicked to use maximum point and enter the referrer email.

 

pointclicked.gif

 

But when go to next page, i.e. confirmation, no Money Value reduction noted.

 

And when i clicked back to "Payment Information", the Tick for utilizing point and referrer email has gone!!

 

Any clue what has gone wrong??

 

This is a wonderful add on, i so keen to get it done.

 

Thanks in advance.

Edited by day2

Share this post


Link to post
Share on other sites

Just have rechecked all the editing, can't find anything goes wrong, in fact i am using ExamDiff software to compare line by line, hardly miss out any editing;

 

I also examine ssnb new instruction file as well, haven't notice anything wrong.

 

Can someone show me their working store with this modules?? I just want to take a look how does it look it at the payment page..

 

May i know which code determine and the calculation of net price after minus the reward point??

 

Any idea which file was wrongly edited???

 

Thanks

Edited by day2

Share this post


Link to post
Share on other sites

I have set my sorting of Order Total Modules in Admin to:

 

Point Redemption: 2

Shipping: 3

Sub Total: 1

Payment Type Surcharge: 5

Tax: 4

Total: 6

 

Where i want the point can only redeem against product price only. Do i set it right??

Share this post


Link to post
Share on other sites
To Avoid the shipping cost being redeemed with points you need to set up your order of your modules

Admin Area---->Modules--->Order Total

 

Here is the order below that I have mine. Keep in mind that there are no shipping costs on my site

 

Modules Sort Order

 

Points Redeemptions 4

Shipping 2

Sub-Total 1

Tax 3

Total 5

 

I would think that your order would be different. Just set the order that you want the points to be redeemed. For example your Points Redemtion should come before the shipping module.

 

Hope that helps!

 

Thanks for your help but i've changed something in the order_total side of the ot_redemptions module :

 

I've added theses changes to the file ot_redemptions.php in addition of those above in my other post :

 

	    if ($this->include_shipping == 'false')  // We don't include the shipping
	{
	$customer_shopping_points_spending = calculate_required_points($order->info['total'] - $order->info['shipping_cost'], $customer_shopping_points_spending);
	}
	else // We include the shipping
	{
	$customer_shopping_points_spending = calculate_required_points($order->info['total'], $customer_shopping_points_spending);
	}

 

 

I still have another problem :

 

If the customer uses his points, he has a redemption on the subtotal,

then I add the shipping on this subtotal minus redemptions and

i should have VAT reduced too :

 

subtotal : 100

Points redemptions : - 50

shipping : 5

total : 55

VAT (TVA) : 16.39

 

The VAT is based on the subtotal, as there's no rule in the ot_redemptions file to set the rules for VAT.

 

I've then added somes changes :

 

		// BOF   points retirée de la TVA totale 
	$pointsHT = tep_calc_shopping_pvalue($customer_shopping_points_spending) / 1.196;
	$pointsTVA = tep_calc_shopping_pvalue($customer_shopping_points_spending) - $pointsHT;		
	$order->info['tax_groups'][$key] -= $order->info['tax_groups'][$key] - $pointsTVA;
	// EOF retrait TVA 

 

But i dont think it's the right solution, because it gives me that :

 

subtotal : 100

Points redemptions : - 50

shipping : 5

total : 55

VAT (TVA) : 16.39

: 8.2

 

The last line got no text, and the result should be the one that i want to take the VAT off total;

it should be : 16.39 - 8.2

 

If someone got an idea !

Share this post


Link to post
Share on other sites

I've added this change :

		$pointsHT = tep_calc_shopping_pvalue($customer_shopping_points_spending) / 1.196;
	$pointsTVA = tep_calc_shopping_pvalue($customer_shopping_points_spending) - $pointsHT;
	$order->info['tax_groups']["dont tva 19.6"] = $order->info['tax_groups']["dont tva 19.6"] - $pointsTVA;

The "dont tva 19.6" is the text used to show the VAT of the order in my order total module.

 

There should be a $var to put like this : $order->info['tax_groups'][$var]

I dont know where is that $var and what is is name

Share this post


Link to post
Share on other sites

OK now,

 

i have installed a brand new store for testing purpose, copied all the old and new files from the downloaded zip file to the said testing store and run the sql.

 

But the results still the same!!

 

This is my setup of sort order in order total under admin's module setting:

 

Points Redeemptions 4

Shipping 2

Sub-Total 1

Tax 3

Total 5

 

Take a look of the payment and order confirmation page, the point is still fail to be redeemed ><

newstore.jpg

 

Can somebody give me some clue?? What has gone wrong??

Edited by day2

Share this post


Link to post
Share on other sites

I still have one problem with the option : "Enable customers to earn points for items already discounted?"

 

If there is only discounted items in my cart, redemption system doesnt give points

If there is discounted items with normal items, the redemption system gives points on the total of the cart, but it should only give

points on the total of items not discounted.

 

Should be something like that : total - ( for each item discounted, price )

 

I dont know where to change this, i'm gonna try something in functions/redemptions, but for the moment I have no clue !

Share this post


Link to post
Share on other sites
Hi,

 

I was wondering if anyone knew if this was compatible with "PayPal Website Payments Pro (US/UK) by dynamoeffects v1.0.2" as from what i can see, i've only ever seen paypal IPN mentioned.

 

Thanks,

Mike

 

Hi Mike

 

I have been using this with website payment pro, and it mostly works... except it does not register the rewards points when someone pays with paypal - so you'll have to manually load the points -

 

Also, i have been having an issue where paypal won't work if the buyer has enough points to cover the whole purchase....

 

other than that, seems fine.

Share this post


Link to post
Share on other sites
I still have one problem with the option : "Enable customers to earn points for items already discounted?"

 

If there is only discounted items in my cart, redemption system doesnt give points

If there is discounted items with normal items, the redemption system gives points on the total of the cart, but it should only give

points on the total of items not discounted.

 

Should be something like that : total - ( for each item discounted, price )

 

I dont know where to change this, i'm gonna try something in functions/redemptions, but for the moment I have no clue !

 

 

Hi - if I understand your question properly, you can set this in the admin/options area. Also, you need to search back through the posts as there is a fix for the mixing of the specials / non-specials points (around page 56 I think, though you'll need to check.)

Share this post


Link to post
Share on other sites
OK now,

 

i have installed a brand new store for testing purpose, copied all the old and new files from the downloaded zip file to the said testing store and run the sql.

 

But the results still the same!!

 

This is my setup of sort order in order total under admin's module setting:

 

Points Redeemptions 4

Shipping 2

Sub-Total 1

Tax 3

Total 5

 

Take a look of the payment and order confirmation page, the point is still fail to be redeemed ><

 

 

Can somebody give me some clue?? What has gone wrong??

 

 

Have you installed all the updates? there are several additional fixes required - you will have to search back through the posts (between pages 50 - 60)

Edited by ssnb

Share this post


Link to post
Share on other sites
Hi Guys,

 

Just get it installed. So excited.

 

But i have one big problem need your advise.

 

When i am checking out, at Payment Information, i clicked to use maximum point and enter the referrer email.

 

pointclicked.gif

 

But when go to next page, i.e. confirmation, no Money Value reduction noted.

 

And when i clicked back to "Payment Information", the Tick for utilizing point and referrer email has gone!!

 

Any clue what has gone wrong??

 

This is a wonderful add on, i so keen to get it done.

 

Thanks in advance.

 

 

 

There is a fix for this some way back in the posts.... you will have to search for it I'm afraid!

Share this post


Link to post
Share on other sites

Hi all, thanks again for an awesome MOD! i have an issue with shipping taxes, a firend of mine has this addon in a store that has flat rate shipping in use and a Tax/zone setup to add taxes to his shipping (16%) AND the Display Prices with Tax set to 'true'. Thus causing the points OT module to miss calculating enough points to cover the taxes on the shipping. Here's the checkout confirmation results (with the Tax OT Module disabled for easier working):

 

Sub-Total: $232.00 (Price with tax)

Flat Rate (Best Way): $15.05 (Price with tax)

Points Redeemed: -$244.97 (Points redeemed should be $247.05, with tax)

Total: $2.08 (Tax added to the shipping quote of $12.97 - Flat Rate)

 

i have tried many, MANY different OT settings/placements and nothing seems to help. Anyone have any ideas on how the P&R OT Module can pick up the tax on the shipping???

 

Even if the Display Prices with Tax is turned "Off" and the tax/zone is still applied to the Flat Rate shipping, i get the same.

 

If i turn Display Prices with Tax "On" but disable the tax/zone for the shipping module, all is fine again :)

 

So the issue seems to be simply that the P&R module is not allowing for taxes "within" the shipping module??? Any help is greatly appreciated :)

 

PS the same thing happens with Any Shipping module i try???


-------------------------------------------------

Best Regards,

 

ggbig (maestro)

Share this post


Link to post
Share on other sites
Have you installed all the updates? there are several additional fixes required - you will have to search back through the posts (between pages 50 - 60)

 

Thanks for the advice, i got it solved, it is the global register issue.

 

:angry:

 

 

Haha, what a pain..

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×