Jump to content
Tsimi

Converting Points and Rewards system for osC BS

Recommended Posts

@Tsimi 

It's working as it should for me so I must have changed something in another file and not realised. Checkout_confirmation is the same so can you send me your checkout_payment code to check?

Share this post


Link to post
Share on other sites
2 hours ago, LeeFoster said:

I had an issue with showing the points description on the product info page as I'm using Kymation's modular page so I created a module to show this.

 

2 hours ago, raiwa said:

I'll then include it to the package as an optional module.

@Tsimi, @LeeFoster,

WIth a small modification the module could be used for core product _info.php.

Shall I do it and use the module as is. It would show then below the description and options like all other core product_info content modules (reviews, also purchsed products).

Otherwise we would need a duplicate with different name to show it where it shows now:above the description or wherever the user wish to show it.

In that case another content module call would be needed to add to the core product_info.php.

Anyway better content module than hook here.

Your thoughts?

Share this post


Link to post
Share on other sites

@LeeFoster

No luck, still same. Points don't get deducted and in the checkout confirmation page it shows the selected payment method.
 

@raiwa

:rolleyes: for some shops it would push that info very far down if someone has a long description and a lot options. I personally would prefer the place wherever option.

Edited by Tsimi

Share this post


Link to post
Share on other sites
1 minute ago, Tsimi said:

:rolleyes: for some shops it would push that info very far down if someone has a long description and a lot options. I personally would prefer the place wherever option.

OK, agree, will make a duplicate.

Share this post


Link to post
Share on other sites

@Tsimi

I also noticed that you have 

<?php
  if ((MODULE_HEADER_TAGS_POINTS_REWARDS_USE_POINTS_SYSTEM == 'True') && (MODULE_HEADER_TAGS_POINTS_REWARDS_USE_REDEEM_SYSTEM == 'True')) {
      //echo points_selection();
      $cart_show_total= $cart->show_total();
      echo points_selection($cart_show_total);
      if (tep_not_null(MODULE_HEADER_TAGS_POINTS_REWARDS_POINTS_USE_REFERRAL_SYSTEM) && (tep_count_customer_orders() == 0)) {
          echo referral_input();
      }
  }
?>

Where as I have

<?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);
	  if (tep_not_null(USE_REFERRAL_SYSTEM) && (tep_count_customer_orders() == 0)) {
		  echo referral_input();
	  }
  }
?>

 

Share this post


Link to post
Share on other sites

@raiwa

:smile::thumbsup:

@LeeFoster

Yeah, that is because raiwa created a header tags module already for all the settings.
I reverted everything to the previous code and I am not sure what's going on but it does show correct now. :blink:
I think I made a mistake when I explained the old osC shop behavior. It does have a payment method checked as soon you enter the payment page. But it doesn't matter what you select if you can pay for the whole amount with points it changes the Payment method to "Points" in the checkout confirmation page. Which is also happening in the BS version.

Is there a way to have one of the payment methods checked as soon you load the payment page?
I just think it didn't make sense to let a customer choose a payment method if he has the point to pay for everything.

If I purchase items that are higher in total than I have points it shows this message.

"Total Purchase is greater than the maximum points allowed, you will also need to choose a payment method ."

Which is why I thought that no payment method should be checked/ticked if points are enough to cover all.

 

Edited by Tsimi

Share this post


Link to post
Share on other sites
3 minutes ago, Tsimi said:

I think I made a mistake when I explained the old osC shop behavior. It does have a payment method checked as soon you enter the payment page. But it doesn't matter what you select if you can pay for the whole amount with points it changes the Payment method to "Points" in the checkout confirmation page.

I'm not sure I understand what you mean.

4 minutes ago, Tsimi said:

Is there a way to have one of the payment methods checked as soon you load the payment page?

As far as I am aware having none checked is standard OSCommerce functionality and I wouldn't know how to make one selected by default. I don't think I'd want to have one selected by default

Share this post


Link to post
Share on other sites

@Tsimi

I just read your amendments. I think the way it currently works is the correct way to do it, otherwise you are forcing the customer to spend their points when they may not want to. They may be saving them for a bigger item.

Share this post


Link to post
Share on other sites

Sorry for the confusion.

