1. Marcosis
  2. RO CSVI
  3. Thursday, 05 May 2016
  4.  Subscribe via email
Hey Rolandd,

I am finding that my product import is not marking imported images as published and I have to manually publish them before the product can use it. Is there something I am doing wrong in my import or import file or am I missing something?

VirtueMart: 3.0.14
Joomla!: 3.5.1
CSVI: Pro 6.5.7

Template Layout:
Template Field name Your field Default value
LW - Import f1 product_sku
LW - Import f1 product_name
LW - Import f1 product_s_desc
LW - Import f1 product_desc
LW - Import f1 product_price
LW - Import f1 manufacturer_name
LW - Import f1 category_path
LW - Import f1 file_url_thumb
LW - Import f1 file_url
LW - Import f1 skip
LW - Import f1 skip
LW - Import f1 skip
LW - Import f1 skip
LW - Import f1 skip
LW - Import f1 skip
LW - Import f1 product_in_stock
LW - Import f1 product_available_date
LW - Import f1 product_unit
LW - Import f1 published
LW - Import f1 product_currency AUD

Delimiter: "~"
Text Enclosure: "|"
Example import file line:
|00-4|~|Pink Unity|~|Hybrid Silicone Lubricant for Women - 50 ml (1.7 oz) Bottle|~|Pink Unity is a revolutionary, hybrid silicone lubricant which encompasses leading-edge technology and sets the tone for what will be the benchmark for personal lubricants in the future. This hi-tech gel creates its unique, satiny smooth slipperiness by uniting lubricous silicone elements with all the conveniences and benefits of a water-based lubricant.<br /><br />Pink Unity is formulated with premium silicone ingredients. These silicone molecules have been merged with water to create a lubricant that easily washes out of materials and does not stain. For added convenience, Pink Unity has been formulated as a gel for further ease and to alleviate any unwanted spills.<br /><br />- Thick, satiny smooth gel formula<br />- Glycerin and paraben free<br />- Slickness of silicone, ease and convenience of water<br />- Non-staining|~|10.50|~|Empowered Products|~|Accessories/Lotions & Lubes|~||~|/web_images/00-4.jpg|~||~|892172001004|~|0|~||~|N|~|5|~|10000|~|27/09/2015|~|1|~|1|

The import works flawlessly, with the exception that none of the new products being imported have their images set to published by default which has to be done manually.

Really appreciate any assistance you can give.
Accepted Answer Pending Moderation
Hello,

The published state of the images is taken from the published state of the products. If you import products with an unpublished state, the images will be unpublished as well. I see you have published set to 1, so that should be good.

There is no debug log of the import, so I can't check further. Post the debug log and let's see what is in there.
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. # 1
Accepted Answer Pending Moderation
Ah, that explains why. Is it core VirtueMart functionality to set the product image to un-published if the product is un-published? or have you just configured CSVI to act that way?

If it's just CSVI's coding to set the published state of the image the same as the published state of the product, is there a work around I could do to always set the published state of the image to "published'? The reason I ask is that I turn products on and off through my import process all the time through scripts and my MySQL databases depending on my distributors stock levels and the product that it is. Sometimes my distributor doesn't have images for certain products in which I disable those until they do, then turn them on again (where this issue is coming into play).

I appreciate any advice you may have.

Cheers.
  1. more than a month ago
  2. RO CSVI
  3. # 2
Accepted Answer Pending Moderation
Hello,
If it's just CSVI's coding to set the published state of the image the same as the published state of the product, is there a work around I could do to always set the published state of the image to "published'?

One solution is that you have your own override file for product import where you set your image to published by default. Override functionality is something which is coming in our next CSVI release but you can try the patch from the post here and follow the instructions given there. After that In your override file product.php search for the line
$media['published']= $this->getState('published');
and change it to
$media['published']=1;
so your image is always published. Try it and see if it solves your problem.
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. # 3
Accepted Answer Pending Moderation
That did it!

It took me a little to figure out where to stick the file, because I'm a little tired and also the instructions are a little hazy and non-specific... but I got there in the end!

So I changed the "Products.php" file as requested, then placed it in "public_html/administrator/templates/isis/html/com_csvi/com_virtuemart/model/import" (obviously not "com_k2" because that's a different product...) and vwaola! I was then able to select the "Products" drop down in the Edit Template>Details menu under advanced.

Thanks for your help! You guys rock! (as usual).
  1. more than a month ago
  2. RO CSVI
  3. # 4
Accepted Answer Pending Moderation
Hello,

Apologies for the hazy instructions, we will clean that up once this feature is out. Glad to hear you figured it out and it is all working now.
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. # 5
  • Page :
  • 1


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