Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

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


Recommended Posts

I'm not really bothered about a fix for the negative order total balance generated when points are used as a sole method of payment because that only happens when they are set at 0.01 (if memory serves me correct)

 

I don't see how this image will help you but I'm posting it - anyway, I stress again the customer end userbility is fine... customers will not have any problems becaue all their function work - it's just the restrictions do not work.

 

I was presuming that once a product or category is restricted, the points are not mean't to show in product info - therefore do not get added to customer points balaance for those items purchased, but now I am beginning to think the 'restrictions' could mean something else.

 

points3.gif

Edited by chooch

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Link to comment
Share on other sites

I have a quick question for anyone who has a working version...

 

On the checkout_payment.php page during the checkout process when the "Shopping Points Redemptions" Box shows up towards the bottom of the page and it says "The estimated total of your purchase is: $99.99" this is still showing as the original total after shipping, but it doesn't take off the discount from the Points.

 

MaNoLiA does this "estimated total" show your price before the discount? or does it just show the actual total without any discount?

Link to comment
Share on other sites

skatejunkcom: I don't see the problem with that...

 

This is what checkout_payment.php shows, when I buy something for 2,50EUR + 2,49EUR shipping:

"Shopping Points Redemptions

You have a credit balance of 8.00EUR ,would you like to use it to pay for this order?

The estimated total of your purchase is: 4.99EUR .

Tick here to use Maximum Points allowed for this order. (50 points 4.99EUR) ->(check-box)"

 

so it shows the total without points, but I think that's just how it should be.

 

I was presuming that once a product or category is restricted, the points are not mean't to show in product info - therefore do not get added to customer points balaance for those items purchased, but now I am beginning to think the 'restrictions' could mean something else.

--> But for what, if not for this?

Link to comment
Share on other sites

--> But for what, if not for this?

Well, it could well be that the points do show up in product info even if the product is restricted but customers do not receive points for those purchases...

 

I hope Deep-Silver can give some info on what the following means:

5.Combined all 3 Restriction options into a loop.

No more on/off to disable it you must leave it empty. else Restriction is on what ever come first.

1.Model 2.Products ID, 3. Categories Cpaths

 

It was in the install instructions

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Link to comment
Share on other sites

Ok, I've re-checked the restrictions... basicaly mine work.

 

In the Enable Product Model Restriction, Enable Products ID Restriction and Enable Category ID Restriction - what it means is to add the cat/prods that you want to be valid (not restricted)

 

I suggest you folks check yours and you'll see what I mean.

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Link to comment
Share on other sites

Once again Thank u Chooch for the backup, it really in great help as my hands are full doing so many things + i have a little girl that need me.

I took off the demo site because of over abuse regardless of my request so now user must install this mod to try in on.

The latest post and updated/corrects are not posted by me so i can't really response to it and all PM should be sent to the person who upload/fix/change or whatever not to me please.

anyway as wrote i'm really so busy now and i promiss to look into it once time permit. till then i can't promiss to replay to all my PM at once. and people keep abusing my live shop with false account /order. make me less and less want to improve and share this mod with other so please for the last time NO ABUSE.

i try my best to help even if most of the cases the problem has got nothing to do with my mod. and i'm sure that the forum members can confirm that.

Edited by deep-silver

Remember - - - "STRESSED" spelled backwards "DESSERTS"

Link to comment
Share on other sites

Once again Thank u Chooch for the backup, it really in great help as my hands are full doing so many things + i have a little girl that need me.

I took off the demo site because of over abuse regardless of my request so now user must install this mod to try in on.

The latest post and updated/corrects are not posted by me so i can't really response to it and all PM should be sent to the person who upload/fix/change or whatever not to me please.

anyway as wrote i'm really so busy now and i promiss to look into it once time permit. till then i can't promiss to replay to all my PM at once. and people keep abusing my live shop with false account /order. make me less and less want to improve and share this mod with other so please for the last time NO ABUSE.

