mone_willo Posted February 21, 2006 Posted February 21, 2006 In the catalog area, I want to display text "incl tax" beside prices when the prices are set to DISPLAY_WITH_TAX = true or display 'excl tax' beside prices when the prices are set to DISPLAY_WITH_TAX = false I've been searching the forum topics but i have not been able to find a solution for the above problem...can someone please help/advise...Tx.
mone_willo Posted February 21, 2006 Author Posted February 21, 2006 Hey guys ...thanks in advance for any help rendered!! :-" I am hoping for a quick response...as i would like... to display this text to indicate to customers when prices include tax or not tx.
boxtel Posted February 21, 2006 Posted February 21, 2006 Hey guys ...thanks in advance for any help rendered!! :-" I am hoping for a quick response...as i would like... to display this text to indicate to customers when prices include tax or not tx. in class currencies.php: change: function display_price($products_price, $products_tax, $quantity = 1) { return $this->format(tep_add_tax($products_price, $products_tax) * $quantity); } into: function display_price($products_price, $products_tax, $quantity = 1) { if (DISPLAY_WITH_TAX) { $tax_text = 'incl. tax'; } else { $tax_text = 'excl. tax'; } return $tax_text . ' ' . $this->format(tep_add_tax($products_price, $products_tax) * $quantity); } Treasurer MFC
mone_willo Posted February 21, 2006 Author Posted February 21, 2006 in class currencies.php:change: function display_price($products_price, $products_tax, $quantity = 1) { return $this->format(tep_add_tax($products_price, $products_tax) * $quantity); } into: function display_price($products_price, $products_tax, $quantity = 1) { if (DISPLAY_WITH_TAX) { $tax_text = 'incl. tax'; } else { $tax_text = 'excl. tax'; } return $tax_text . ' ' . $this->format(tep_add_tax($products_price, $products_tax) * $quantity); } Thank you for your help ....it worked!
hamramr Posted September 23, 2011 Posted September 23, 2011 Thanks a lot for this help, it's so usefull for me, but I have a question about this. This solution shows always the text "incl tax" but, if you want to show nothing sometimes? I try to explain it: it depends on the Location of the customer, the text "incl. tax" appears or not. Do you know the answer please? Thank you so much.
hamramr Posted September 23, 2011 Posted September 23, 2011 Thanks a lot for this help, it's so usefull for me, but I have a question about this. This solution shows always the text "incl tax" but, if you want to show nothing sometimes? I try to explain it: it depends on the Location of the customer, the text "incl. tax" appears or not. Do you know the answer please? Thank you so much. I found a solution, if someone need it: function display_price($products_price, $products_tax, $quantity = 1) { if (DISPLAY_WITH_TAX && $products_tax!=0) { $tax_text = '<span class="smallText"><em>IVA incluido<em></span>'; } else { $tax_text = ''; } return $this->format(tep_add_tax($products_price, $products_tax) * $quantity).' '.$tax_text; } I don't know if it's the best way but it works! Thanks a lot.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.