Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

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


Recommended Posts

Ok, this may sound a little stupid but... I have a question about the referral system.

As I can see now, after a user creates an account, when he places his first order he is asked if he/she was referred by someone else and asked to type the email address.

This is too complicated, because one can enter a wrong address...

So, wouldn't it be possible to create a referral link in every customer's account page?

Something that whey will show to their friends, and if someone visits the page and creates an acount, they are credited with points?

The link should be something like www.domain.com/referrer.php?client_id=xxx or something like that...

How hard would it be to implement that?

Link to comment
Share on other sites

  • 1 month later...

Hi all, 1st off great contribution, must have for any store.

 

right now to the problem.

 

1st: I sell digital products via my store and would like the points to be automatically awarded once the order status has been set to delivered, i know you can automatically award them after a set amount of days or immidiately but what if they didn't finish payment, are the points still awarded?, so i shouldn't imagine it would be too difficult to change it to award points once a 'desired' order status is reached i.e. delivered, has anyone got an idea of what code to alter and how?

 

2nd I use the activate account contribution and have got both to work, but once the customer has activated account it still tells me unverified in the admin section, i merged both codes as follows:

//Account activation BOF

if (ACTIVATION_CODE == 'off') {

// Points/Rewards system V2.1beta BOF

if ((USE_POINTS_SYSTEM == 'true') && (NEW_SIGNUP_POINT_AMOUNT > 0)) {

tep_add_welcome_points($customer_id);

 

$points_account = '<a href="' . tep_href_link(FILENAME_MY_POINTS, '', 'SSL') . '"><b><u>' . EMAIL_POINTS_ACCOUNT . '</u></b></a>.';

$points_faq = '<a href="' . tep_href_link(FILENAME_MY_POINTS_HELP, '', 'NONSSL') . '"><b><u>' . EMAIL_POINTS_FAQ . '</u></b></a>.';

$text_points = sprintf(EMAIL_WELCOME_POINTS , $points_account, number_format(NEW_SIGNUP_POINT_AMOUNT,POINTS_DECIMAL_PLACES), $currencies->format(tep_calc_shopping_pvalue(NEW_SIGNUP_POINT_AMOUNT)), $points_faq) ."\n\n";

 

$email_text .= EMAIL_WELCOME . EMAIL_TEXT . $text_points . EMAIL_CONTACT . EMAIL_WARNING;

} else {

$email_text .= EMAIL_WELCOME . EMAIL_TEXT .EMAIL_CONTACT . EMAIL_WARNING;

}

// Points/Rewards system V2.1beta EOF

tep_mail($name, $email_address, EMAIL_SUBJECT, $email_text, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

tep_redirect(tep_href_link(FILENAME_CREATE_ACCOUNT_SUCCESS, '', 'SSL'));

} else {

$activation_id = md5($email_address);

$verification_href = tep_href_link(FILENAME_ACCOUNT_ACTIVATE, 'activation_id=' . $activation_id, 'SSL');

$verification_mail = tep_href_link(FILENAME_ACCOUNT_ACTIVATE, 'activation_id=' . $activation_id . '&submit=true&activation_code=' . $activation_code, 'SSL');

$verification_link = '<a href="' . $verification_mail . '">' . $verification_mail . '</a>' ."\n\n";

// Points/Rewards system V2.1beta BOF

if ((USE_POINTS_SYSTEM == 'true') && (NEW_SIGNUP_POINT_AMOUNT > 0)) {

tep_add_welcome_points($customer_id);

 

$points_account = '<a href="' . tep_href_link(FILENAME_MY_POINTS, '', 'SSL') . '"><b><u>' . EMAIL_POINTS_ACCOUNT . '</u></b></a>.';

$points_faq = '<a href="' . tep_href_link(FILENAME_MY_POINTS_HELP, '', 'NONSSL') . '"><b><u>' . EMAIL_POINTS_FAQ . '</u></b></a>.';

$text_points = sprintf(EMAIL_WELCOME_POINTS , $points_account, number_format(NEW_SIGNUP_POINT_AMOUNT,POINTS_DECIMAL_PLACES), $currencies->format(tep_calc_shopping_pvalue(NEW_SIGNUP_POINT_AMOUNT)), $points_faq) ."\n\n";

 

$email_text .= EMAIL_WELCOME . EMAIL_TEXT . $text_points . TEXT_ACTIVATION_CODE . $activation_code . "\n\n" . EMAIL_TEXT_ACTIVATION . $verification_link . EMAIL_CONTACT . EMAIL_WARNING;

} else {

$email_text .= EMAIL_WELCOME . EMAIL_TEXT . TEXT_ACTIVATION_CODE . $activation_code . "\n\n" . EMAIL_TEXT_ACTIVATION . $verification_link . EMAIL_CONTACT . EMAIL_WARNING;

}

// Points/Rewards system V2.1beta EOF

tep_mail($name, $email_address, EMAIL_SUBJECT, $email_text, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

tep_redirect($verification_href);

}

//Account Activation EOF

 

Crude i know but seems to be working as customer can indeed activate their account, but causes some confusion as it states they haven't.

 

3rd: Last and most importantly (as both of the above do not cause immidiate problems but would be nice if working), when a customer places an order they can use their points as desired, but if they decide to cancel their purchase after clicking confirm order button when they return they find that their points have been deducted (GONE) and that price of the item has gone back up to it's original value (before redeeming points).

 

This for me personally is not an option and would result in me not being able to use this contribution in an active store. as all businesses recognise you can not allow your customers to feel they have lost out in anyway, it would undermine what this whole contribution is about (rewarding your loyal customers) and would result in the exact opposite in losing valuable customers.

 

I will help find a solution to this problem for me and the others who noticed and am willing to put some hard work in on my behalf but i am only a php novice :rolleyes:

 

PLEASE UNDERSTAND THAT'S NOT MEANT AS A DIG AS THIS IS AN AWSOME CONTRIBUTION AND I WANT IT IN ALL MY STORES :) :)

 

thanks

 

Dan

Link to comment
Share on other sites

Hello Everyone,

 

I have integrated this module with my site, the issue I am facing is ,

It does not allow to make a checkout using only points which a customer has confirmed. It forces to select a payment method (Say cash on delivery or paypal standard etc) in order to make checkout using points.

 

Is it possible to buy something using points without having to pay from the site ?

 

Please suggest , its really urgernt :'(

 

Thank you in advance

Link to comment
Share on other sites

Please Note.

in a rare case where you have enough points to cover your order and your store has only one payment option.

you stuck. why?

osCommerce choose that option as the default payment option.

the only why around is.

1. the safe way is to enable any other option.

2. you could add an extra code to go around it.

i will not post it now unless someone is really in need of it.

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

When using points to pay for your the whole order. you will notice that the payment method is empty.

this add on will show points as payment method or other payment + points.

in catalog/includes/languages/english/modules/order_total/ot_redemptions.php

find line no.37

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

and add after.

			$order->info['payment_method'] = ( $order->info['total'] > 0) ? $order->info['payment_method'] . '+' . str_replace(':', '', TEXT_POINTS) : str_replace(':', '', TEXT_POINTS);

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

Any none standard payment (third party that use api) like PayPal IPN.

will need to be merge in order to use it with this module.

I am looking into paypal IPN and will post soon.

Link to comment
Share on other sites

  • 3 weeks later...
  • 2 weeks later...

I am facing one issue supposed i have 100 points and i have paypal payment method activated ... now after final step of checkout ( Confirm ).. i go to paypal now if i return back without payment my points will deduct .. any way to deduct points after we come back form paypal?

Please help me its really critical issue

Link to comment
Share on other sites

  • 1 month later...
  • 2 weeks later...
  • 1 month later...

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...

Link to comment
Share on other sites

Where do you have these installed in your files?

 

 

Posted 19 March 2011, 04:36

snapback.pngdesmoworks, on 18 March 2011, 21:49, said:

 

I'd like to have a total accumulated points calculation as we are offering special one time rewards for different levels of achievement. Such as 2000 points, 5000 points, 10000 points, etc... Kind of like an airline where they have various levels of achievement within their rewards systems.

 

Looks like I've got it. Basically just takes the customers current points and adds (well, subtracts the negative) the redeemed points to get the total accumulated points. Below is for what the customers see in their account. Just finishing up the report in the admin section so we can track these people easily. Next up will be to make loyalty groups at the different point levels and an automated system to alert those who qualify.

 

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); ?>

 

 

$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); ?>

