1. Tomsky
  2. RO CSVI
  3. Wednesday, 05 March 2025
  4.  Subscribe via email
Hello,

I have a problem with importing products on the test version. When trying to import products to hikashop I get this error: No column headers have been found in the file.

Can the file I'm trying to import be incorrect?

I'm sending the link from which I'm trying to import products:
https://cloud.appstore.mamezi.pl/feeds/shop96d6bee72f63481c300948e9db8305b7b5be9048/ceneo-pl_PL.xml
Attachments (1)
Accepted Answer Pending Moderation
Hi,

I checked your request regarding the rounding and it is not something PHP can do natively. To achieve the rounding behavior you described in PHP, you can create a custom function that handles the rounding logic specifically for your requirements. The function will check the fractional part of the number and round accordingly:

1. If the fractional part is less than 0.5, it rounds to the nearest lower value plus 0.5.
2. If the fractional part is 0.5 or greater, it rounds up to the next whole number.

Here's a PHP function that implements this logic:

```php
function customRound($number) {
// Get the integer part of the number
$integerPart = floor($number);

// Get the fractional part of the number
$fractionalPart = $number - $integerPart;

if ($fractionalPart < 0.5) {
// If the fractional part is less than 0.5, round to the nearest lower value plus 0.5
return $integerPart + 0.5;
} else {
// If the fractional part is 0.5 or greater, round up to the next whole number
return ceil($number);
}
}

// Test cases
echo customRound(2.30) . " PLN\n"; // Output: 2.50 PLN
echo customRound(30.10) . " PLN\n"; // Output: 30.50 PLN
echo customRound(0.99) . " PLN\n"; // Output: 1.00 PLN
echo customRound(50.65) . " PLN\n"; // Output: 51.00 PLN
echo customRound(5.52) . " PLN\n"; // Output: 6.00 PLN
```
You can use this in your custom rule.

Hope that helps.
Kind regards,

RolandD

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. 2 weeks ago
  2. RO CSVI
  3. # 1
Accepted Answer Pending Moderation
Hello,
The functions we have will round prices based on decimal places and not entire decimal number itself. If we have set decimal places to 2 then the third number in decimals is used for rounding. For example 76,267 will be rounded to 76,27. There is no direct way to round the entire decimals. One way to do this is to write your own custom rule to get only the decimals, round them and then put it back into price.
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. 2 weeks ago
  2. RO CSVI
  3. # 2
Accepted Answer Pending Moderation
Hello,

Yes, we can look at the example products I posted. These products should have the following prices:

https://naturalgreenlife.pl/sklep-internetowy/738-ciastka-konopne-euphoria-cookies-of-mind-chocolate-58g.html

This product should have a price of PLN 6.50, so if my price is PLN 6.30, I should round it up to PLN 6.50


Next,

https://naturalgreenlife.pl/sklep-internetowy/731-kryszta%C5%82y-cbd-sativa-poland-poland.html

This product should have a price of PLN 76,50 , so if my price is PLN 76,26, I should round it up to PLN 76,50

Next,

https://naturalgreenlife.pl/sklep-internetowy/670-swiss-grinder-falcon-4-cz%C4%99%C5%9Bciowy-m%C5%82ynek-premium-55-mm.htm

This product should have a price of PLN 66,50 , so if my price is PLN 66,42, I should round it up to PLN 66,50

Next,

https://naturalgreenlife.pl/sklep-internetowy/650-tacka-do-suszu-raw-mini-18x13-cm.html

This product should have a price of PLN 30,00 , so if my price is PLN 29,52, I should round it up to PLN 30,00

e.t.c

To summarize:

If we have a price between 0.01 and 0.49 PLN

For example,
2.30 PLN, the price should be rounded to 2.50 PLN

If we have 30.10 PLN,

it should be rounded to 30.50 PLN

and we have a price between 0.51 and 0.99 PLN

If we have 50.65 PLN,

it should be rounded to 51.00 PLN

If we have 5.52 PLN,

it should be rounded to 6.00 PLN

