Jump to content

Recommended Posts

16 hours ago, raiwa said:

You can get the price without tax like this:


      $box_price_net = $currencies->display_price($random_product['products_price'], 0);

 

Hi Rainer,

Thank you, how do I show only image.png.ae11e3f553288bff3395c94f3ce86b32.png

but not image.png.cc59e8c9164f4f2ae540cad46e09415d.png... 

 

Lyn

Share this post


Link to post
Share on other sites
8 minutes ago, raiwa said:

Where, why?

Hi Rainer,

i modify the file: includes/classes/currencies.php,
show incl GST:  $this->calculate_price($products_price, $products_tax, $quantity)
show excl GST: $this->format($products_price, $quantity)

and with the includes/lauganges/english.php

define('IS_PRODUCT_SHOW_PRICE_SPECIAL', '<del>%s</del> <span class="text-danger">now %s</span>');

includes/modules/boxes/bm_whats_new.php or bm_specials.php

$box_price = sprintf(IS_PRODUCT_SHOW_PRICE_SPECIAL, $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])), $currencies->display_price($random_product['specials_new_products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])));



this will show up
image.png.b4973a25ae81a1df5afb4992b957a773.png
even with $currencies->display_price($random_product['products_price'], 0)

 

but I want to show only the 1st line <del>$165.00</del>, then 2nd line $148.50 and 3rd line (10% GST Incl.)

I think in this way, it is neater and easier to view for me.
 

Lyn

 

 

 

Share this post


Link to post
Share on other sites

The tax info is included through the div class:

    			$format_string .= '<div class="taxinfo"><small>';

duplicate and rename the format function and remove the class. Or remove this div class by javascript where you do not wish to showthe tax info.

I'm sorry. I can't give further support for this customization within this support thread.

Share this post


Link to post
Share on other sites
1 hour ago, Gold1s said:

Could you update mod to newest phoenix?

Thank you.

I just checked and found what I already supposed:

The tax info hook has no influence on the shown price, it only shows the tax info text and tax percentatge amount below the price.

I tested it on my Phoenix 1.0.7.9 develop store and all works correct, it only requires the admin cfg module to be updated.

Please use this one:

cfgm_store.php

If you want to do something extra, move the shop hook to templates/default/includes/hooks. But this is not required to work properly.

I believe what you reported has to do with your tax setup. Please explore your admin tax settings and tax zone setup.

Share this post


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

I just checked and found what I already supposed:

The tax info hook has no influence on the shown price, it only shows the tax info text and tax percentatge amount below the price.

I tested it on my Phoenix 1.0.7.9 develop store and all works correct, it only requires the admin cfg module to be updated.

Please use this one:

cfgm_store.php

If you want to do something extra, move the shop hook to templates/default/includes/hooks. But this is not required to work properly.

I believe what you reported has to do with your tax setup. Please explore your admin tax settings and tax zone setup.

I was uplad your file, but still currencies are wrong, when I have your file /includes/hooks/shop/siteWide/priceTax.php in my ftp.

When I deleteing this file - everything is OK.

My tax zones looks like this: https://take.ms/FfQSB

All setting are the same when I delete your file, and then everything works perfect, but when I upload your file - currency is wrong.

Thanks for reply.

Share this post


Link to post
Share on other sites

When you delete the hook, do you also uninstall the store module?

Share this post


Link to post
Share on other sites
1 minute ago, raiwa said:

When you delete the hook, do you also uninstall the store module?

No, when I delete the file from hook - currencies works OK, I don't need to uninstall everything.

But when I upload hook file - currency are wrong again.

Share this post


Link to post
Share on other sites
Posted (edited)

W hat do you you mean with currency is wrong? Currency symbol? Amount? Please give concrete examples. What is good what is wrong. Add screenshots.

Quote

, I don't need to uninstall everything.

Yes, you need, the add on consists in 2 parts, the hook and the store module. You can’t only delete the hook. Both work together.

Edited by raiwa

Share this post


Link to post
Share on other sites

And the reason for my question is: do you have the store module installed at all?

 

Share this post


Link to post
Share on other sites
Posted (edited)
47 minutes ago, raiwa said:

W hat do you you mean with currency is wrong? Currency symbol? Amount? Please give concrete examples. What is good what is wrong. Add screenshots.

Yes, you need, the add on consists in 2 parts, the hook and the store module. You can’t only delete the hook. Both work together.

Currency is wrong I mean on the frontpage, prices was shows all 4 currency in 1:1:1:1 - https://take.ms/JyuKM

But on admin panel I have setting like this: https://take.ms/xF0e1

So when I was delete file tax from hooks - everything is OK, prices have correctly value, not 1:1, but when I upload to ftp thix file to hooks - tax will show below the price, but price is e.g. 27 on every currency.

Like I said - when I delete hook - prices with currencies work OK, when I upload your file - gones wrong.

Edited by Gold1s

Share this post


Link to post
Share on other sites

Does this happen everywhere or only in the product page?

Share this post


Link to post
Share on other sites
Posted (edited)

If you have modified something where the price shows wrong, revert your changes and check.if it cures the problem. If it shows correct in other places like the cart, it’s your modification which breaks it, not my hook.

Edited by raiwa

Share this post


Link to post
Share on other sites
2 minutes ago, raiwa said:

If you have modified something where the price shows wrong, revert your changes and check.if it cures the problem. If it shows correct in other places like the cart, it’s your modification which breaks it, not my hook.

No raiva, sorry but I think it's because your hook coz problem is only, where price will show with info about tax.

e.g. here is ok - https://take.ms/XSXrB

And when your's mod is delete - everything with prices and currencies its ok.

Share this post


Link to post
Share on other sites

And I think smth wrong with this file: /includes/hooks/shop/siteWide/priceTax.php

Couse only if I delete it - prices are ok.

Share this post


Link to post
Share on other sites

I double check tomorrow but I can only say that this is in use since years in many shops an no one had any problem with it.

Share this post


Link to post
Share on other sites

Good Morning @Gold1s,

I could recreate the error now in multicurrencies.

Please await the update.

Share this post


Link to post
Share on other sites
2 minutes ago, raiwa said:

Good Morning @Gold1s,

I could recreate the error now in multicurrencies.

Please await the update.

Thank you bro, I'll been waiting ;)

Share this post


Link to post
Share on other sites

Hi @Gold1s,

I believe I found the error.

There was just one setting wrong in the display_price funcion of the hook:

In the tax hook find line 96:

      	return $this->format($this->calculate_price($products_price, $products_tax, $quantity), null, null, null, $products_tax, $show_tax_info);

and change to:

      	return $this->format($this->calculate_price($products_price, $products_tax, $quantity), true, null, null, $products_tax, $show_tax_info);

PLease try and confirm. I'll then upload the update.

Share this post


Link to post
Share on other sites
38 minutes ago, raiwa said:

Hi @Gold1s,

I believe I found the error.

There was just one setting wrong in the display_price funcion of the hook:

In the tax hook find line 96:


      	return $this->format($this->calculate_price($products_price, $products_tax, $quantity), null, null, null, $products_tax, $show_tax_info);

and change to:


      	return $this->format($this->calculate_price($products_price, $products_tax, $quantity), true, null, null, $products_tax, $show_tax_info);

PLease try and confirm. I'll then upload the update.

@raiwa brilliant! It's working.

Thank you bro, and have a nice day!

Share this post


Link to post
Share on other sites

Uploaded Update:

Display Tax Info V4.1

Compatibility:
Phoenix 1.0.7.7+
Tested with Phoenix 1.0.7.9
PHP 7.0 - 7.3

Changelog Version 4.1

- updated for Phoenix 1.0.7.7+
- fixed wrong setting in currencies class extension which prevented price calculation for multi currencies. Thanks to @Gold1s for the report
- moved siteWide hook to templates.
- updated admin cfg module
- updated currencies class extension to match core class
- added hook warning to store module

Share this post


Link to post
Share on other sites

Hi @raiwa,

as our shop is in Germany and some of our products are food or cosmetics there is no way around showing base prices.

We need only a simple version as we have no individual attribute prices.

With my  limited abilities I was able to create a hook/tab for the admin/categories and now I'm trying to get it working on the shop side by editing the shop hook priceTax as we need that anyway too.

I'd  need to get the baseprice factor and unit from the products table inside the  hook. Which works, but only for product_info.php but not any listings which is obviously caused by stupidly using global $product_info for getting product_id for select .

So if there is  way to get this working everywhere?

Best regards and TIA

Christoph

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

×