Edited by The Munch
Link to comment
Share on other sites

 

Posted 19 March 2011, 04:36

desmoworks, on 18 March 2011, 21:49, said:

I'd like to have a total accumulated points calculation as we are offering special one time rewards for different levels of achievement. Such as 2000 points, 5000 points, 10000 points, etc... Kind of like an airline where they have various levels of achievement within their rewards systems.

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); ?>

For the report I had to do it a little differently. In order to do a proper sort by accumulated points I had to get the math done in the query instead. Now I can sort by customers name, current points, accumulated points, etc... I also added their emails to the report and next will figure out how to export the report with selected parameters to excel.

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..

Edited by The Munch
Link to comment
Share on other sites

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?

Link to comment
Share on other sites

  • 2 weeks later...

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)

Edited by The Munch
Link to comment
Share on other sites

  • 2 weeks later...

I installed "V2.1beta" on my OSC 2.2 M2. I can't find some codes in some of the files. The codes are below. PLEASE HELP!

 

1) catalog/checkout_process.php

 

 

if ( ( is_array($payment_modules->modules) && (sizeof($payment_modules->modules) > 1) && !is_object($$payment) ) || (is_object($$payment) && ($$payment->enabled == false)) ) {

tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(ERROR_NO_PAYMENT_MODULE_SELECTED), 'SSL'));

}

 

