Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

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


Recommended Posts

nope, nothing :(

is there possibly a server-specific setting that could be barring the function of this?

 

 

i tried placing:

echo $points['customers_shopping_points'];

 

all over functions/redemptions.php to see if it will show my points, but nothing shown regardless of it if was after the $points query, beginning or end of the script

 

tried to place it on checkout_shipping and nothing shown either

Link to comment
Share on other sites

 

My oscommerce has the same error on my_ponits.php and my_points_help.php.

 

The error is that:

 

Fatal error: Cannot redeclare tep_show_category() (previously declared in /home/tuffyart/public_html/includes/header.php:243) in /home/tuffyart/public_html/includes/boxes/categories.php on line 13

 

And here is my categories.php code:

 

<?php

/*

$Id: categories.php,v 1.25 2003/07/09 01:13:58 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

function tep_show_category($counter) {

global $tree, $categories_string, $cPath_array;

 

for ($i=0; $i<$tree[$counter]['level']; $i++) {

$categories_string .= "  ";

}

 

$categories_string .= '<a href="';

 

if ($tree[$counter]['parent'] == 0) {

$cPath_new = 'cPath=' . $counter;

} else {

$cPath_new = 'cPath=' . $tree[$counter]['path'];

}

 

$categories_string .= tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">';

 

if (isset($cPath_array) && in_array($counter, $cPath_array)) {

$categories_string .= '<b>';

}

 

// display category name

$categories_string .= $tree[$counter]['name'];

 

if (isset($cPath_array) && in_array($counter, $cPath_array)) {

$categories_string .= '</b>';

}

 

if (tep_has_category_subcategories($counter)) {

$categories_string .= '->';

}

 

$categories_string .= '</a>';

 

if (SHOW_COUNTS == 'true') {

$products_in_category = tep_count_products_in_category($counter);

if ($products_in_category > 0) {

$categories_string .= ' (' . $products_in_category . ')';

}

}

 

$categories_string .= '<br>';

 

if ($tree[$counter]['next_id'] != false) {

tep_show_category($tree[$counter]['next_id']);

}

}

?>

<!-- categories //-->

<tr>

<td>

<?php

$info_box_contents = array();

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

 

new infoBoxHeading($info_box_contents, true, false);

 

$categories_string = '';

$tree = array();

 

$categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '0' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name");

while ($categories = tep_db_fetch_array($categories_query)) {

$tree[$categories['categories_id']] = array('name' => $categories['categories_name'],

'parent' => $categories['parent_id'],

'level' => 0,

'path' => $categories['categories_id'],

'next_id' => false);

 

if (isset($parent_id)) {

$tree[$parent_id]['next_id'] = $categories['categories_id'];

}

 

$parent_id = $categories['categories_id'];

 

if (!isset($first_element)) {

$first_element = $categories['categories_id'];

}

}

 

//------------------------

if (tep_not_null($cPath)) {

$new_path = '';

reset($cPath_array);

while (list($key, $value) = each($cPath_array)) {

unset($parent_id);

unset($first_id);

$categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$value . "' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name");

if (tep_db_num_rows($categories_query)) {

$new_path .= $value;

while ($row = tep_db_fetch_array($categories_query)) {

$tree[$row['categories_id']] = array('name' => $row['categories_name'],

'parent' => $row['parent_id'],

'level' => $key+1,

'path' => $new_path . '_' . $row['categories_id'],

'next_id' => false);

 

if (isset($parent_id)) {

$tree[$parent_id]['next_id'] = $row['categories_id'];

}

 

$parent_id = $row['categories_id'];

 

if (!isset($first_id)) {

$first_id = $row['categories_id'];

}

 

$last_id = $row['categories_id'];

}

$tree[$last_id]['next_id'] = $tree[$value]['next_id'];

$tree[$value]['next_id'] = $first_id;

$new_path .= '_';

} else {

break;

}

}

}

tep_show_category($first_element);

 

$info_box_contents = array();

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

 

new infoBox($info_box_contents);

?>

</td>

</tr>

<!-- categories_eof //-->

 

Can anyone help?

 

Karen

Link to comment
Share on other sites

Hi

 

I upgraded from 1.60 to 2.00, and I grant my New signup customers Welcome Points amount 5 USD, but when I tried to create new customer, in create_account _success it gaves me message, that you are given 5 USD, but in my points php it shows you have no points yet.

As I tested on live shop, I promply returned to 1.6, and now not sure, did I something wrong, or someone else faces the same issue

Link to comment
Share on other sites

Thank you, Dusan. But, I still can not find it.

Is there a zip file on site where I can download it? Could you tell me how to do it step by step?

TC

How about clicking on the littel brown box with the little green arrow on the right side of the screen...

All zip's are there.

Link to comment
Share on other sites

nope, nothing :(

is there possibly a server-specific setting that could be barring the function of this?

i tried placing:

echo $points['customers_shopping_points'];

 

all over functions/redemptions.php to see if it will show my points, but nothing shown regardless of it if was after the $points query, beginning or end of the script

 

tried to place it on checkout_shipping and nothing shown either

your account shows points and druing checkout there are no points?

do you have a test account?

please PM me if you can or try using msn or yahoo.

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

Link to comment
Share on other sites

deep-silver, it seems as though you found the bug in my shop! what was it?

thank you again for taking the time to help me with this, if you ever set up a donation for this contrib you know where to find me! ;)

 

 

when i click "Auto Expire" from the admin panel, i get a white page... is that supposed to happen? how do i receive the "your points are about to expire" letter?

 

i set my points to expire on 2006-07-24 (yyyy-mm-dd), then clicked the auto-expire link but received no message in my customer test account

 

 

but when i receive the "you got new points" email, it says my points expire on mm-dd-yyyy ...does that make a difference?

Link to comment
Share on other sites

Sorry to be thick, but in the config page in the admin, i don't see anything related to the number of decimal...

5 from top is "set auto credit point" but i've read them all...

 

Did i miss something ? (i haven't installed yet the v2, i'm still on V1.6)

 

The thing is for order at zero, in the payment info page i'm still obliged to tick a mean of payment, and rewarding points are not "considered" as a mean apparently (as of course i can tick 2 boxes, paypal and redeemmed), but can't Untick one of the payment system...

 

Where should i look ? i thought since it's redeemed max are caculated against the order, when it states the max point = (make order =0), i haven't set any limit) , well i should be able to use redeemed as the ONLY mean of payment ?

 

My checkout_out payment page :

 

Sorry for the bandwidth, and thanks for this great module all round too, hope you could help :)

 

Steph

Get the latest version and follow the INSTALL.txt all would be fine

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

Link to comment
Share on other sites

Hi

 

I upgraded from 1.60 to 2.00, and I grant my New signup customers Welcome Points amount 5 USD, but when I tried to create new customer, in create_account _success it gaves me message, that you are given 5 USD, but in my points php it shows you have no points yet.

As I tested on live shop, I promply returned to 1.6, and now not sure, did I something wrong, or someone else faces the same issue

Make sure you haven't missed the install step in refer to catalog/creat_account.php

 

P.S= I took a look at your site(nice :thumbsup: ) , you should click on all module options just in order to show the last update date. it is missing from your http://www.hayshop.net/my_points_help.php/faq_item/1

missing the began date

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

Link to comment
Share on other sites

deep-silver, it seems as though you found the bug in my shop! what was it?

thank you again for taking the time to help me with this, if you ever set up a donation for this contrib you know where to find me! ;)

when i click "Auto Expire" from the admin panel, i get a white page... is that supposed to happen? how do i receive the "your points are about to expire" letter?

 

i set my points to expire on 2006-07-24 (yyyy-mm-dd), then clicked the auto-expire link but received no message in my customer test account

but when i receive the "you got new points" email, it says my points expire on mm-dd-yyyy ...does that make a difference?

When adding new contribution to your site you should dubble check who is posting it as well as don't just copy over files that are not new.

in your case you added easy checkout cont that made a problem with security. new my mode has done the job correct by not allowing the redeemption because the SID could not 100% verify hterefor Points/Reward V2.00 has consider it to be a fraud attampt.

The error was in your catalog/checkout_shipping.php (it took me more then 2.hr to track it down)

the file is so massy and at the bagning i did not want to tuch it because i toght it was your falt but after downloading the easy checkout mod and viewed the modifed files provided. I knew it wasent your falt(sorry :'( ) The modified files provided are massy as yours and includes other contribution in it. who ever created this mod did not modify new osCommerce file and insted he/she just posted his modified files thats way it look like that for you and anyone using the modified files provided.

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

The below 2files are ment to be used as cron job files thats way there is nothing on it.

admin/customers_points_credit.php (cron script)

admin/customers_points_expire.php (cron script)

i just added a link to those files from admin just for those users without the cron job options in thier server.

 

When u see a blank page its good(not good is when you see errors)

 

admin/customers_points_credit.php (cron script) will also show a blank page when there are no rows to update.

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

Link to comment
Share on other sites

When adding new contribution to your site you should dubble check who is posting it as well as don't just copy over files that are not new.

in your case you added easy checkout cont that made a problem with security. new my mode has done the job correct by not allowing the redeemption because the SID could not 100% verify hterefor Points/Reward V2.00 has consider it to be a fraud attampt.

wow! i did not know any of this, as the support topic was mostly clean for that contrib. i don't believe there were any files i copied over from it (i don't use the newest version, because i didn't want to mangle points & rewards).. but i see what you say and makes (a bit) of sense :thumbsup:

 

The error was in your catalog/checkout_shipping.php (it took me more then 2.hr to track it down)

ouch. i am forever greatful for your help, are you sure you won't accept a donation? :) i admire your work with points & rewards and being generous enough to offer it here for free, and to top it off you spotted so many bugs and problems on my site in one night... i don't think i could ever say thank you enough!

 

the file is so massy and at the bagning i did not want to tuch it because i toght it was your falt but after downloading the easy checkout mod and viewed the modifed files provided. I knew it wasent your falt(sorry :'( )

:lol: no problem, but THANK YOU for giving me a chance and seeing the contrib source !

 

 

The modified files provided are massy as yours and includes other contribution in it. who ever created this mod did not modify new osCommerce file and insted he/she just posted his modified files thats way it look like that for you and anyone using the modified files provided.

damn! that's messed up.. do you know of any way to potentiall spot problems in the future? i have only minor experience with php (all thanks to installing contributions on oscommerce and invision board)

 

The below 2files are ment to be used as cron job files thats way there is nothing on it.

admin/customers_points_credit.php (cron script)

admin/customers_points_expire.php (cron script)

i just added a link to those files from admin just for those users without the cron job options in thier server.

 

When u see a blank page its good(not good is when you see errors)

 

admin/customers_points_credit.php (cron script) will also show a blank page when there are no rows to update.

OH okay, i seen something mentioned of that in either the install or forum topic, but i wasn't sure. now if i run these will i receive the "your points about to expire" email? or is there something i need to configure

 

 

again, thank you so much for taking time out of your life to help me fix my problem and get this amazing contribution working. forever in debt to deep-silver :sweating:

Link to comment
Share on other sites

Hi deep-silver,

 

Thanks for this nice module!

 

I have installed V2.0, but it didn't gave me a chance to redeem my points on checkout...

As well on my_points.php it said "You don't have Qualified Points yet" although I had 100 points...

 

It was the field customers_points_expires in table customers which was NULL after installation.

Setting it to a date > than CURDATE() made the contribution work.

 

But, if you don't want that your customers points expire?

What should be changed and where?

 

Best regards

G?tz

Edited by texmaxx
Link to comment
Share on other sites

i installed the latest version of this today but its not showing up on the modules page inside admin... any suggestions?

it's under

admin -> configuration -> Points/Rewards v 2.00

 

oh wait, i think i know what you mean......

 

you don't have "Points Redeemptions"?

(under Modules -> Order Total)

Edited by eww
Link to comment
Share on other sites

i am still redirected to PAYPAL...

 

I would like to be redirected then to either checkout_process or checkout_success (i do not know what is best, i guess success otherwise it'd check if payment has been received ?)

 

I thought it did it automaticaly but if fact no... (or maybe it's because i've tried to install Paypal IPN and and uninstalled it afterwards ?)

 

thanks in advance for your precious help,

 

Steph

 

Did you get any help on this one? I have it all running good, but if you use Points to pay for entire order you are directed to PayPal. Does anyone have a good fix? I am running Paypal IPN v 3.1.5 and I did the mod listed earlier in this thread.

 

thx

2dogrc

Link to comment
Share on other sites

Hi deep-silver,

 

Thanks for this nice module!

 

I have installed V2.0, but it didn't gave me a chance to redeem my points on checkout...

As well on my_points.php it said "You don't have Qualified Points yet" although I had 100 points...

 

It was the field customers_points_expires in table customers which was NULL after installation.

Setting it to a date > than CURDATE() made the contribution work.

 

But, if you don't want that your customers points expire?

What should be changed and where?

 

Best regards

G?tz

Go to your admin and make sure that points expire options is empty to disable points expire you MUST leave it empty.

as well as make sure that you have the lates redemptions.php

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

Link to comment
Share on other sites

Hi,

 

I would like to set the display POINTS information on true. But the products how stand in Enable the Categories ID Restriction are not indicate the information. is it possible?

 

Thanks!

The points information shown in products info page

are points given.

The Restriction to products only apply on redeem not on award.

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

Link to comment
Share on other sites

Did you get any help on this one? I have it all running good, but if you use Points to pay for entire order you are directed to PayPal. Does anyone have a good fix? I am running Paypal IPN v 3.1.5 and I did the mod listed earlier in this thread.

 

thx

2dogrc

if the customer have enough points to cover the whole order includes shipping,tax, and others fees that may apply.

IF the customers points is bigger then the order total , the maximum points allowed will be use as a full payment option therefore you will be redirected to checkout_confirmation page so you don't need to use other payment method.

now if you have been directed to PayPal that mean the you have chosen paypal as your payment method.

You should carefully go over the install instracions in refer to checkout_confirmation.php

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

Link to comment
Share on other sites

if the customer have enough points to cover the whole order includes shipping,tax, and others fees that may apply.

IF the customers points is bigger then the order total , the maximum points allowed will be use as a full payment option therefore you will be redirected to checkout_confirmation page so you don't need to use other payment method.

now if you have been directed to PayPal that mean the you have chosen paypal as your payment method.

You should carefully go over the install instracions in refer to checkout_confirmation.php

 

Well, no matter what i'm doing at the mo', as the payment method

available from the site is only paypal, it is prechecked and have no choice, even when ticking the max points and then setting the order to pay at zero, i'm still redirected to Paypal (where an order of zero can't exist, so you're forced to put something different of zero in the box)...

 

Anyway, upgrading to V2, do i have to further modify the paypal_ipn.php file or the mods are still the same that they were in the V1.6 package ?

 

Steph

Link to comment
Share on other sites

Has anyone got the two images that should be next to View my Points Balance and Points received and Points and Redemptions FAQ. when you click on my Account to look at your points balance?

 

At the moment I am getting the Image not available image.

 

Thanks

Link to comment
Share on other sites

Ben

Go to your admin and make sure that points expire options is empty to disable points expire you MUST leave it empty.

as well as make sure that you have the lates redemptions.php

It does the trick eccept in my_points.php.

this select:

  $points_query = tep_db_query("SELECT customers_shopping_points, customers_points_expires FROM " . TABLE_CUSTOMERS . " WHERE customers_id = '" . (int)$customer_id . "' AND customers_points_expires > CURDATE()");

doesn't give a result as customers_points_expires is now set to 0000-00-00 which can't be > CURDATE().

I think, this query should help

  $points_query = tep_db_query("SELECT customers_shopping_points, customers_points_expires FROM " . TABLE_CUSTOMERS . " WHERE customers_id = '" . (int)$customer_id . "' AND (customers_points_expires > CURDATE() OR customers_points_expires = '0000-00-00')");

and we should ask than

  $points = tep_db_fetch_array($points_query);
//	$shopping_points = tep_get_shopping_points($customer_id);
 if (tep_db_num_rows($points_query)) {
?>
		  <td class="main"><?php echo sprintf(MY_POINTS_CURRENT_BALANCE, number_format($points['customers_shopping_points'],POINTS_DECIMAL_PLACES),$currencies->format(tep_calc_shopping_pvalue($points['customers_shopping_points']))); ?></td>
<?php
		if ($points['customers_points_expires'] == '0000-00-00') {
?>
		  <td class="main" align="right"><?php echo '<b>' . MY_POINTS_NEVER_EXPIRE . '</b>'; ?></td>
<?php
		} else {
?>
		  <td class="main" align="right"><?php echo '<b>' . MY_POINTS_EXPIRE . '</b> ' . tep_date_short($points['customers_points_expires']); ?></td>
<?php
		}
?>

and add the constant MY_POINTS_NEVER_EXPIRE to the languages files.

What do you think?

G?tz

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