Jump to content

Recommended Posts

14 minutes ago, raiwa said:

Hello Lyn @ce7,

I had a deeper look now and I believe you can do this easier.

If your problem is that with the header tag of the add-on you get the tax rate shown twice - once below the prices with tax and again below the prices without tax you should do the following:

In the core currency class duplicate and rename the "display_price" and "format" functions to something like "format_no_tax" and "display_price_no_tax".

Be aware to change also the function name used  in the "display_price_no_tax" function from "format" to "format_no_tax".

Then use the function "display_price_no_tax" to show the prices without tax in the product listing modules and elsewhere.

hi, @raiwa

As usual, very quick respond and thank  you so much for the solutions and all the help!
One more thing related to the Tax Info is that it will show up for the specials. I dont know if my idea make sense for shopping cart system, but i think it is not necessary to show strikethrough for both incl/excl (maybe instead show x% special off after price and before tax incl.) How can I delete / not showing strikethrough for specials? Which files and what part of codes should I go to try for?

image.png.2f61b206e2af334e3a71e73719a64618.png

Share this post


Link to post
Share on other sites

use te duplicated function for the striked through price

Share this post


Link to post
Share on other sites

@raiwa   Hi,

Come back again for help about the tax, this time is about specials. I have 2 tax rate, one is 10% and one is 7%, and just noticed that instead of showing 10% or 7% incl/excl, it is showing up total 17% tax rate for every special product. How can I change the code to make it work with right tax rate for special products?

Many thanks! Lyn

Share this post


Link to post
Share on other sites

@raiwa  hi again,

Quick update, after I post here, I quickly installed another specials addon to do the test, and found out that the tax rate did work, but it did have problem to show the right rate at first, so there are few default special products, need to get into categories, and refresh the tax rate, then it will show up the correct one, if no refresh, it will stay as 17% instead of 10% or 7% or tax free...

Thanks you!

Share this post


Link to post
Share on other sites

Hello Lyn @ce7,

Not sure if you have this solved now.

I just checked on my test store and all works as it should.

I created a second tax rate and tax class with 10% and applied it to one special product.

On specials.php I see 7% for the products with 7% tax class applied and 10% on the product I applied the 10% tax class.

If you apply 2 tax rates on the same tax class, of course you will get the sum of both showing on a product with this tax class.

Edited by raiwa

Share this post


Link to post
Share on other sites

@raiwahi Rainer,

Thank you very much for reply. Yes I have resolve the problem, not sure why, I did not add two tax on same product, but i have seperated tax rate, each product can choose 10% or 7% or no tax, not able to choose 2 tax rate at the same time...

The default of my installation seems just add 2 tax rate as 17%, but when I go to renew the 5 default products and change the tax rate,  refresh, then it works as it should be 10% or 7% as I set up....

Thanks!  Lyn

Share this post


Link to post
Share on other sites

Hi

Thanks for a great contribution. I am facing a problem. In my store there are 2 currencies. When i activate the Show Tax below price, it shows that tax but the product price is wrong. I have SEK as a default currency and when i switch from SEK to EURO the product price value shows the SEK price but just changes the Currency symbol to Euro. Please see the image below. Thanks for help in advance.

 

 

Screenshot_2.png

Screenshot_1.png

Share this post


Link to post
Share on other sites

Hello @micke salloum,

Is it possible that you have a modification/customization applied to the "format" and/or "display_price" function in includes/classes/currencies.php.

 

If yes, then you have to apply /merge these modifications with the class extension in the st_tax_below_price.php module.