i try my best to help even if most of the cases the problem has got nothing to do with my mod. and i'm sure that the forum members can confirm that.

Hi Deep-Silver,

 

How are you? I hope you and your daughter are well :thumbsup:

 

With the exception of maybe 1 post here a few days ago I haven't seen you around here recently - it'll be great to have you back when you have time.

 

Now about the demo site - it is a shame that people are abusing your store especially after you made it clear that you don't want them to create false accounts. There was no need for people to abuse your demo store either but it is sad that you had to take that down too.

 

Please don't let a small minority discourage you from continuing your brilliant work on this contribution and support thread.

Edited by chooch

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Link to comment
Share on other sites

i have installed the POINTS AND REWARDS MODULE V1.00 and i have a problem in the payment.. the cash on delivery it didn's appear in the payment method in the checkout_payment.php.. what is the problem...

Your problem is not Points Reward related, anyway, you should download the latest version of the contribution not version #1.00

 

To find someone to help you, you need to post the COD query in the general questions section of the forum: HERE

Edited by chooch

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Link to comment
Share on other sites

Does this work With Creloaded 6.2? I saw that deep-silver has a one to work with 6.15 but how about 6.2 ?

I don't know the difference between the two versions you mentioned but with this being an osC forum (not a creloaded one) I doubt you'll find the answer but I think it should work... be on the safe side and try the creloaded forum because this forum is for osC only.

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Link to comment
Share on other sites

Hmmm, I guess we will need for other people to respond to your post because I haven't set up my crons jobs because I am too busy with other work.... if this is not an iscolated case then someone needs to post their experiences here so we can find a solution.

 

No one wants to respond:)

Actually cron is not needed, running script manually also does not work, if expiry date is set in next month

here is the code of customer_points_expire.php, what might be wrong in logic of the script?

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

 

Released under the GNU General Public License

*/

 

include_once('includes/application_top.php');

 

if ((USE_POINTS_SYSTEM == 'true') && tep_not_null(POINTS_AUTO_EXPIRES)){

tep_db_query("UPDATE " . TABLE_CUSTOMERS . " SET customers_shopping_points = NULL, customers_points_expires = NULL WHERE customers_points_expires < CURDATE()");

 

if (tep_not_null(POINTS_EXPIRES_REMIND)){

 

include_once(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CUSTOMERS_POINTS_PENDING);

 

$customer_query = tep_db_query("SELECT customers_gender, customers_lastname, customers_firstname, customers_email_address, customers_shopping_points, customers_points_expires FROM " . TABLE_CUSTOMERS . " WHERE (CURDATE() + '". (int)POINTS_EXPIRES_REMIND ."') = customers_points_expires");

while($customer = tep_db_fetch_array($customer_query)){

$customers_email_address = $customer['customers_email_address'];

$gender = $customer['customers_gender'];

$first_name = $customer['customers_firstname'];

$last_name = $customer['customers_lastname'];

$name = $first_name . ' ' . $last_name;

 

if (ACCOUNT_GENDER == 'true') {

if ($gender == 'm') {

$greet = sprintf(EMAIL_GREET_MR, $last_name);

} else {

$greet = sprintf(EMAIL_GREET_MS, $last_name);

}

} else {

 

$greet = sprintf(EMAIL_GREET_NONE, $first_name);

}

$can_use = "\n\n" . EMAIL_TEXT_SUCCESS_POINTS;

 

$email_text = $greet . "\n" . EMAIL_EXPIRE_INTRO . "\n" . sprintf(EMAIL_EXPIRE_DET, number_format($customer['customers_shopping_points'],POINTS_DECIMAL_PLACES), tep_date_short($customer['customers_points_expires'])) . "\n" . EMAIL_EXPIRE_TEXT . "\n\n" . sprintf(EMAIL_TEXT_POINTS_URL, tep_catalog_href_link(FILENAME_CATALOG_MY_POINTS, '', 'SSL')) . "\n\n" . sprintf(EMAIL_TEXT_POINTS_URL_HELP, tep_catalog_href_link(FILENAME_CATALOG_MY_POINTS_HELP, '', 'NONSSL')) . $can_use . "\n" . EMAIL_CONTACT . "\n" . EMAIL_SEPARATOR . "\n" . '<b>' . STORE_NAME . '</b>.' . "\n";

 

tep_mail($name, $customer['customers_email_address'], EMAIL_EXPIRE_SUBJECT, $email_text, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

}

}

}

Link to comment
Share on other sites

hey... just wanted to say, that we found the reason why checkout_confirmation.php didn't show the points redeemed... We set

register_globals = Off and it works... now as there are many people with register_globals = off there should be written a fix for this problem...

I try to write a fix but I cannot promise to have success with this ;)