I always presumed that the original Points and Rewards addon in my old osC shop had no payment method selected when going to through the checkout but it actually does have one selected by default. (which is not a good thing if you ask me)
So I thought that the BS version has no payment pre-selected which is good but it does give you an error obviously since you have to select one payment method.

So what we have to do is find a way to skip the stock osC validation if the customer has enough points to cover the whole total.
That is what the bug #2 report should say

 

Edited by Tsimi

Share this post


Link to post
Share on other sites
8 minutes ago, Tsimi said:

Sorry for the confusion.

I always presumed that the original Points and Rewards addon in my old osC shop had no payment method selected when going to through the checkout but it actually does have one selected by default. (which is not a good thing if you ask me)
So I thought that the BS version has no payment pre-selected which is good but it does give you an error obviously since you have to select one payment method.

So what we have to do is find a way to skip the stock osC validation if the customer has enough points to cover the whole total.
That is what the bug #2 report should say

 

Strange, when I was testing this yesterday you didn't need to have any of the payment options checked.

Share this post


Link to post
Share on other sites
2 hours ago, Tsimi said:

and then I would like to have a go at the shopping cart box module if that's OK with you, I think step 17?

@Tsimi, forgot to answer on this, yes ok:thumbsup:asigned, will add to "To Do" list.

Share this post


Link to post
Share on other sites

@raiwa

Just looking at the to-do list. When you say 'info footer module' what do you mean?

Do mean mean create it's own module for the footer or add it to the existing footer info module?

 

Share this post


Link to post
Share on other sites

@LeeFoster,

I mean to add to the contribution a modified "links.php" template file for the "cm_footer_information_links.php" module with the "my_points_help.php" link included.

The same like for the "bm_information.php" box.

 

Share this post


Link to post
Share on other sites
20 minutes ago, raiwa said:

@LeeFoster,

I mean to add to the contribution a modified "links.php" template file for the "cm_footer_information_links.php" module with the "my_points_help.php" link included.

The same like for the "bm_information.php" box.

 

Oh, I've done that already for mine.

 

updated footer links.zip

Edited by LeeFoster

Share this post


Link to post
Share on other sites

Hello guys,  thank you for the addon and for  team work :thumbsup:.

I am testing right now, I think there is small editing  on the checkout_payment.php i

change this

<?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?>

to this

<?php echo tep_draw_separator('pixel_trans.gif', '10', '10'); ?>

Omar

Share this post


Link to post
Share on other sites
1 minute ago, Omar_one said:

Hello guys,  thank you for the addon and for  team work :thumbsup:.

I am testing right now, I think there is small editing  on the checkout_payment.php i

change this


<?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?>

to this


<?php echo tep_draw_separator('pixel_trans.gif', '10', '10'); ?>

Omar

I just deleted this

Share this post


Link to post
Share on other sites

What about to show to the customer how many point he have .. example  in the account.php

Edited by Omar_one

Share this post


Link to post
Share on other sites

I think it will be good that when Confirming  Pending Points  it will inform customer about the point and the points amount

Share this post


Link to post
Share on other sites

@LeeFoster,

 

I just updated the product info content module.

- in the globals list needed to be removed unused " $currency " but " $new_price" was missing.

- removed " itemprop="points" " (points doesn't exist in Schema Org definitions for itemprop)

Please see another changes in GITHUB repository and consider to update your files.

 

Share this post


Link to post
Share on other sites
2 hours ago, raiwa said:

@LeeFoster,

 

I just updated the product info content module.

- in the globals list needed to be removed unused " $currency " but " $new_price" was missing.

- removed " itemprop="points" " (points doesn't exist in Schema Org definitions for itemprop)

Please see another changes in GITHUB repository and consider to update your files.

 

In a moment of madness I managed to delete my entire includes folder so restoring a back up and then updating my files.

Share this post


Link to post
Share on other sites

I added  my point link to account drop menu 
by :
in includes/modules/navbar_modules/templates/account.php adding this

<li><?php echo '<a href="' . tep_href_link('my_points.php', '', 'SSL') . '">' . MODULE_NAVBAR_MYPOINT . '</a>'; ?></li>

 

and adding this

define('MODULE_NAVBAR_MYPOINT', 'My Point');  

  in includes/languages/english/modules/navbar_modules/nb_account.php

 

 

I created navbar module (just a link to my_points.php) also but I think the right place for the link in the account drop menu 

Omar

Edited by Omar_one

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

×