- Posts: 73
- Thank you received: 0
Product with custom fields, wrong total price
11 years 3 months ago #205769
by sokartch
Product with custom fields, wrong total price was created by sokartch
-- HikaShop version -- : 2.5.0
Hello
I have product with custom fields. I add this product twice to cart (with different options). I got one error in the total price. It seems that the total price in this case contain the tax again. Also the tax is not correct.
Regards,
Petar Ristanovic
www.sokart.ch
Hello
I have product with custom fields. I add this product twice to cart (with different options). I got one error in the total price. It seems that the total price in this case contain the tax again. Also the tax is not correct.
Regards,
Petar Ristanovic
www.sokart.ch
Please Log in or Create an account to join the conversation.
11 years 3 months ago #205770
by nicolas
Replied by nicolas on topic Product with custom fields, wrong total price
Hi,
We would need more information on the issue to be able to say anything.
Could you do a screenshot of the settings of your product ?
Could you give a direct link to that product ?
Could you provide a screenshot of your tax rules listing (menu System>Taxes) so that we can see how you configured your taxes ?
We would need more information on the issue to be able to say anything.
Could you do a screenshot of the settings of your product ?
Could you give a direct link to that product ?
Could you provide a screenshot of your tax rules listing (menu System>Taxes) so that we can see how you configured your taxes ?
Please Log in or Create an account to join the conversation.
11 years 3 months ago - 11 years 3 months ago #205836
by sokartch
Replied by sokartch on topic Product with custom fields, wrong total price
Hi,
Please move this topic to the right category
Product settings are attached. (first four)
Direkt link:
www.sokart.ch/cms/e-shop/nach-kategorien...asergravur-kleopatra
Tax settings are attached. (last two). Info: If I set Tax to 0% then is the total price OK!
Regards,
Petar Ristanovic
Please move this topic to the right category
Product settings are attached. (first four)
Direkt link:
www.sokart.ch/cms/e-shop/nach-kategorien...asergravur-kleopatra
Tax settings are attached. (last two). Info: If I set Tax to 0% then is the total price OK!
Regards,
Petar Ristanovic
Last edit: 11 years 3 months ago by sokartch.
Please Log in or Create an account to join the conversation.
11 years 3 months ago #205958
by nicolas
Replied by nicolas on topic Product with custom fields, wrong total price
Hi,
Could you try switching the "round prices during calculations" setting and/or the "floating taxed prices" setting of the HikaShop configuration ?
Could you try switching the "round prices during calculations" setting and/or the "floating taxed prices" setting of the HikaShop configuration ?
Please Log in or Create an account to join the conversation.
11 years 3 months ago - 11 years 3 months ago #206100
by sokartch
Replied by sokartch on topic Product with custom fields, wrong total price
Hi
When I "order" two items of the same product with different user defined fields data 25 pieces * 4 francs + 25 pieces * 4 francs = 200 francs
Without "Round prices during calculations"
Zwischensumme 555,56 CHF
MwSt. 370,37 CHF
Summe 555,56 CHF (instead of 200.00)
Wihh "Round prices during calculations"
Zwischensumme 560,00 CHF
MwSt. 375,00 CHF
Summe 560,00 CHF (instead of 200.00)
If I "order" 50 pieces * 4 francs = 200 francs
Zwischensumme 200,00 CHF
MwSt. 14,81 CHF
Summe 200,00 CHF
When I choose tax category for product with 0% tax (instead of 8%)
Summe 185,19 CHF
Direct link to product:
sokart.ch/cms/e-shop/nach-kategorien/kat...asergravur-kleopatra
When I "order" two items of the same product with different user defined fields data 25 pieces * 4 francs + 25 pieces * 4 francs = 200 francs
Without "Round prices during calculations"
Zwischensumme 555,56 CHF
MwSt. 370,37 CHF
Summe 555,56 CHF (instead of 200.00)
Wihh "Round prices during calculations"
Zwischensumme 560,00 CHF
MwSt. 375,00 CHF
Summe 560,00 CHF (instead of 200.00)
If I "order" 50 pieces * 4 francs = 200 francs
Zwischensumme 200,00 CHF
MwSt. 14,81 CHF
Summe 200,00 CHF
When I choose tax category for product with 0% tax (instead of 8%)
Summe 185,19 CHF
Direct link to product:
sokart.ch/cms/e-shop/nach-kategorien/kat...asergravur-kleopatra
Last edit: 11 years 3 months ago by sokartch.
Please Log in or Create an account to join the conversation.
11 years 3 months ago #206251
by nicolas
Replied by nicolas on topic Product with custom fields, wrong total price
As we're not able to reproduce the issue on our end, could you provide a backend access along with a link to this thread via our contact form so that we could check your settings ?
www.hikashop.com/support/contact-us.html
www.hikashop.com/support/contact-us.html
Please Log in or Create an account to join the conversation.
11 years 3 months ago - 11 years 3 months ago #206600
by sokartch
Replied by sokartch on topic Product with custom fields, wrong total price
Last edit: 11 years 3 months ago by sokartch.
Please Log in or Create an account to join the conversation.
11 years 3 months ago #206732
by nicolas
Replied by nicolas on topic Product with custom fields, wrong total price
Hi,
Please understand that such issues require time to debug as they are quite complex.
It seems to come from a bug with some versions of PHP where the cloning of objects is not done properly.
Change the code:
to:
and add the code:
before the line:
in the file administrator/components/com_hikashop/classes/currency.php and that should fix the problem.
For the other issue, please try to create new threads for new questions. I tried to look at that other issue on your website but I wasn't able to access your HikaShop configuration with the user access you provided which is a requirement to be able to look at the problem.
Please understand that such issues require time to debug as they are quite complex.
It seems to come from a bug with some versions of PHP where the cloning of objects is not done properly.
Change the code:
Code:
$element->prices[]=(!HIKASHOP_PHP5) ? $price : clone($price);
Code:
$element->prices[] = $this->_copy($price);
Code:
function _copy(&$src){
if(is_array($src)){
$array = array();
foreach($src as $k => $v){
$array[$k]=$this->_copy($v);
}
return $array;
}elseif(is_object($src)){
$obj = new stdClass();
foreach(get_object_vars($src) as $k => $v){
$obj->$k=$this->_copy($v);
}
return $obj;
}else{
return $src;
}
}
Code:
function convertPrice(&$element,&$currencies,$currency_id,$main_currency){
For the other issue, please try to create new threads for new questions. I tried to look at that other issue on your website but I wasn't able to access your HikaShop configuration with the user access you provided which is a requirement to be able to look at the problem.
The following user(s) said Thank You: sokartch
Please Log in or Create an account to join the conversation.
11 years 3 months ago #206870
by sokartch
Replied by sokartch on topic Product with custom fields, wrong total price
Hi
> Please understand that such issues require time to debug as they are quite complex.
OK, I see.
The prices are now OK. Thank YOU!
> Please understand that such issues require time to debug as they are quite complex.
OK, I see.
The prices are now OK. Thank YOU!
Please Log in or Create an account to join the conversation.
Time to create page: 0.201 seconds