See there at the end:

  if (class_exists('currencies')) {
    class currencies_mod extends currencies {
..........

 

Share this post


Link to post
Share on other sites
3 hours ago, raiwa said:

Hello @micke salloum,

Is it possible that you have a modification/customization applied to the "format" and/or "display_price" function in includes/classes/currencies.php.

 

If yes, then you have to apply /merge these modifications with the class extension in the st_tax_below_price.php module.

See there at the end:


  if (class_exists('currencies')) {
    class currencies_mod extends currencies {
..........

 

Thanks for the reply. Attached here is the currencies.php file in the includes/classes

Can you take a look and suggest the modifications? 

Thanks in advance

currencies.php

Share this post


Link to post
Share on other sites

Hello Micke @micke salloum,

As I suspected your currency class is heavy modified.

I'm sorry I can't merge the code without knowing what else is part of these modifications and without access to your whole store.

You should ask the developer who applied these changes to do it, if you didn't do it yourself.

Best regards

Rainer

Share this post


Link to post
Share on other sites

Uploaded Update for Phoenix:

Display Tax Info V3.5

Changelog Version 3.5

- updated instructions for Phoenix
- added modified options attributes product info module. (Supplied files are for Phoenix 1.0.2.x)
- added support for addons options images and QTPro.

Share this post


Link to post
Share on other sites

@raiwa
Sorry, don't know what I've done wrong - just installed on Phoenix and get:
Warning: Declaration of currencies_mod::display_price($products_price, $products_tax, $quantity = 1, $show_tax_info = true) should be compatible with currencies::display_price($products_price, $products_tax = 0, $quantity = 1) in //htdocs/includes/modules/store/st_tax_below_price.php on line 198

Edited by Heatherbell

Share this post


Link to post
Share on other sites

@raiwa

Works perfectly on my Phoenix 1.0.2.5

Maybe possibility for next version to add text also in attributes drop down list. 

Share this post


Link to post
Share on other sites
22 hours ago, MITCH70 said:

Maybe possibility for next version to add text also in attributes drop down list. 

In drop downs text formatting (html tags) doesn't work. That's why it is removed there.

WIthout formatting it doesn't look nice and I believe that custormers are smart enough to understand that the same tax like shown in all other places will apply also on attributes prices.

Share this post


Link to post
Share on other sites

Uploaded Update for Phoenix flagged for Phoenix:

Display Tax Info Phoenix

Changelog Version 4.0

- updated for Phoenix 1.0.3.x
- moved currencies_mod class extension into siteWide hook. This allows to use it also for modularized shopping cart and other modularized pages with content module call in data section of the page.

Share this post


Link to post
Share on other sites

Habe auf dem Webserver und lokal auf xampp

OSCOM CE Phoenix v1.0.4.0 installiert

PHP-Version bei Beiden: 7.2.9

Habe dann die Contrib:

https://apps.oscommerce.com/6ONOh&display-tax-info-phoenix  hochgeladen

Nachdem ich das Modul aktviert hatte, bekamm ich eine weiße Seite mit der Fehlermeldung

 

 

“Warning: Use of undefined constant MODULE_STORE_TAX_BELOW_PRICE_PAGES - assumed 'MODULE_STORE_TAX_BELOW_PRICE_PAGES' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\Shop13\includes\hooks\shop\siteWide\priceTax.php on line 31

Warning: Use of undefined constant MODULE_STORE_TAX_BELOW_PRICE_PAGES - assumed 'MODULE_STORE_TAX_BELOW_PRICE_PAGES' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\Shop13\includes\hooks\shop\siteWide\priceTax.php on line 34”

Nachdem ich das Modul aktviert hatte, bekamm ich eine weiße Seite mit der Fehlermeldung

“Fatal error: Uncaught Error: Class 'currencies_mod' not found in C:\xampp\htdocs\Shop13\includes\hooks\shop\siteWide\priceTax.php:45 Stack trace: #0 C:\xampp\htdocs\ Shop13\includes\classes\hooks.php(133): hook_shop_siteWide_priceTax->listen_injectAppTop(Array) #1 C:\xampp\htdocs\ Shop13\includes\application_top.php(413): hooks->call('siteWide', 'injectAppTop') #2 C:\xampp\htdocs\ Shop13\product_info.php(13): require('C:\\xampp\\htdocs...') #3 {main} thrown in C:\xampp\htdocs\ Shop13\includes\hooks\shop\siteWide\priceTax.php on line 45”

 

Was läuft bei mir falsch?

Share this post


Link to post
Share on other sites

Hallo Erich @infobroker,

Phoenix 1.0.4.0 introduced changes in the hooks registration in application_top.php which break several addons.

As far as I know this will be fixed in the next Phoenix update.

For now a fast fix is to use the includes/application_top.php from the previous Phoenix 1.0.3.0 version

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×