2) catalog/product_reviews_info.php

 

 

<td class="pageHeading" valign="top"><?php echo $products_name; ?></td>

<td class="pageHeading" align="right" valign="top"><?php echo $products_price; ?></td>

</tr>

</table></td>

</tr>

 

3) open catalog/reviews.php

 

 

 

<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>

<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_reviews_new.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

</tr>

</table></td>

</tr>

 

4) catalog/includes/boxes/shopping_cart.php

 

 

if ($cart->count_contents() > 0) {

$info_box_contents[] = array('text' => tep_draw_separator());

$info_box_contents[] = array('align' => 'right',

'text' => $currencies->format($cart->show_total()));

}

Link to comment
Share on other sites

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!!

Link to comment
Share on other sites

  • 3 months later...

I've installed this contribution, and everything seems to work find EXCEPT....

 

It doesn't subtract the redeemed points from the price of the order.

It does subtract the redeemed points from the point balance -- just not the order total.

A customer can check the redeem box - but nothing happens except losing those points from the balance.

 

 

 

Can anyone tell me what I'm possibly missing?

 

Thanks!

Link to comment
Share on other sites

I've been able to successfully install this, and get it to work (Fixed the problem just above this note.)

 

But, I do have a problem. If someone has enough points to pay for the entire order, and have the credit card payment option checked, and error will come back "No credit card number" or "No amount given."

 

It is still sending the information to the credit card authorization, but without any data.

 

How do I correct this?

 

Thanks.

Link to comment
Share on other sites

Please see the post just above this one. I'm still looking for a fix on that.

 

And, found another error. Fuzzy math.

 

 

Sub-Total:

$2,500.00

Points Redeemed:

-$99.40

Shipping Rate ( United States : ):

$6.00

Total:

$2.00

 

That came from editing the shopping cart after using some points.

It doesn't recalc properly it seems.

 

Anyone seen this type of weirdness and have a fix?

 

Thanks.

Link to comment
Share on other sites

  • 3 weeks later...
  • 2 weeks later...

Hi!

I have this Points/Rewards module installed in my shop fior a while and working fine. But now i just installed a new payment module (Multibanco/ATM) and ther's some problem with this 2 modules working together...

Multibanco module is working perfectly, unless the costumer discounts Reward Points. In this case the Multibanco Reference for payment is not showing in checkou_success page neither by email. If the costumers dosn't discount Points everything works fine with Multibanco module (in checkout_success appears the reference and amount to pay).

 

It's very strange.. i already checked all the files and there's no mistake, it seems to be a conflict but i don't know how to fix it..... if someone has an idea i'd really appreciate!

 

When costumers select payment method MULTIBANCO/ATM this is the difference depending on Reward/Points selection or not:

 

Checkout_Success when costumer DON'T DISCOUNT Points (everything OK):

 

post-194836-0-29403600-1336043733_thumb.jpg

 

Checkout_Success when costumer DISCOUNT Points (not showing Multibanco data):

post-194836-0-34746000-1336043726_thumb.jpg

 

Thanks!

Link to comment
Share on other sites

Completing the information about my problem above... the MULTIBANCO MODULE works fine even when Points are discounted because i do see the reference to payment in the admin page. So the refª is generated with the correct amount for that order. The problem is that the costumer is not seeing those references on checkout_succes or receiving them by email, that's all. So i suppose that this is a small bug but can't figure it out!

Link to comment
Share on other sites

  • 1 month later...

hello,

 

in check_out payment, if customer has no points than no comment is written, maybe i made a mistake.

anyhow,

 

if points sytem and redeem okey, will check customers first buy if not say, you can give points to your friends,

if it is not customers first buy, check customers points, write customers point, if it has not any point, writes text_no_ points_yet

 

i did like below but did not work

 

if ((USE_POINTS_SYSTEM == 'true') && (USE_REDEEM_SYSTEM == 'true')) {

//echo points_selection();

$cart_show_total= $cart->show_total();

 

if (tep_not_null(USE_REFERRAL_SYSTEM) && (tep_count_customer_orders() == 0)) {

echo referral_input();

} else if ($cart_show_total > 0) {

echo points_selection($cart_show_total);

} else { echo TEXT_NO_POINTS_YET;

}

}

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.

 Share

×
×
  • Create New...