Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Display Tax Info V3.0


raiwa

Recommended Posts

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.

Link to comment
Share on other sites

Link to comment
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.

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

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
Link to comment
Share on other sites

Link to comment
Share on other sites

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
Link to comment
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.

Link to comment
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.

Link to comment
Share on other sites

Good Morning @Gold1s,

I could recreate the error now in multicurrencies.

Please await the update.

Link to comment
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.

Link to comment
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!

Link to comment
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

Link to comment
Share on other sites

  • 3 weeks later...

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

Link to comment
Share on other sites

Hi Christoph,

Sorry, but this has nothing to do with this addon other than that you are using the hook to add some different custom coding.

Link to comment
Share on other sites

You could create your own topic and provide more info:

  • What you are trying
  • Code you have already added
Link to comment
Share on other sites

  • 3 months later...

Hi @gsmiley007,

For sure it needs to be updated:

Quote

Compatibility:
Phoenix 1.0.7.7+
Tested with Phoenix 1.0.7.9

I believe this will happen for the  1.0.8.0 release.

Edited by raiwa
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...