e.t.c.
  1. 2 weeks ago
  2. RO CSVI
  3. # 3
Accepted Answer Pending Moderation
Hello,
The links you have shared all products does have price rounded? Can I take any of them as example to check?
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. 2 weeks ago
  2. RO CSVI
  3. # 4
Accepted Answer Pending Moderation
Hello,
Can you tell me the products for which price is not rounded correct?
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. 2 weeks ago
  2. RO CSVI
  3. # 5
Accepted Answer Pending Moderation
Hello,
We have made a few changes to RO CSVI Multi replace plugin and RO CSVI Margin plugin and they are attached here.

1. Install the attached plugin using Joomla extension manager
2. Edit margin rule Marża 15% and set Decimal separator and Thousand operator as in the attached screenshot(margin.png) and save the rule.
3. Edit RO Multireplace rule Zaokrąglanie and set round operation as in attached screenshot (multireplace.png) and save the rule.
4. Run import and check.

If you have any problem with import post the administrator login details and I will take a look. You can post the details on Site Details tab under your reply.
Attachments (4)
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. 2 weeks ago
  2. RO CSVI
  3. # 7
Accepted Answer Pending Moderation
Hello,

I think so. So far, there have been no errors during import. Since yesterday, I've been getting an error after importing about 150-170 products.

This is a error from today (screenshot)

Import file:
https://cloud.appstore.mamezi.pl/feeds/shop96d6bee72f63481c300948e9db8305b7b5be9048/sklepSativaPrivateApp01-pl_PL.xml
Attachments (1)
  1. 2 weeks ago
  2. RO CSVI
  3. # 8
Accepted Answer Pending Moderation
Hello,
but after installing the add-on, they keep throwing an error after a while (screenshot)

Are you sure 500 error is after installing modified Multireplace rule? If there is issue in rule it will not import any product and you should see error immediately after import starts. Can you also post your import file? I will check the rounding of prices and also see if I can reproduce 500 internal server error.
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. 2 weeks ago
  2. RO CSVI
  3. # 9
Accepted Answer Pending Moderation
I installed the add-on. I added a rounding rule, but after installing the add-on, they keep throwing an error after a while (screenshot). A few products were caught, but the rounding wasn't exactly what I was looking for.

Product

Lizak konopny - ENERGY 12g - EUPHORIA

Before the change, the price was 2.56 PLN

and after the change, the price is: 3.69 PLN

I wanted the product to have a price of 3.00 PLN.

Similarly, the second product
Herbatka konopno owocowa "WIŚNIOWY SAD" 45 g

Before import, the price was 23.17 PLN

and after import, it is 23.37 PLN

and I would like it to have a price of 23.50 PLN.

So, if we have a price of up to PLN 0.49, we should round it to PLN 0.50, and if we have an enum of PLN 0.50 to PLN 0.99, we should round it to PLN 1.00.

I'm attaching screenshots and logs.
Attachments (8)
  1. 3 weeks ago
  2. RO CSVI
  3. # 10
Accepted Answer Pending Moderation
Hello,
We do not have the option of rounding prices in RO CSVI with current version. But I have added three new operations round, floor and ceil to RO CSVI Multireplace rule to process on price values. You can install the attached modified rule plugin from Joomla extension manager to get this new added operations. You can then create RO CSVI Multireplace rule with these multiple operations based on how you want price to round and apply the rule on price field. Try and let me know on how that goes.


FYI - Ceil() takes the number and rounds it to the nearest integer above its current value, whereas floor() rounds it to the nearest integer below its current value.
The function round() takes two parameters - the number to round, and the number of decimal places to round to. If a number is exactly half way between two integers, round() will always round up.
Attachments (1)
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. 3 weeks ago
  2. RO CSVI
  3. # 11
Accepted Answer Pending Moderation
Hello,

Ok, now everything works, everything is fine. Thank you very much. Last question, how to round prices after a decimal point? Example, if there is a product with a price of

25.68, it should be rounded to 26.00

if there is a product with a price of

20.31, it should be rounded to 20.50

