1. ptrouw
  2. RO CSVI
  3. Monday, 02 January 2017
  4.  Subscribe via email
Hi Roland,
Happy new year to you.

I am trying to export a google shopping XML field. I have only one problem. Getting the price right.
basepriceiwithtax is exporting 0.00. So I tried product price, in my case 71,90. But this is without Tax. So I added a rule, tried both 1,21 as multiplication and 21% as an addition, but both methods result in wrong price.
It shows 85.91 instead of 87.00. Somehow the calculation is taking 71 instead of 71.90.
Can this be somehow caused by the . versus , as a separator. I tried both. But doesn't seem to make a difference.
Any ideas?

Using 3.0.16
j3.6.5
CSVI 6.6.4
Accepted Answer Pending Moderation
Fixed, it was the separator. I have to use the point! But now I have to solve rounding, because result is 86.999.
This is because baseprice is 71.90083. But CSVI is using 71.90!
If I use setting number of decimals to 5, the end price shows: 87.0000043

Any way to solve this rounding? Google needs 2 decimals!
Or should I use another price field all together?
  1. more than a month ago
  2. RO CSVI
  3. # 1
Accepted Answer Pending Moderation
Hello,

Happy New Year to you as well.

Getting the price right.
Can't you use the salesprice field? That should be the price including tax.
Kind regards,

RolandD

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 2
Accepted Answer Pending Moderation
salesprice is without tax! That's why I am trying the added rules, salesprice times 1.21 or salesprice + percentage 21%.
  1. more than a month ago
  2. RO CSVI
  3. # 3
Accepted Answer Pending Moderation
Hello,
Any way to solve this rounding? Google needs 2 decimals!
Or should I use another price field all together?

In your template settings on File tab, set Number of decimals to 2 and see if it helps.
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 4
Accepted Answer Pending Moderation
Hello,
As Roland said you need to use salesprice field in your export. This field is price+tax which is calculated on the fly and not stored in database. If you don't see this field with tax then try set a shoppergroup to your prices. You don't need a rule for calculating this.
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 5
Accepted Answer Pending Moderation
Hi Thauna,

Setting the 2 decimals doesn't do the job.
What also tried, is using the default shoppergroup with id = 1 , but if I use this setting I am getting no records at all. I also tried to add a new admin user who is in the same shopper group but no luck.

But back to my original approach and use the rules to add tax to salesprice, this is almost working, except the rounding thing.
So salesprice is 71.90083 x 1,21, this would results in 87,0000. But CSVI is using 71.90 x 1,21 and result is 86.999. Even with the setting to 2 digits!
Any idea solving this?
  1. more than a month ago
  2. RO CSVI
  3. # 6
Accepted Answer Pending Moderation
Hello,

What I wonder is why for you the salesprice is excluding tax. If we look at the Product pricing documentation it lists this field as the one to use.

Do you have any specific setup for your prices?

If you want to solve the rounding of the digits, there are two ways of doing that. First would be to code your own rule plugin that does everything you need. Second option would be to create a template override in which you modify the value.
Kind regards,

RolandD

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 7
Accepted Answer Pending Moderation
These are my prices in product table. As you can see, prices without tax, only tax_id 3 is listed, which stands for 21%.
Also outcome of csvi vm export products and csvi vm export prices are in line. No stored price with tax.

Is it not a csvi thing that it is rounding somewhere during the implementation of my rule; 71.90 x 1,21 and result is 86.999.

Export product:
basepricewithtax 0,00000
custom_price 0,00000~0,00000~0,00000~0,00000~0,00000~0,00000
discountedpricewithouttax 370,24793
pricebeforetax 370,24793
pricewithouttax 370,24793
product_override_price 0,00000
product_price 370,24793
product_tax_id 3
salesprice 370,24793
shopper_group_name
shopper_group_name_price *

if I look at export option prices:
modified_on 04/01/2017 10:23:50
product_override_price 0.00
product_price 370.25
product_tax_id 3
shopper_group_name *
  1. more than a month ago
  2. RO CSVI
  3. # 8
Accepted Answer Pending Moderation
I did a little more testing, it seems the csvi setting: decimals is doing something strange.
If I a set "Number of decimals" to 4, the result is <g:price>88.999977</g:price>
So cost price = 73.55372 times 1.21 (rule I implemented) = 89.000000001
SO why is it showing 88.999977 and not with number of decimals set to 4 showing 88.9999
Or even better the right result: 89.0000?

So I tried with Number of decimals set to 0, the result is even stranger: <g:price>89.54</g:price>
  1. more than a month ago
  2. RO CSVI
  3. # 9
Accepted Answer Pending Moderation
Hello,

Is it not a csvi thing that it is rounding somewhere during the implementation of my rule
Which field are you exporting and applying the rule to?

The prices you have shown are from the export run I guess and not directly from your product in VirtueMart. Could you post a screenshot of the price in VirtueMart? The price as you show it has no tax applied whatsoever. This basically means that VirtueMart thinks there is no tax to apply. CSVI doesn't calculate the price itself but asks VirtueMart for the price of a specific product.

In the current CSVI 7 release I did add a fix for calculating prices as it was possible that VirtueMart returned the price of a previous product. Of course you are using the Google export and not the product export. That doesn't have that fix yet. Completely missed it :-|
Kind regards,

RolandD

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 10
Accepted Answer Pending Moderation
price+tax.jpg
screenshot default price and tax rule
Attachments (1)
  1. more than a month ago
  2. RO CSVI
  3. # 11
Accepted Answer Pending Moderation
Hello,

So I have created a product with the same settings and the export runs fine. The only thing I can think of that it has something to do that is specific to your site. Can you send us Joomla and FTP access, so we can check what is going on?
Kind regards,

RolandD

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 12
Accepted Answer Pending Moderation
Hi Roland,
Your are probably very busy with the 7.0 release.
It seems that my problem is related to the different shoppergroups on this site. Another site with just the default VM shoppergroup configuration works fine.

Would it make any difference if I upgrade to 7.0? Preferable not, I don't want to include another variable!
  1. more than a month ago
  2. RO CSVI
  3. # 13
Accepted Answer Pending Moderation
Hello,
It seems that my problem is related to the different shoppergroups on this site. Another site with just the default VM shoppergroup configuration works fine.

As we already mentioned proper setting up of shoppergroups and export of salesprice field should give the price you want without setting any rule.

Would it make any difference if I upgrade to 7.0? Preferable not, I don't want to include another variable!

There will be no difference with your export if you upgrade to 7.0. Which variable you are saying not to include?
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 14
Accepted Answer Pending Moderation
I think I found solution. Although I only have 1 price for all shoppergroups I work with different shoppergroups depending on country, end-user or reseller.
So I have to use the setting in CSVI "Customer shopper group" and I was testing with the wrong the "Shopper group name price" variable.

shopper.jpg
Attachments (1)
  1. more than a month ago
  2. RO CSVI
  3. # 15
Accepted Answer Pending Moderation
Hello,
So your prices issues are solved with this setting?
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 16
Accepted Answer Pending Moderation
yes
  1. more than a month ago
  2. RO CSVI
  3. # 17
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!