- Posts: 30
- Thank you received: 1
Products after import
5 years 11 months ago #325722
by Lambersm
Products after import was created by Lambersm
-- HikaShop version -- : 4.4.0
-- Joomla version -- : 3.9.22
Hello,
I've a problem with export and import products.
When i export products and use the exact same file as import, the product characteristics are messed up.
These are suddenly shown with an image (which is not linked to it) and a description) that is not there.
These are then taken over from the product itself. This does not happen with all products and characteristics
Kind regards,
Matthijs
-- Joomla version -- : 3.9.22
Hello,
I've a problem with export and import products.
When i export products and use the exact same file as import, the product characteristics are messed up.
These are suddenly shown with an image (which is not linked to it) and a description) that is not there.
These are then taken over from the product itself. This does not happen with all products and characteristics
Kind regards,
Matthijs
Please Log in or Create an account to join the conversation.
5 years 11 months ago #325727
by nicolas
Replied by nicolas on topic Products after import
Hi,
Do you see the images linked to the variants in the backend too when you edit a variant under the variants tab of the product edition screen ?
And we would also need a copy of the CSV as well as a link to the page where you made that screenshot to check on the situation.
Do you see the images linked to the variants in the backend too when you edit a variant under the variants tab of the product edition screen ?
And we would also need a copy of the CSV as well as a link to the page where you made that screenshot to check on the situation.
Please Log in or Create an account to join the conversation.
5 years 11 months ago #325749
by Lambersm
Replied by Lambersm on topic Products after import
HI,
No, these are not visible in the back-end.
In the appendix the export.
I can give the link to the site, but it is not "open" to the public yet because we have to solve this first.
Can I provide data to you somewhere without everyone being able to see it?
Kind Regards,
Matthijs
No, these are not visible in the back-end.
In the appendix the export.
I can give the link to the site, but it is not "open" to the public yet because we have to solve this first.
Can I provide data to you somewhere without everyone being able to see it?
Kind Regards,
Matthijs
Please Log in or Create an account to join the conversation.
5 years 11 months ago #325760
by nicolas
Replied by nicolas on topic Products after import
Hi,
If the images are not in the variants in the backend, then it's not an import issue.
Normally, there is a mechanism on the product details page to check if the variants have different images and if they do, the images column is displayed on the variants listing, and for variants without images, the system uses the images of the main product on the fly.
So what that means is that you must have at least one variant with an image, or that there is a problem in the view displaying the variants listing. It might come from an old view override.
So we'll need a backend access to check the variants and a link to a product page with the issue to check the situation.
You can provide that in private along with a link to this thread via our contact form:
www.hikashop.com/support/contact-us.html
If the images are not in the variants in the backend, then it's not an import issue.
Normally, there is a mechanism on the product details page to check if the variants have different images and if they do, the images column is displayed on the variants listing, and for variants without images, the system uses the images of the main product on the fly.
So what that means is that you must have at least one variant with an image, or that there is a problem in the view displaying the variants listing. It might come from an old view override.
So we'll need a backend access to check the variants and a link to a product page with the issue to check the situation.
You can provide that in private along with a link to this thread via our contact form:
www.hikashop.com/support/contact-us.html
Please Log in or Create an account to join the conversation.
5 years 11 months ago #325781
by Lambersm
Replied by Lambersm on topic Products after import
Hi ,
It happens after the import, before the import the data was right/
I have emailed login details via the contact form.
You can try it yourself by exporting the product S1402-D and then importing it again.
I've made a backup, so you can try whatever you want
Kind regards,
Matthijs
It happens after the import, before the import the data was right/
I have emailed login details via the contact form.
You can try it yourself by exporting the product S1402-D and then importing it again.
I've made a backup, so you can try whatever you want
Kind regards,
Matthijs
Please Log in or Create an account to join the conversation.
5 years 11 months ago #325798
by nicolas
Replied by nicolas on topic Products after import
Hi,
I've run some tests on your website and as I expected the issue is with the mechanism on the product details page to check if the variants have different images.
After the import, you end up in an edge case of that algorithm for one of the variant.
So I made a patch to it so that it properly handle that edge case.
I've added the patch on your website and on our end.
So I can confirm it now displays fine on your website after the import, and we'll have that patch on our end for the next version of HikaShop too.
I've run some tests on your website and as I expected the issue is with the mechanism on the product details page to check if the variants have different images.
After the import, you end up in an edge case of that algorithm for one of the variant.
So I made a patch to it so that it properly handle that edge case.
I've added the patch on your website and on our end.
So I can confirm it now displays fine on your website after the import, and we'll have that patch on our end for the next version of HikaShop too.
Please Log in or Create an account to join the conversation.
5 years 10 months ago #326018
by Lambersm
Replied by Lambersm on topic Products after import
HI,
That works!!! Thank you very much!!!
That works!!! Thank you very much!!!
Please Log in or Create an account to join the conversation.
5 years 10 months ago #327196
by Lambersm
Replied by Lambersm on topic Products after import
HI,
The problem is back. Can you provide the patch, so I can install it?
Greetz
The problem is back. Can you provide the patch, so I can install it?
Greetz
Please Log in or Create an account to join the conversation.
5 years 10 months ago #327208
by nicolas
Replied by nicolas on topic Products after import
Hi,
You need to change the code:
to:
in components/com_hikashop/views/product/view.html.php
You need to change the code:
Code:
foreach($this->element->variants as $variant) {
foreach($display as $k => $v) {
if(isset($variant->$k) && !is_array($variant->$k) && !empty($variant->$k))
$display[$k] = true;
}
$variant_images = '';
if(!empty($this->element->main->images) && !empty($variant->images)) {
foreach($variant->images as $image) {
$variant_images .= '|' . $image->file_path;
}
}
if($variant_images != $main_images)
$display['images'] = true;
$variant_prices = '';
if(!empty($variant->prices)) {
foreach($variant->prices as $price) {
$variant_prices .= '|' . $price->price_value . '_' . $price->price_currency_id;
}
}
if($variant_prices!=$main_prices)
$display['prices'] = true;
}
Code:
foreach($this->element->variants as $variant) {
if(!empty($variant->variant_name))
$display['variant_name'] = true;
if(!empty($variant->product_description) && $variant->product_description != $this->element->main->product_description)
$display['product_description'] = true;
if(!empty($variant->images)) {
$variant_images = '';
foreach($variant->images as $image) {
$variant_images .= '|' . $image->file_path;
}
if($variant_images != $main_images)
$display['images'] = true;
}
if(!empty($variant->prices)) {
$variant_prices = '';
foreach($variant->prices as $price) {
$variant_prices .= '|' . $price->price_value . '_' . $price->price_currency_id;
}
if($variant_prices!=$main_prices)
$display['prices'] = true;
}
}
Please Log in or Create an account to join the conversation.
Time to create page: 0.212 seconds