Re: Rounding problem when converting from points to $ in Total Order
Quote:
Originally Posted by
nesum18
quick question here: how can i NOT display the points on the product info page and only have the points calculate during the checkout?
Thank you in advance.
Remove this chunk of code from the /includes/templates/your_template/templates/tpl_product_info_display.php.
Around line number 147
PHP Code:
<!--bof Product Reward Points block -->
<h2 id="productRewardPoints" class="productRewardPoints">
<?php
/**
* display the product reward points
*/
include($template->get_template_dir('/tpl_product_reward_points.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_product_reward_points.php');
?>
</h2>
<!--eof Product Reward Points block -->
Re: Rounding problem when converting from points to $ in Total Order
Quote:
Originally Posted by
countrycharm
Remove this chunk of code from the /includes/templates/your_template/templates/tpl_product_info_display.php.
Around line number 147
PHP Code:
<!--bof Product Reward Points block -->
<h2 id="productRewardPoints" class="productRewardPoints">
<?php
/**
* display the product reward points
*/
include($template->get_template_dir('/tpl_product_reward_points.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_product_reward_points.php');
?>
</h2>
<!--eof Product Reward Points block -->
I don't use this mod, but do have a suggestion for a future enhancement, perhaps adding some admin on/off switches for this code block so that one can control it from the admin makes sense.. this way folks don't have to do code edits..
Re: Rounding problem when converting from points to $ in Total Order
Quote:
Originally Posted by
DivaVocals
I don't use this mod, but do have a suggestion for a future enhancement, perhaps adding some admin on/off switches for this code block so that one can control it from the admin makes sense.. this way folks don't have to do code edits..
That feature would be nice. I really don't have the time but anyone can update the module or share the code which adds this feature, then it will be include.
Re: Rounding problem when converting from points to $ in Total Order
Quote:
Originally Posted by
countrycharm
anyone can update the module or share the code which adds this feature, then it will be include.
Yes I know.. was making a general suggestion for an enhancement, not to be construed as request to anyone in particular...:smile:
Re: Rounding problem when converting from points to $ in Total Order
Quote:
Originally Posted by
DivaVocals
Yes I know.. was making a general suggestion for an enhancement, not to be construed as request to anyone in particular...:smile:
I know that, I also know you are always out to help and suggest how to make things better. You are one of the nicest people I know. Thank you for been there when we need help and don't know what to do.
Re: Rounding problem when converting from points to $ in Total Order
Quote:
Originally Posted by
countrycharm
I know that, I also know you are always out to help and suggest how to make things better. You are one of the nicest people I know. Thank you for been there when we need help and don't know what to do.
HA!! that goes double back at ya..:smile:
Re: Rounding problem when converting from points to $ in Total Order
AWESOMEEEEEEEEEE :)
Thank you :D
Quote:
Originally Posted by
countrycharm
Remove this chunk of code from the /includes/templates/your_template/templates/tpl_product_info_display.php.
Around line number 147
PHP Code:
<!--bof Product Reward Points block -->
<h2 id="productRewardPoints" class="productRewardPoints">
<?php
/**
* display the product reward points
*/
include($template->get_template_dir('/tpl_product_reward_points.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_product_reward_points.php');
?>
</h2>
<!--eof Product Reward Points block -->
Re: Rounding problem when converting from points to $ in Total Order
Quote:
Originally Posted by
nesum18
AWESOMEEEEEEEEEE :)
Thank you :D
Glad I could help.:smile:
Re: Rounding problem when converting from points to $ in Total Order
For the option to show rewards points or not in the product pages a solution could be this:
in includes/templates/YOUR_TEMPLATES/tpl_product_info_display.php find:
PHP Code:
* display the product reward points
*/
include($template->get_template_dir('/tpl_product_reward_points.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_product_reward_points.php');
?>
</h2>
<!--eof Product Reward Points block -->
Modify in:
* display the product reward points
*/
if (SHOW_REWARD_POINTS_PRODUCT == '1')
{
include($template->get_template_dir('/tpl_product_reward_points.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_product_reward_points.php');
}
?>
</h2>
<!--eof Product Reward Points block -->
Then using Phpmyadmin or the zencart admin patch add the following:
PHP Code:
SELECT @cgi:=configuration_group_id FROM configuration_group WHERE configuration_group_title = 'Reward Points';
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 (NULL , 'Show rewards point in Product Page', 'SHOW_REWARD_POINTS_PRODUCT', '0', 'Display Reward Points in the product page?<br />0= No<br />1= Yes', @cgi, '1', NULL, now(), NULL , 'zen_cfg_select_option(array(''0'', ''1''), ');
Setting to 0 the new option will not show the points in the product pages, else if you set to 1 it will show points.
NOTE: Please check if it's all correct and there is not errors of any kind. If You think ity could be useful please add it to the modules ;-)
Re: Rounding problem when converting from points to $ in Total Order
Hi again,
hard work bring issues as long as solutions ;-)
First the issue: I found that when i was going to the details of an order the Rewards point shown were always 0, but if you go on the invoice module the Rewards point magically appeared. Simply in the order details the point were not shown.
it seems that the problem could be with this line in /admin/order.php around line 666
PHP Code:
<td align="right" class="'. str_replace('_', '-', $order->totals[$i]['class']) . '-Amount">' . $currencies->format($order->totals[$i]['value'], false) . '</td>' . "\n" .
If replaced with:
PHP Code:
<td align="right" class="'. str_replace('_', '-', $order->totals[$i]['class']) . '-Amount">' . $order->totals[$i]['text'] . '</td>' . "\n" .
all seems fine. Someone else got this error?
Zencart 1.51
Reward Point 2.1b