Link to comment
Share on other sites

hey... just wanted to say, that we found the reason why checkout_confirmation.php didn't show the points redeemed... We set

register_globals = Off and it works... now as there are many people with register_globals = off there should be written a fix for this problem...

I try to write a fix but I cannot promise to have success with this ;)

 

*Shouts for joy*

 

Yes it works, but for some servers you might need to write a php.ini file and make sure the put "register_globals = On;" in that file. Then put the php.ini file into your yoursite.com/catalog/ directory. That's what finally worked for me.

Link to comment
Share on other sites

hmm yes but for register_globals= off; what is in my opinion better it should work too...

 

I think I found the mistake but I have no idea how to fix it...

 

in catalog\includes\modules\order_total\ot_redemptions.php

function process() {
  global $order, $currencies, $customer_shopping_points_spending;

// if customer is using points to pay
  if ($customer_shopping_points_spending > 0){

	$order->info['total'] = $order->info['total'] - (tep_calc_shopping_pvalue($customer_shopping_points_spending));

	$this->output[] = array('title' =>''. MODULE_ORDER_TOTAL_REDEMPTIONS_TEXT . ':',
							'text' => '<font color="FF0000">-'.$currencies->format(tep_calc_shopping_pvalue($customer_shopping_points_spending), true, $order->info['currency'], $order->info['currency_value'].'</font>'),
							'value' => tep_calc_shopping_pvalue($customer_shopping_points_spending));

  }
}

 

I removed the if if ($customer_shopping_points_spending > 0){ }

now there is shown this on the checkout_confirmation.php: Points Redeemed: -0.00EUR

 

so $customer_shopping_points_spending seems to be not set or 0...

I looked for the worth of the var with phpinfo(); (in checkout_confirmation.php) and it shows this:

_POST["customer_shopping_points_spending"] 49.9

so it seems as te function cannot get the var for some reason...

As the problem was solvable with register_globals= on; I tried to change $customer_shopping_points_spending to $_POST['customer_shopping_points_spending']

but with no effect...

 

somebody knows how to fix that problem?

Link to comment
Share on other sites

YES YES YES I fixed the problem... the solution was the same as I described above....

For all having trouble with register_globals=off; use this code:

 

in catalog\includes\modules\order_total\ot_redemptions.php search for:

 

// if customer is using points to pay
  if ($customer_shopping_points_spending > 0){

	$order->info['total'] = $order->info['total'] - (tep_calc_shopping_pvalue($customer_shopping_points_spending));

	$this->output[] = array('title' =>''. MODULE_ORDER_TOTAL_REDEMPTIONS_TEXT . ':',
							'text' => '<font color="FF0000">-'.$currencies->format(tep_calc_shopping_pvalue($customer_shopping_points_spending), true, $order->info['currency'], $order->info['currency_value'].'</font>'),
							'value' => tep_calc_shopping_pvalue($customer_shopping_points_spending));

  }

 

 

and replace with:

// if customer is using points to pay
  if ($_POST['customer_shopping_points_spending'] > 0){

	$order->info['total'] = $order->info['total'] - (tep_calc_shopping_pvalue($_POST['customer_shopping_points_spending']));

	$this->output[] = array('title' =>''. MODULE_ORDER_TOTAL_REDEMPTIONS_TEXT . ':',
							'text' => '<font color="FF0000">-'.$currencies->format(tep_calc_shopping_pvalue($_POST['customer_shopping_points_spending']), true, $order->info['currency'], $order->info['currency_value'].'</font>'),
							'value' => tep_calc_shopping_pvalue($_POST['customer_shopping_points_spending']));

  }

 

Thanks all for help!

Link to comment
Share on other sites

hey...

I sad to inform you that there is another problem...

there are no points subtracted in the email when you order something with register_globals=off;

and no points substracted on the my_points page...

 

In checkout_process.php I found this:

// customer shoppping points account balanced
if ($customer_shopping_points_spending) {
  tep_redeemed_points($customer_id, $insert_id, $customer_shopping_points_spending);
}
 }

 

it's the function of functions/redemption.php and I think it is responsible for substracting the points...

I tried to replace $customer_shopping_points_spending with $_POST['customer_shopping_points_spending'] again...

but no effect this time...

I think it is the same problem as before but now I really need help please... :(

Link to comment
Share on other sites

That register global on/off may not be a simple issue either, so be careful.

 

Your best bet as mentioned by someone else is a php.ini to see what's what on the site and basically the server itself may hold the key... what version php is on the server?

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Link to comment
Share on other sites

hmm ok everything is working with this register globals on... but I am a bit scared because I have the register_globals=off patch for oscommerce and the autor of this patch wrote that I MUST deactivate register globals, because there would be bad consequences if I dont...

 

and don't try to use my code please, it's just working for confirmation page and only for register_globals=off, so if you put this on a register_globals=on page there will be mistakes...

 

maybe someone could write a solution for register_globals= off?

Link to comment
Share on other sites

Apologies if this has been answered earlier . This (fantastic) mod is working fine - the only problem I have is the Redeem box on the checkout payment page does not appear? I cannot enter how many points I would like to redeem against the items in my cart.

 

The checkbox to redeem *all* my points is there (and works fine) - I'm just missing the Redeem box mentioned in the FAQ's.

 

Any ideas??

Edited by jasonabc
Link to comment
Share on other sites

hmm ok everything is working with this register globals on... but I am a bit scared because I have the register_globals=off patch for oscommerce and the autor of this patch wrote that I MUST deactivate register globals, because there would be bad consequences if I dont...

 

and don't try to use my code please, it's just working for confirmation page and only for register_globals=off, so if you put this on a register_globals=on page there will be mistakes...

 

maybe someone could write a solution for register_globals= off?

I really don't see why you can't move your site to a server/host with globals on - that will simplify the issue

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Link to comment
Share on other sites

jasonabc: there is no possibility to use only some points... you have to use all... but as you think about the sense of redeeming only some points you will get to see that there is no reason why someone should redeem only some points...

 

chooch: register globals= on is not that safe as off... and on later versions of php... php 6 or something it will be deactivated so the script won't work no more.

Link to comment
Share on other sites

Thanks for the reply ;-) Saw in the FAQ's it mentioned a box where you could enter the number of points you wanted to redeem but couldn't see the box on the payment page. Guess the FAQs just need updating ;)

Link to comment
Share on other sites

chooch: register globals= on is not that safe as off... and on later versions of php... php 6 or something it will be deactivated so the script won't work no more.

I know that but the issue is php5 - many hosts upgraded to php5 only to downgrade back to 4.42/4.43 because of the bugs associated with it.

 

Eventually php5+ and 6 will be the norm but until then I am sticking to my globals 'on' server and will cross the 'off' bridge when later versions of php5+ will be stable - thats my view

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Link to comment
Share on other sites

just a quick question. i've searched but couldn't find an answer.

 

SUB_HEADING_TITLE

SUB_HEADING_TEXT

 

appearing at the bottom of my faq's page. under the list of faq's (1-17)

anyone have an idea what i've probably left out/missed with the install?!?

appreciate any feedback. thanx.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...