can you do something like that?
  1. 3 weeks ago
  2. RO CSVI
  3. # 12
Accepted Answer Pending Moderation
Hello,
That high price is because of margin rule applied on price. I had explained that in my previous reply. For price of 244 margin is calculated as below. Remove the margin rule and you will have price imported as in import file.


15% of 244.77 is 36.7155
Since margin is set to Multiplication 244.77X36.7155 = 8986.8529
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. 3 weeks ago
  2. RO CSVI
  3. # 13
Accepted Answer Pending Moderation
Hello,

ok, thanks for your help so far. Patch installed, field changed to product_price. After re-importing, prices appeared everywhere, but for a product that had no price, i.e.:
https://naturalgreenlife.pl/sklep-internetowy/1041-x-max-v3-pro-plus-gold-edition-przeno-ny-waporyzator/category_pathway-91.html

we now have a very high price of PLN 8,986.85. In the xml file the price is 244 PLN

and here we have a very high price:

https://naturalgreenlife.pl/sklep-internetowy/1030-xlux-roffu-x-hero-przeno-ny-waporyzator-do-suszu/category_pathway-91.html

33 998.32 PLN

X-MAX V3 Pro Plus GOLD EDITION - Portable vaporizer

in the file it has the exact price: 244.77

and the product
XLUX ROFFU x HERO - portable vaporizer for dried herbs

has the price:
429.27
  1. 3 weeks ago
  2. RO CSVI
  3. # 14
Accepted Answer Pending Moderation
Hello,
Please read the linked text Load the attached patch file in my previous reply. It will guide you with document to install the patch file.
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. 3 weeks ago
  2. RO CSVI
  3. # 15
Accepted Answer Pending Moderation
Hello,

Should I install this file like other modules and components? Or somewhere else. Screen
Attachments (1)
  1. 3 weeks ago
  2. RO CSVI
  3. # 16
Accepted Answer Pending Moderation
Hello,
Thank you for posting the files. Few things

1. There is missing default value error for price_zone_id field when adding HikaShop price. Load the attached patch file before running the import so the error is fixed.
2. You have used price_value field for price, change it to product_price as that is the field RO CSVI uses for processing price in import. See attached screenshot.
3. Margin value of 15% is multiplied to price so rule works. You can see price value 244.77 in file is added as 8986.8529 in database after import.

15% of 244.77 is 36.7155
Since margin is set to Multiplication 244.77X36.7155 = 8986.8529

Try import with patch file and with product_price value and check. You can see margin rule applied as well.
Attachments (2)
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. 3 weeks ago
  2. RO CSVI
  3. # 17
Accepted Answer Pending Moderation
Hello,

Ok, add the files logs and backup templates to attachments.
Attachments (2)
  1. 3 weeks ago
  2. RO CSVI
  3. # 18
Accepted Answer Pending Moderation
Hello,
What I noticed is that in the xml file from which the products are downloaded, there is a product named X-MAX V3 Pro Plus GOLD EDITION - Przenośny waporyzator but in the logs there is no such product.

By default RO CSVI debug log has details only first 20 records and that is the reason you don't see the product name X-MAX V3 Pro Plus GOLD EDITION - Przenośny waporyzator in debug log. If you read my previous reply I had asked you to increase Number of lines in log to 1000 in RO CSVI Config page. That way debug log will have details of 1000 products and from there we can find what happened with product X-MAX V3 Pro Plus GOLD EDITION - Przenośny waporyzator. Can you do that and send me import debug log to check? I had also requested to post template XML file. Post that as well so I can see why margin rule does not work.
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. 3 weeks ago
  2. RO CSVI
  3. # 19
Accepted Answer Pending Moderation
Ok, add the file logs to attachments. What I noticed is that in the xml file from which the products are downloaded, there is a product named X-MAX V3 Pro Plus GOLD EDITION - Przenośny waporyzator but in the logs there is no such product.

2. Yes, so from what I've looked at, no product has a 15% margin added
Attachments (1)
  1. 3 weeks ago
  2. RO CSVI
  3. # 20
  • Page :
  • 1
  • 2


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