- Posts: 62
- Thank you received: 4
Virtuemart Import problem - No product images
-- HikaShop version -- : 2.6.0
-- Joomla version -- : 3.4.4
-- PHP version -- : 5.3
-- Browser(s) name and version -- : Internet Explorer 11
-- Error-message(debug-mod must be tuned on) -- : No error messages
None of the images are being imported into HikaCart from Virtuemart. Permissions are wide open. I see all of the images in the images/com_hikashop/upload directory.
Why can't I easily import all of my products? Please help!
Please Log in or Create an account to join the conversation.
Do you have a link in your website which will allow us to know a little more about what has been imported ?
Or maybe some information from the HikaShop product edition page or from the table "hikashop_file" ?
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Please Log in or Create an account to join the conversation.
All of the products imported fine, but the images are all showing place holders with a few exceptions such as categories.
www.sombrerobrands.com/new
Please Log in or Create an account to join the conversation.
Unknown column 'vmp.product_id' in 'field list' SQL=INSERT IGNORE INTO `l7hr9_hikashop_product` (`product_name`,`product_description`,`product_quantity`,`product_code`,`product_published`,`product_hit`,`product_created`,`product_modified`,`product_sale_start`,`product_tax_id`,`product_type`,`product_url`,`product_weight`,`product_weight_unit`,`product_dimension_unit`,`product_sales`,`product_width`,`product_length`,`product_height`) SELECT vmpeg.product_name,CONCAT(vmpeg.product_s_desc,'<hr id="system-readmore"/>',vmpeg.product_desc),case when vmp.product_in_stock IS NULL or vmp.product_in_stock < 0 then 0 else vmp.product_in_stock end,case when vmp.product_sku IS NULL or vmp.product_sku="" then MD5(vmp.product_id) else vmp.product_sku end,vmp.published,0,UNIX_TIMESTAMP(vmp.created_on),UNIX_TIMESTAMP(vmp.modified_on),UNIX_TIMESTAMP(vmp.product_available_date),hkc.category_id,'main',vmp.product_url,vmp.product_weight,LOWER(vmp.product_weight_uom),LOWER(vmp.product_lwh_uom),vmp.product_sales,vmp.product_width,vmp.product_length,vmp.product_height FROM `l7hr9_virtuemart_products` AS vmp INNER JOIN `l7hr9_virtuemart_products_en_gb` vmpeg ON vmp.virtuemart_product_id = vmpeg.virtuemart_product_id LEFT JOIN `l7hr9_virtuemart_product_prices` vmpp ON vmpeg.virtuemart_product_id = vmpp.virtuemart_product_id LEFT JOIN `l7hr9_hikashop_taxation` hkt ON hkt.tax_vm_id = vmpp.product_tax_id LEFT JOIN `l7hr9_hikashop_category` hkc ON hkc.category_namekey = hkt.category_namekey LEFT JOIN `l7hr9_hikashop_vm_prod` AS hkp ON vmp.virtuemart_product_id = hkp.vm_id WHERE hkp.hk_id IS NULL AND vmp.virtuemart_product_id > 0 GROUP BY vmp.virtuemart_product_id ORDER BY vmp.virtuemart_product_id ASC LIMIT 100;
Please Log in or Create an account to join the conversation.
You can redownload HikaShop 2.6.0 ; we create a patch yesterday for that issue.
In the "vm2.php" file, we replaced
Otherwise, in your "new" website, I can see one product but I don't know where to look exactly.
Because I don't think that your first product is an imported product from VM.
sombrerobrands.com/new/index.php?option=...lf-putter&Itemid=357
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Why don't the images come through? I see lots of these errors while importing:
File already exists "C:\wamp\www\sombrero\images\com_hikashop\upload\/shanks-diagram-670-x-799.jpg" ("C:\wamp\www\sombrero\images/stories/virtuemart/product/shanks-diagram-670-x-799.jpg")
Any assistance would be greatly appreciated.
Please Log in or Create an account to join the conversation.
I've provided it here for anyone with the same problem:
DELIMITER |
DROP PROCEDURE IF EXISTS import_images |
CREATE PROCEDURE import_images()
BEGIN
DECLARE v_title varchar(100);
DECLARE v_product_id INT;
DECLARE DONE INT DEFAULT 0;
DECLARE flag1 VARCHAR(5) DEFAULT 'START' ;
DECLARE getImages CURSOR FOR SELECT l7hr9_virtuemart_medias.file_title, l7hr9_virtuemart_product_medias.virtuemart_product_id
FROM l7hr9_virtuemart_product_medias
INNER JOIN l7hr9_virtuemart_medias ON l7hr9_virtuemart_product_medias.virtuemart_media_id = l7hr9_virtuemart_medias.virtuemart_media_id;
DECLARE CONTINUE HANDLER FOR NOT FOUND SET flag1 = 'END';
OPEN getImages;
WHILE flag1 <> 'END' DO
FETCH getImages INTO v_title,v_product_id;
IF flag1 <> 'END' THEN
insert into l7hr9_hikashop_file(file_path,file_type,file_ref_id)
VALUES(concat('/',v_title),'product', v_product_id);
END IF;
END WHILE;
CLOSE getImages;
END |
DELIMITER ;
Please Log in or Create an account to join the conversation.
Thank you for your feedback.
The issue is that VM keeps changing the way they store the images of the products.
Sometimes it's in the file_meta field, sometimes in the file_url field.
So the import system handles these two, but not yet file_title.
I've added some additional code on our end to take into account that field, by adding the code:
Hopefully, that will be enough to support that.
Please Log in or Create an account to join the conversation.
/home/deb55134/domains/onzetoekomst.nl/public_html/bsl/images\/stories\/virtuemart\/product\/MM1007_Dark_Antraciet.jpg
after the images folder it goes wrong... :blink:
how can i fix this ?
i am at the moment using starter, but if i can make this work i am buying the essential version
vm3
joomla 3.4.3
Hikashop 2.6.0
Please Log in or Create an account to join the conversation.
Is it possible to know your exact HikaShop build number ?
You can find that information in the HikaShop configuration, in the "main" tab under "advanced" section.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Okay so you have the latest patch except the patch Nicolas gave in that thread 5 days ago.
Did you applied that patch .
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Please Log in or Create an account to join the conversation.
It also didnt import the products, is the image related to the products? So that if the image upload fails the products wont be imported either?
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
How can i use this ?
Is this something i load into PHPmyAdmin ?
Please Log in or Create an account to join the conversation.
DELIMITER $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `import_images`()
BEGIN
DECLARE v_title varchar(100);
DECLARE v_product_id INT;
DECLARE v_hika_product_id INT;
DECLARE v_new_image varchar(100);
DECLARE DONE INT DEFAULT 0;
DECLARE flag1 VARCHAR(5) DEFAULT 'START' ;
DECLARE getImages CURSOR FOR SELECT
xn39k_virtuemart_product_medias.virtuemart_product_id,
xn39k_hikashop_vm_prod.hk_id,
xn39k_virtuemart_medias.file_url
FROM
xn39k_virtuemart_product_medias
INNER JOIN xn39k_virtuemart_medias ON xn39k_virtuemart_product_medias.virtuemart_media_id = xn39k_virtuemart_medias.virtuemart_media_id
INNER JOIN xn39k_hikashop_vm_prod ON xn39k_hikashop_vm_prod.vm_id = xn39k_virtuemart_product_medias.virtuemart_product_id;
DECLARE CONTINUE HANDLER FOR NOT FOUND SET flag1 = 'END';
OPEN getImages;
WHILE flag1 <> 'END' DO
FETCH getImages INTO v_product_id,v_hika_product_id, v_title;
IF flag1 <> 'END' THEN
-- find image name
SET v_new_image = substring_index(v_title,'/',-1);
insert into xn39k_hikashop_file(file_path,file_type,file_ref_id)
VALUES(concat('/',v_new_image),'product', v_hika_product_id);
END IF;
END WHILE;
CLOSE getImages;
END$$
DELIMITER ;
Please Log in or Create an account to join the conversation.