digitaldame Posted December 6, 2005 Share Posted December 6, 2005 Ok I've just installed POINTS AND REWARDS MODULE V1.60 Updated Nov. 26, 2005 Now I don't seem to have any errors thus far, but I must have missed something along the way as inmy admin section I don't have the module listed in the Orfer Total Modules. In the Configuration area of the Admin section I do have a Points/rewardsV1.60 and when I click on it all I get is a blank area where the empty table "Title" "Value" and "Action" is displayed. I assume it is empty because of the earlier problem with it not being listed in the module area and thus its have not be "installed." Can anyone point me in the right direction and help me find what step I missed, if any?? I'd appreciate the help!! -Jen Just fixed it :) Quote Link to comment Share on other sites More sharing options...
Guest Posted December 6, 2005 Share Posted December 6, 2005 How should I set on the auto download when the customer paid the points as payment? If the order status >2, it will be Free for download right? So how can I put the order status which auto confirm the customer using points as payment? Thanks Quote Link to comment Share on other sites More sharing options...
chooch Posted December 6, 2005 Share Posted December 6, 2005 Hi Before I ask for help on a sticky point, i would like to thank Deep-Silver once again for this super contribution! I have looked at the code supplied by Deep-Silver in the latest update that refers to getting the Points Balance, Value and Clickable Link in the Shopping Cart. It works fine, but Ihjave tried to get it to show in teh header and I ended up with thie following the closest I could get to it: <tr> <td class="headerCart" align="left"><font color="#000000"><?php echo TEXT_POINTS_BALANCE .': </font> ' ?><?php echo $currencies->$shopping_points = tep_get_shopping_points();' ' ?> </tr> i can't get the 'value', 'language' and 'clickable link' to sho up without destroying the code.. can anyone please let me know what code I should use to get the same info to show in the header? thanks Quote 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 More sharing options...
jewelrytrends Posted December 7, 2005 Share Posted December 7, 2005 Hi deep-silver, I'm using PHP Version: 4.4.1 (Zend: 1.3.0). Solved, thanks again for this great contrib Denice Quote Link to comment Share on other sites More sharing options...
deep-silver Posted December 7, 2005 Author Share Posted December 7, 2005 Hi Before I ask for help on a sticky point, i would like to thank Deep-Silver once again for this super contribution! I have looked at the code supplied by Deep-Silver in the latest update that refers to getting the Points Balance, Value and Clickable Link in the Shopping Cart. It works fine, but Ihjave tried to get it to show in teh header and I ended up with thie following the closest I could get to it: <tr> <td class="headerCart" align="left"><font color="#000000"><?php echo TEXT_POINTS_BALANCE .': </font>?' ?><?php echo $currencies->$shopping_points = tep_get_shopping_points();' ?' ?> </tr> i can't get the 'value', 'language' and 'clickable link' to sho up without destroying the code.. can anyone please let me know what code I should use to get the same info to show in the header? thanks first of all backup your catalog/includes/header.php now open this file and add the below code where you want it to show up inside the <tr> tag. <!-- #### Points/Rewards Module V1.60 BOF ####--> <?php if (tep_session_is_registered('customer_id')) { $shopping_points = tep_get_shopping_points($customer_id); if ($shopping_points > 0) { ?> <td align="left" valign="bottom" class="headerCart"><?php echo '<a href="' . tep_href_link(FILENAME_MY_POINTS) . '">'. TEXT_POINTS_BALANCE . '?' . TEXT_POINTS .'?'. number_format($shopping_points,2).'??'. TEXT_VALUE . $currencies->format(tep_calc_shopping_pvalue($shopping_points)).'</a>'; ?>??</td> <?php } } ?> <!-- #### Points/Rewards Module V1.60 EOF ####--> this will only show up when the customer is loged in and has points to show(we do not show zero values). You will have to ajust the look to fit your layout in your CSS. Good Luck P.S= the whole line is a clickable link to points info page. :thumbsup: Quote Remember - - - "STRESSED" spelled backwards "DESSERTS" Link to comment Share on other sites More sharing options...
chooch Posted December 7, 2005 Share Posted December 7, 2005 (edited) Hi Deep-Silver Thanks again, you got the code spot on. I changed the closing html ref link to suit the site and it looks good... Many thanks for helping out and always being on hand to offer support to those of us 'mere less' mortals :blink: Sayonara ================================= CHOOCH Edited December 7, 2005 by chooch Quote 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 More sharing options...
deep-silver Posted December 8, 2005 Author Share Posted December 8, 2005 (edited) i just installed the most recent version and i must say it works flawlessly. thank you for the admin/orders.php edit! it's a real time saver :Ddo you know when or if the points balance will show on the printable invoice? (to show the customer on their invoice they have $xx.xx to spend) Here is your hack for points info in admin/invoice Backup the file before!!!! open admin/invoice.php find this (start at approx. line no.82) <tr> <td class="main"><b><?php echo ENTRY_PAYMENT_METHOD; ?></b></td> <td class="main"><?php echo $order->info['payment_method']; ?></td> </tr> ....and add this direct after it..... <!-- #### Points/Rewards Module V1.60 BOF ####--> <?php $points_query = tep_db_query("select customers_shopping_points from " . TABLE_CUSTOMERS . " where customers_email_address = '" . $order->customer['email_address'] . "'"); $points = tep_db_fetch_array($points_query); if ($points['customers_shopping_points']>0) { echo '<tr><td class="main"><b>'. ENTRY_POINTS_BALANCE .'</b></td><td class="main">'. number_format($points['customers_shopping_points'],2) . '??['. $currencies->format($points['customers_shopping_points'] * REDEEM_POINT_VALUE).']</td></tr>'; } ?> <!-- #### Points/Rewards Module V1.60 EOF ####--> now open admin/includes/languages/english/invoice.php find this (line no.25) define('ENTRY_PAYMENT_METHOD', 'Payment Method:'); ..and add directly after it... define('ENTRY_POINTS_BALANCE', 'Points Balance:'); -------------------------------------------------------------------------------------------------------------------------- DONE! it will look like this..... Edited December 8, 2005 by deep-silver Quote Remember - - - "STRESSED" spelled backwards "DESSERTS" Link to comment Share on other sites More sharing options...
chooch Posted December 8, 2005 Share Posted December 8, 2005 (edited) Hi Deep-Silver thanks for the invoice update.... I just noticed that when in admin/orders.php the 'method of payment' doesn't show in the right hand box if Points were redeemed for the full transaction. This is also the case for the invoice itself... where the new text shows up with the points Balance, it does the words 'method of payment' but does not show the words Points (or shopping points). It can be seen in your jpeg above... it has your points balance in Points and redemption value but above it where it says method of payment, it does not show 'Points' if only points were used for the purchase All other methods of payments do come up (paypal, nochex, cash on delivery) but not 'Points' or 'Shopping Points' Maybe it would be possible to add that on too? Thanks Edited December 8, 2005 by chooch Quote 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 More sharing options...
Guest Posted December 8, 2005 Share Posted December 8, 2005 Here is your hack for points info in admin/invoiceBackup the file before!!!! thank you!!! this is probably one of my favorite contributions, extremely useful! :thumbsup: Quote Link to comment Share on other sites More sharing options...
onlineelektronik Posted December 9, 2005 Share Posted December 9, 2005 Hello :-) Its a wonderfull contrib :-" But two problems: 1. There is no name for shipping (payment_method), the field on the invoice is blank. 2. When the points are calulated in checkout_payment.php, it didn'd ad tax for the shipping costs. Example: product costs: 10,00 EUR(incl. 16% tax 1,38 EUR) shipping costs: 4,99 EUR (incl. 16% tax 0,69 EUR) It must be 14,99 EUR, and its calculated 14,30 EUR. Can anybody help me with tiss two problems ? Thanks in advance :-) Quote Link to comment Share on other sites More sharing options...
deep-silver Posted December 9, 2005 Author Share Posted December 9, 2005 Hi Deep-Silver thanks for the invoice update.... I just noticed that when in admin/orders.php the 'method of payment' doesn't show in the right hand box if Points were redeemed for the full transaction. This is also the case for the invoice itself... where the new text shows up with the points Balance, it does the words 'method of payment' but does not show the words Points (or shopping points). It can be seen in your jpeg above... it has your points balance in Points and redemption value but above it where it says method of payment, it does not show 'Points' if only points were used for the purchase All other methods of payments do come up (paypal, nochex, cash on delivery) but not 'Points' or 'Shopping Points' Maybe it would be possible to add that on too? Thanks Points are not reall payment just a sub for payment. its almost never happend that customers use points to cover the whole order, so not really an issue. oscommerce allow only one payment at the time so if you want to display points as payment method, it will replace any other payment used. i.e if the customers use points and paypal it will only show points. thats way i did not change the code + just by looking at the invoice you can tell that the payment is made by points Quote Remember - - - "STRESSED" spelled backwards "DESSERTS" Link to comment Share on other sites More sharing options...
deep-silver Posted December 9, 2005 Author Share Posted December 9, 2005 Hello :-) Its a wonderfull contrib :-" But two problems: 1. There is no name for shipping (payment_method), the field on the invoice is blank. 2. When the points are calulated in checkout_payment.php, it didn'd ad tax for the shipping costs. Example: product costs: 10,00 EUR(incl. 16% tax 1,38 EUR) shipping costs: 4,99 EUR (incl. 16% tax 0,69 EUR) It must be 14,99 EUR, and its calculated 14,30 EUR. Can anybody help me with tiss two problems ? Thanks in advance :-) your shipping cost are tex exclude? Quote Remember - - - "STRESSED" spelled backwards "DESSERTS" Link to comment Share on other sites More sharing options...
chooch Posted December 9, 2005 Share Posted December 9, 2005 Points are not reall payment just a sub for payment.its almost never happend that customers use points to cover the whole order, so not really an issue. oscommerce allow only one payment at the time so if you want to display points as payment method, it will replace any other payment used. i.e if the customers use points and paypal it will only show points. thats way i did not change the code + just by looking at the invoice you can tell that the payment is made by points ok.. i understand thanks :P Quote 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 More sharing options...
onlineelektronik Posted December 9, 2005 Share Posted December 9, 2005 your shipping cost are tex exclude? Hello :) the shippig costs are with tax, so 4,30 EUR net and 0,69 EUR Tax = 4,99 shipping costs. (same like products) The products are calculated correct, only the shipping costs are added without tax. Thanks :) "thats way i did not change the code" -> is it possible with a hack ? Quote Link to comment Share on other sites More sharing options...
heshy Posted December 9, 2005 Share Posted December 9, 2005 Hi - i have the sme problem thtat Digitaldame was suffering from - the link from 'configuration' in admin takes me to a pg that has no content as such and is not editable- i noticed that u said that u had fixed the problem digitaldame, so i was wondering i f u could pl. let me know what the solution was? thanks a lot. Quote Link to comment Share on other sites More sharing options...
Jari646 Posted December 13, 2005 Share Posted December 13, 2005 Hi :D I have to say great contribution !!! Work s like a charm and easy to install :thumbsup: But :blush: I have one minor problem. I m using contribution "Purchase Without Account" and I have to check every time when order comes, has the buyer made an account. I have to check will I accept points or delete them right away. Is there some resolution for this problem? Thanks in advance! Quote Link to comment Share on other sites More sharing options...
Guest Posted December 13, 2005 Share Posted December 13, 2005 i ran into a similar problem. so i got rid of PWA and made create_account look as if they are only typing their shipping address.. and at the bottom of the page i ask them to choose a password to check their order status :) i also edited "My Account" to read "Order Status" it won't fool everyone, but it works for most. Quote Link to comment Share on other sites More sharing options...
Jari646 Posted December 14, 2005 Share Posted December 14, 2005 i ran into a similar problem. so i got rid of PWA and made create_account look as if they are only typing their shipping address.. and at the bottom of the page i ask them to choose a password to check their order status :) i also edited "My Account" to read "Order Status" it won't fool everyone, but it works for most. That is one way to solve this problem. I have to think about it if better solution don t come up. But still I would like to keep PWA contribution. :( Quote Link to comment Share on other sites More sharing options...
deep-silver Posted December 15, 2005 Author Share Posted December 15, 2005 That is one way to solve this problem. I have to think about it if better solution don t come up. But still I would like to keep PWA contribution. :( there is a replay for this posted by a PWA user in this topics you just have to find it a few pages back. Quote Remember - - - "STRESSED" spelled backwards "DESSERTS" Link to comment Share on other sites More sharing options...
Guest Posted December 16, 2005 Share Posted December 16, 2005 Deep-silver - awesome contrib. I love it. I've installed it and (I thought) that it worked perfectly. No code errors, no problems with PHP - i think. THere's 1 small problem though. When somebody types in the amount of points they want to redeem, then proceeds to the next page. The points do not appear to have been removed from the title. There's no sign of the points system on the next page. I've checked the code and it 'seems' to be ok. Any suggestions? - i'm at www.firstposter.com - for a client. Alex. Quote Link to comment Share on other sites More sharing options...
Guest Posted December 16, 2005 Share Posted December 16, 2005 I'm not amazing with PHP but I think the problem might be here... this is the code from my checkout_confirmation.php ##### Points/Rewards Module V1.60 check for error BOF ####### if (USE_REDEEM_SYSTEM == 'true') { if (!tep_session_is_registered('customer_shopping_points_spending')) tep_session_register('customer_shopping_points_spending'); if (isset($HTTP_POST_VARS['customer_shopping_points_spending']) && (POINTS_LIMIT_EXACT == 'false')){ $customer_shopping_points_spending = $HTTP_POST_VARS['customer_shopping_points_spending']; } // customer can't use other then the exact amount when enabled if (isset($HTTP_POST_VARS['customer_shopping_points_spending']) && (POINTS_LIMIT_EXACT == 'true')){ $customer_shopping_points_spending = POINTS_EXACT_VALUE; } // register customer shopping points $customer_shopping_points = tep_get_shopping_points(); // customer can't use invalid points amount if ($customer_shopping_points < $customer_shopping_points_spending) { $customer_shopping_points_spending = 0; tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(REDEEM_SYSTEM_ERROR_POINTS), 'SSL')); } // customer can't use points over the max allowed if ($customer_shopping_points_spending > POINTS_MAX_VALUE) { $customer_shopping_points_spending = 0; tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(REDEEM_SYSTEM_ERROR_POINTS_MAX), 'SSL')); } } //force customers to select other payment method if the points total not enough to cover the cost. if (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')); } // customer can't use points over the order total if (tep_calc_shopping_pvalue($customer_shopping_points_spending) > $order->info['total']) { $customer_shopping_points_spending = 0; tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(REDEEM_SYSTEM_ERROR_POINTS_OVER), 'SSL')); } // 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 V1.60 EOF #################*/ the line in bold - should there not be an "if" statement here? And if this is correct, then maybe if I move that line to elsewhere it might work. It seems to be in another stamement? Maybe you can double check... Quote Link to comment Share on other sites More sharing options...
Guest Posted December 16, 2005 Share Posted December 16, 2005 This is my checkout_payment.php script - it looks like the script code in the header has been edited out - could this be the problem?? <script language="javascript"><!-- /* Points/Rewards Module V1.60 bof*/ function clearText(thefield){ if (thefield.defaultValue==thefield.value) thefield.value = "" } function validate(field) { var valid = "0123456789.," var ok = "yes"; var temp; for (var i=0; i<field.value.length; i++) { temp = "" + field.value.substring(i, i+1); if (valid.indexOf(temp) == "-1") ok = "no"; } if (ok == "no") { alert("<?php echo REDEEM_SYSTEM_JS_ERROR; ?>"); field.focus(); field.select(); } } var submitter = null; function submitFunction() { submitter = 1; } /* Points/Rewards Module V1.60 eof*/ var selected; function selectRowEffect(object, buttonSelect) { if (!selected) { if (document.getElementById) { selected = document.getElementById('defaultSelected'); } else { selected = document.all['defaultSelected']; } } if (selected) selected.className = 'moduleRow'; object.className = 'moduleRowSelected'; selected = object; // one button is not an array if (document.checkout_payment.payment[0]) { document.checkout_payment.payment[buttonSelect].checked=true; } else { document.checkout_payment.payment.checked=true; } } function rowOverEffect(object) { if (object.className == 'moduleRow') object.className = 'moduleRowOver'; } function rowOutEffect(object) { if (object.className == 'moduleRowOver') object.className = 'moduleRow'; } //--></script> Quote Link to comment Share on other sites More sharing options...
Jari646 Posted December 16, 2005 Share Posted December 16, 2005 there is a replay for this posted by a PWA user in this topics you just have to find it a few pages back. Thank s :D It was easy, if did it right? Anyway it seem to work :thumbsup: // start for check on PWA customers who should not get points if (!tep_session_is_registered('noaccount')) { #### Points/Rewards Module V1.60 balance customer points BOF #### // customer shoppping points account balanced if (USE_REDEEM_SYSTEM == 'true' && $customer_shopping_points_spending) { $customer_shopping_points = tep_get_shopping_points(); tep_set_shopping_points(($customer_shopping_points - $customer_shopping_points_spending), $customer_id); if ($customer_shopping_points_spending && DISPLAY_POINTS_REDEEMED == 'true') { tep_add_redeemed_points($customer_id, $insert_id, $customer_shopping_points_spending); } } // customer pending points added if ((USE_POINTS_SYSTEM == 'true') && ($order->info['total'] > 0) && (get_award_discounted($order) == true)) { $redemption_awards = get_redemption_awards($customer_shopping_points_spending); $points_toadd = get_points_toadd($order); if ((get_redemption_awards($customer_shopping_points_spending) == true) && ($points_toadd >0)) tep_add_pending_points($customer_id, $insert_id, $points_toadd); } #### Points/Rewards Module V1.60 balance customer points EOF ####*/ } // end for check on PWA customers who should not get points Quote Link to comment Share on other sites More sharing options...
deep-silver Posted December 17, 2005 Author Share Posted December 17, 2005 This is my checkout_payment.php script - it looks like the script code in the header has been edited out - could this be the problem?? <script language="javascript"><!-- /* Points/Rewards Module V1.60 bof*/ function clearText(thefield){ if (thefield.defaultValue==thefield.value) thefield.value = "" } function validate(field) { var valid = "0123456789.," var ok = "yes"; var temp; for (var i=0; i<field.value.length; i++) { temp = "" + field.value.substring(i, i+1); if (valid.indexOf(temp) == "-1") ok = "no"; } if (ok == "no") { alert("<?php echo REDEEM_SYSTEM_JS_ERROR; ?>"); field.focus(); field.select(); } } var submitter = null; function submitFunction() { submitter = 1; } /* Points/Rewards Module V1.60 eof*/ var selected; function selectRowEffect(object, buttonSelect) { if (!selected) { if (document.getElementById) { selected = document.getElementById('defaultSelected'); } else { selected = document.all['defaultSelected']; } } if (selected) selected.className = 'moduleRow'; object.className = 'moduleRowSelected'; selected = object; // one button is not an array if (document.checkout_payment.payment[0]) { document.checkout_payment.payment[buttonSelect].checked=true; } else { document.checkout_payment.payment.checked=true; } } function rowOverEffect(object) { if (object.className == 'moduleRow') object.className = 'moduleRowOver'; } function rowOutEffect(object) { if (object.className == 'moduleRowOver') object.className = 'moduleRow'; } //--></script> your order_total sort order is not at the right place. it should be after subtotal and before TOTAL Quote Remember - - - "STRESSED" spelled backwards "DESSERTS" Link to comment Share on other sites More sharing options...
Guest Posted December 18, 2005 Share Posted December 18, 2005 your order_total sort order is not at the right place.it should be after subtotal and before TOTAL Thanks very much. Is there any possibility you could provide a bit more detail, that will allow me to sort that out. I'm a bit of a PHP newbie. Thanks again, Alex. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.