barco57 - thanks, I'll take a look at that & see if I can figure it out.
countrycharm, if I get it working I'll post the changed code.
barco57 - thanks, I'll take a look at that & see if I can figure it out.
countrycharm, if I get it working I'll post the changed code.
ahhh, got it
Here is the changed code block (fixed the <br />'s too:
Code:if ($display_normal_price == 0) { // don't show the $0.00 if(($display_msrp_price!='')&&($display_msrp_price!='0')){ $save=$display_msrp_price-$display_normal_price; $final_display_price = '<span class="smalltext1">' . TEXT_PRODUCT_MSRP . '<s>' . $currencies->display_price($display_msrp_price, zen_get_tax_rate($product_check->fields['products_tax_class_id'])) . '</s></span><br /> <span class="norm">' . TEXT_PRODUCT_OUR.$show_special_price . $show_sale_price . $show_sale_discount.'</span><br /> <span class="save">' . TEXT_PRODUCT_SAVE . $currencies->display_price($save, '') . '</span>' ; }else{ $final_display_price = $show_special_price . $show_sale_price . $show_sale_discount; } } else { if(($display_msrp_price!='')&&($display_msrp_price!='0')){ $save=$display_msrp_price-$display_normal_price; $final_display_price = '<span class="smalltext1">'.TEXT_PRODUCT_MSRP.'<s>'.$currencies->display_price($display_msrp_price, zen_get_tax_rate($product_check->fields['products_tax_class_id'])).'</s></span><br /> <span class="norm">'.TEXT_PRODUCT_OUR.$show_normal_price . $show_special_price . $show_sale_price . $show_sale_discount.'</span> <br /><span class="save">'.TEXT_PRODUCT_SAVE . $currencies->display_price($save, '') . '</span>' ; }else{ $final_display_price = $show_normal_price . $show_special_price . $show_sale_price . $show_sale_discount; } } // If Free, Show it
Is your site Upgraded to the current version 1.5.4 Yet?
zencart-upgrades-website-installation
I *think*
instead of:
useCode:if ($display_normal_price == 0) { // don't show the $0.00 if(($display_msrp_price!='')&&($display_msrp_price!='0')){ $save=$display_msrp_price-$display_normal_price; $final_display_price = '<span class="smalltext1">' . TEXT_PRODUCT_MSRP . '<s>' . $currencies->display_price($display_msrp_price, zen_get_tax_rate($product_check->fields['products_tax_class_id'])) . '</s></span><br /> <span class="norm">' . TEXT_PRODUCT_OUR.$show_special_price . $show_sale_price . $show_sale_discount.'</span><br /> <span class="save">' . TEXT_PRODUCT_SAVE . $currencies->display_price($save, '') . '</span>' ; }else{ $final_display_price = $show_special_price . $show_sale_price . $show_sale_discount; } } else { if(($display_msrp_price!='')&&($display_msrp_price!='0')){ $save=$display_msrp_price-$display_normal_price; $final_display_price = '<span class="smalltext1">'.TEXT_PRODUCT_MSRP.'<s>'.$currencies->display_price($display_msrp_price, zen_get_tax_rate($product_check->fields['products_tax_class_id'])).'</s></span><br /> <span class="norm">'.TEXT_PRODUCT_OUR.$show_normal_price . $show_special_price . $show_sale_price . $show_sale_discount.'</span> <br /><span class="save">'.TEXT_PRODUCT_SAVE . $currencies->display_price($save, '') . '</span>' ; }else{ $final_display_price = $show_normal_price . $show_special_price . $show_sale_price . $show_sale_discount; } }
But I think this might affect all of your prices even if not using an msrp for the product.Code:if ($display_normal_price == 0) { // don't show the $0.00 if(($display_msrp_price!='')&&($display_msrp_price!='0')){ $save=$display_msrp_price-$display_normal_price; $final_display_price = '<span class="smalltext1">' . TEXT_PRODUCT_MSRP . '<s>' . $currencies->display_price($display_msrp_price, zen_get_tax_rate($product_check->fields['products_tax_class_id'])) . '</s></span><br /> <span class="smalltext1">' . TEXT_PRODUCT_OUR.$show_special_price . $show_sale_price . $show_sale_discount.'</span><br /> <span class="save">' . TEXT_PRODUCT_SAVE . $currencies->display_price($save, '') . '</span>' ; }else{ $final_display_price = $show_special_price . $show_sale_price . $show_sale_discount; } } else { if(($display_msrp_price!='')&&($display_msrp_price!='0')){ $save=$display_msrp_price-$display_normal_price; $final_display_price = '<span class="smalltext1">'.TEXT_PRODUCT_MSRP.'<s>'.$currencies->display_price($display_msrp_price, zen_get_tax_rate($product_check->fields['products_tax_class_id'])).'</s></span><br /> <span class="smalltext1">'.TEXT_PRODUCT_OUR.$show_normal_price . $show_special_price . $show_sale_price . $show_sale_discount.'</span> <br /><span class="save">'.TEXT_PRODUCT_SAVE . $currencies->display_price($save, '') . '</span>' ; }else{ $final_display_price = $show_normal_price . $show_special_price . $show_sale_price . $show_sale_discount; } }
I figured it out. Its actually where the <s> is placed that makes it work were you want it to be. Thank you .
// don't show the $0.00
if(($display_msrp_price!='')&&($display_msrp_price!='0')){
$save=$display_msrp_price-$display_normal_price;
$final_display_price = '<span class="smalltext1"><s>'. TEXT_PRODUCT_MSRP.$currencies->display_price($display_msrp_price, zen_get_tax_rate($product_check->fields['products_tax_class_id'])) .'</s></span><br />
<span class="norm">' . TEXT_PRODUCT_OUR.$show_special_price . $show_sale_price . $show_sale_discount.'</span><br />
<span class="save">' . TEXT_PRODUCT_SAVE . $currencies->display_price($save, '') . '</span>' ;
}else{
$final_display_price = $show_special_price . $show_sale_price . $show_sale_discount;
}
} else {
if(($display_msrp_price!='')&&($display_msrp_price!='0')){
$save=$display_msrp_price-$display_normal_price;
$final_display_price = '<span class="smalltext1"><s>'.TEXT_PRODUCT_MSRP.$currencies->display_price($display_msrp_price, zen_get_tax_rate($product_check->fields['products_tax_class_id'])).'</s></span><br />
<span class="norm">'.TEXT_PRODUCT_OUR.$show_normal_price . $show_special_price . $show_sale_price . $show_sale_discount.'</span>
<br /><span class="save">'.TEXT_PRODUCT_SAVE . $currencies->display_price($save, '') . '</span>' ;
}else{
$final_display_price = $show_normal_price . $show_special_price . $show_sale_price . $show_sale_discount;
}
}
// If Free, Show it
Is your site Upgraded to the current version 1.5.4 Yet?
zencart-upgrades-website-installation
@lankeeyankee
I am now trying to merge the files between the MAP PRICING and MSRP mods and have a couple of questions I hope you can help me with:
1. is function_prices the only file that modifies the same code?
2. I have simply been adding the code snippets marked by his comments to my pages. Will that work or do I have to be more precise?
3. I noticed in update_product that some of the coding is just a bit different and I think it relates to the dbase.
For example: this is code from the MAP PRICING MOD:
and this is code from my file:Code:'manufacturers_id' => zen_db_prepare_input($_POST['manufacturers_id']),
I do not have a dbase prefix, what is the best course of action here?Code:'manufacturers_id' => $manufacturers_id,
Any help you can provide is greatly appreciated.
Thank you,
autoace
Hello.
I would like to ask you about this Contrib MSRP.
I use prices in the eshop with a tax and i would like to use tax in field YOU SAVE.
Now this works without tax included in savings (not show saved price with tax). Does everybody know how can i do it.
PLEASE
Thank you.
I am sorry for my english. I am foreigner
I search for solution of this problem in this thread by fourtimes and try some examples from there but i dont find right solution.
I think that is a right option of displaying in this. (from readme.txt of this contrib).:
Is it true?Find:
if ($display_normal_price == 0) {
// don't show the $0.00
$final_display_price = $show_special_price . $show_sale_price . $show_sale_discount;
} else {
$final_display_price = $show_normal_price . $show_special_price . $show_sale_price . $show_sale_discount;
}
Replace with:
if ($display_normal_price == 0) {
// don't show the $0.00
if(($display_msrp_price!='')&&($display_msrp_price!='0')){
$final_display_price = '<span class="smalltext1"><s>'.TEXT_PRODUCT_MSRP.$currencies->display_price($display_msrp_price, zen_get_tax_rate($product_check->fields['products_tax_class_id'])).'</s></span><br><span class="save">'.TEXT_PRODUCT_SAVE . number_format((($display_msrp_price - $display_normal_price) / $display_msrp_price), 2, '.', '') * 100 . '% '.'</span><br><span class="norm">'.TEXT_PRODUCT_OUR.$show_special_price . $show_sale_price . $show_sale_discount.'</span>' ;
}else{
$final_display_price = $show_special_price . $show_sale_price . $show_sale_discount;
}
} else {
if(($display_msrp_price!='')&&($display_msrp_price!='0')){
$final_display_price = '<span class="smalltext1"><s>'.TEXT_PRODUCT_MSRP.$currencies->display_price($display_msrp_price, zen_get_tax_rate($product_check->fields['products_tax_class_id'])).'</s></span><br><span class="save">'.TEXT_PRODUCT_SAVE . number_format((($display_msrp_price - $display_normal_price) / $display_msrp_price), 2, '.', '') * 100 . '% '.'</span><br><span class="norm">'.TEXT_PRODUCT_OUR.$show_normal_price . $show_special_price . $show_sale_price . $show_sale_discount.'</span>' ;
}else{
$final_display_price = $show_normal_price . $show_special_price . $show_sale_price . $show_sale_discount;
}
}
And Now i have this text instead of text in green colour:
The text in blue color is off for this time.if ($display_normal_price == 0) {
// don't show the $0.00
if(($display_msrp_price!='')&&($display_msrp_price!='0')){
if ($display_normal_price = $display_msrp_price){
$final_display_price = $show_normal_price . $show_special_price . $show_sale_price . $show_sale_discount;
}
else
{
$save=$display_msrp_price-$display_normal_price;
//-DISPLAY WITH MONEY SAVE and WITHOUT PERCENT SAVE-//
$final_display_price = '<span class="smalltext1">' . TEXT_PRODUCT_MSRP . '<s>' . $currencies->display_price($display_msrp_price, zen_get_tax_rate($product_check->fields['products_tax_class_id'])) . '</s></span><br><span class="save">' . TEXT_PRODUCT_SAVE . $currencies->display_price($save, '') . '</span><br><span class="norm">' . TEXT_PRODUCT_OUR.$show_special_price . $show_sale_price . $show_sale_discount.'</span>' ;
//-DISPLAY MONEY SAVE and WITH PERCENT SAVE-//
//$final_display_price = '<span class="smalltext1">' . TEXT_PRODUCT_MSRP . '<s>' . $currencies->display_price($display_msrp_price, zen_get_tax_rate($product_check->fields['products_tax_class_id'])) . '</s></span><br><span class="save">' . TEXT_PRODUCT_SAVE .$currencies->display_price($save, '') . ' ('. number_format((($display_msrp_price - $display_normal_price) / $display_msrp_price), 2, '.', '') * 100 . '%)' . '</span><br><span class="norm">' . TEXT_PRODUCT_OUR.$show_special_price . $show_sale_price . $show_sale_discount.'</span>' ;
}}else{
$final_display_price = $show_special_price . $show_sale_price . $show_sale_discount;
}
} else {
if(($display_msrp_price!='')&&($display_msrp_price!='0')){
if ($display_normal_price >= $display_msrp_price){
$final_display_price = $show_normal_price . $show_special_price . $show_sale_price . $show_sale_discount;
}
else{
$save=$display_msrp_price-$display_normal_price;
//-DISPLAY MONEY SAVE and WITHOUT PERCENT SAVE-//
$final_display_price = '<span class="smalltext1">'.TEXT_PRODUCT_MSRP.'<s>'.$currencies->display_price($display_msrp_price, zen_get_tax_rate($product_check->fields['products_tax_class_id'])).'</s></span><br><span class="save">'.TEXT_PRODUCT_SAVE . $currencies->display_price($save, '') . '</span><br><span class="norm">'.TEXT_PRODUCT_OUR.$show_normal_price . $show_special_price . $show_sale_price . $show_sale_discount.'</span>' ;
//-DISPLAY MONEY SAVE and WITH PERCENT SAVE-//
//$final_display_price = '<span class="smalltext1">'.TEXT_PRODUCT_MSRP.'<s>'.$currencies->display_price($display_msrp_price, zen_get_tax_rate($product_check->fields['products_tax_class_id'])).'</s></span><br><span class="save">'.TEXT_PRODUCT_SAVE .$currencies->display_price($save, '').' ('. number_format((($display_msrp_price - $display_normal_price) / $display_msrp_price), 2, '.', '') * 100 . '%)'.'</span><br><span class="norm">'.TEXT_PRODUCT_OUR.$show_normal_price . $show_special_price . $show_sale_price . $show_sale_discount.'</span>' ;
}}else{
$final_display_price = $show_normal_price . $show_special_price . $show_sale_price . $show_sale_discount;
}
}
Thank you for your help
Last edited by HATER; 17 Dec 2009 at 09:07 AM.
But this solution dont show save with icluded tax.
Do you have other solution for this problem please? I dont know how make it right
Thank you
Bookmarks