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
Hello,
In your import template on File tab set Use file for configuration to No, save the template and run the import. See if that solves the issue.
If you still any problem post template XML file to check. To get the template XML file from RO CSVI templates list page select the import template and click on Backup templates button. Post the downloaded XML file.
Kind regards,
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Hello,
ok there is a little progress, it has already taken me to the stage where several import runs are running, but after clicking it reloads the page and something like this appears. I am attaching screenshots. I also attach xml
Hello,
I see that you have added all available fields to the template on template fields page. That is not how it works. You need to only add fields which are needed for import. Since you are importing XML file you should set up the Record node name in template on File tab and also path to be used for template fields. See attached screenshots. I have added XML path for first five fields in template. Please clean up unwanted fields and set XML path for the fields you need to import. I have also attached modified template you can use as reference.
Kind regards,
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Hello,
Thanks for answer. I added, cleared all added fields and added only those that will be used. I set the paths, but it still does not detect products.
Additionally, in the xml file there is also a field <attrs> , the question is how to map this field? I am sending a screen of how it looks in the file. (screen 2)
And how to import photos? In the fields I do not see anywhere the image field to amp.
Hello,
Thanks for answer. I added, cleared all added fields and added only those that will be used. I set the paths, but it still does not detect products.
In your third screenshot you have changed record name to Ceneo but I don't see any XML node with that name in your file. Where did that name come from?
Additionally, in the xml file there is also a field <attrs> , the question is how to map this field? I am sending a screen of how it looks in the file. (screen 2)
May I ask for which field you want to map attrs node? That node has same path with multiple names and values. You can use path attrs/a for value and attrs/a/name for name to get the first value. Based on which field you want to map we can see how to read all of those values.
And how to import photos? In the fields I do not see anywhere the image field to amp.
To import picture use file_path field with Your field set to imgs/main/url. See attached screenshot. You can also check Import HikaShop Product Images document.
Aldo just for reference you can check Import XML document. Example in the document will help you understand on how to read XML nodes and set them as template fields.
Kind regards,
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
In your third screenshot you have changed record name to Ceneo but I don't see any XML node with that name in your file. Where did that name come from?
I understand that this field must contain the name of the file from which the import is being made? Is the name set correctly now? (Screen)
If so, the template still shows 0 products after clicking preview
May I ask for which field you want to map attrs node? That node has same path with multiple names and values. You can use path attrs/a for value and attrs/a/name for name to get the first value. Based on which field you want to map we can see how to read all of those values.
I would like to map the fields:
<attrs>
<a name="Producent">
<a name="Kod_produktu">
<a name="Ean">
</attrs>
Hello,
I understand that this field must contain the name of the file from which the import is being made? Is the name set correctly now? (Screen)
If so, the template still shows 0 products after clicking preview
No you should not be setting file name in this field. Change Record name field to o as that is the node which contains each record in XML file and empty Record container field. See attached screenshot.
I would like to map the fields:
<attrs>
<a name="Producent">
<a name="Kod_produktu">
<a name="Ean">
</attrs>
Which HikaShop fields you want to map these fields?
Kind regards,
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Hello,
No you should not be setting file name in this field. Change Record name field to o as that is the node which contains each record in XML file and empty Record container field. See attached screenshot.
Yes, now it works, thanks!
Which HikaShop fields you want to map these fields?
When it comes to attributes, I would like to map these 3 fields:
<a name="Producent"> -> field brand
<a name="Kod_produktu"> -> field product_code
<a name="Ean"> -> Can the EAN field be mapped too? I don't see the EAN position fields
I tried to map this field as in the screenshot, but it doesn't work
Hello,
<a name="Producent"> -> field brand
<a name="Kod_produktu"> -> field product_code
Your mapping is wrong and so it did not work. See attached screenshot and change Your field for brand and product_code
<a name="Ean"> -> Can the EAN field be mapped too? I don't see the EAN position fields
There is no EAN field in HikaShop for Products. If you want that field you can create as a custom field for product table in HikaShop. In RO CSVI you can update available field and then can add the field as template field.
Kind regards,
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Hello,
I have a question, when a product disappears from the url file, will it also automatically disappear from the store?
Hello,
No only the products which are in import file are updated, rest stays the same.
Kind regards,
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Hello,
thank you for your help so far. Unfortunately, I encountered further problems.
- I found a product that has a price of 244.77 in the xml file, but in the store there is no price and the inscription Free:
Link to xml file:
https://cloud.appstore.mamezi.pl/feeds/shop96d6bee72f63481c300948e9db8305b7b5be9048/sklepSativaPrivateApp01-pl_PL.xml
- I also set a margin of 15%, but it is not added to the base amount. In attachments 3 and 4 I am sending a screen from the configuration.
Regards
Hello,
- I found a product that has a price of 244.77 in the xml file, but in the store there is no price and the inscription Free:
The problem is only with this one product? in RO CSVI Config page set Number of lines in log file to 1000 and save the config. Run import and post import debug log to check. To get the debug log see How to collect debug information? document. Also post template XML file to check. To get the template XML file from RO CSVI templates list page select the import template and click on Backup templates button. Post the downloaded XML file.
- I also set a margin of 15%, but it is not added to the base amount. In attachments 3 and 4 I am sending a screen from the configuration.
Again is it only to one specific product or none of the products get this margin price? Post the requested files and I will check.
Kind regards,
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
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.
- Yes, so from what I've looked at, no product has a 15% margin added
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
Hello,
Ok, add the files logs and backup templates to attachments.
Hello,
Thank you for posting the files. Few things
- 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.
- 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.
- 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.
Kind regards,
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
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
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:
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
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
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?
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.
Kind regards,
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
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.
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
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
Hello,
We have made a few changes to RO CSVI Multi replace plugin and RO CSVI Margin plugin and they are attached here.
- Install the attached plugin using Joomla extension manager
- Edit margin rule Marża 15% and set Decimal separator and Thousand operator as in the attached screenshot(margin.png) and save the rule.
- Edit RO Multireplace rule Zaokrąglanie and set round operation as in attached screenshot (multireplace.png) and save the rule.
- 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.
Kind regards,
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Hello,
After installing the add-ons, the imports are now working correctly.
However, the prices aren't yet fully rounded. Some products are now correct, but others are still unrounded. Screenshot 1
https://naturalgreenlife.pl/sklep-internetowy/731-kryszta%C5%82y-cbd-sativa-poland-poland.html
https://naturalgreenlife.pl/sklep-internetowy/650-tacka-do-suszu-raw-mini-18x13-cm.html
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
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
Hello,
Yes, we can look at the example products I posted. These products should have the following prices:
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,
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.
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
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:
- If the fractional part is less than 0.5, it rounds to the nearest lower value plus 0.5.
- 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:
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
Log in to reply to this topic.