cs-cart 4.22 - product import - php

I'm attempting to upload products using a CSV, but a few things are not working as properly.
The product images are not being uploaded at all, The csv field for 'Image detail' has only the name of the file, without anything else, and all the images are uploaded to var/exim/backup/images, Am I missing something?
My stock is managed using product combination, Each combination is a mixture of size and color, However the "combination" field, that's required by CS-cart, is no where to be found manually, only after adding a combination by hand and then checking the database, is the combination field avaiable, that means I cannot use the csv method unless I have a complete table of long product code to actual sizes and colors. Just for reference, this is my combination field in the database for one given combination : 383_1473_459_1701, this is for mediu, green. - How can I upload combinations using CSV without knowing the combination field?
thanks in advance!

I should inform you that starting from CS-Cart or Multi-Vendor version 4.1.1 images can be imported only from the /path/to/cart/var/files/ directory. So you should move all your images to the var/files/1 directory (or its any subdirectory) and correct the path in the Images directory field on the Administration > Import data > Products > Images page in your store admin panel.
For example, if you move your files to the var/files/1/images directory, you should specify images in the Images directory field. Please check it.
I know its quite confusing but I've managed to find out by looking into their forums and seeing that you must put your image files to: /public_html/var/files/1/exim/backup/images/

I can only answer 1: You need to manually upload the images from the old directory to the new directory. (when you are importing the products, there is an image url, that is the folder you must put your images, using ftp, etc.)

Related

How to add PDF files in a database and be able to search for them through a website using phpMyAdmin

I am working on a website and the owner wants to use PDF files to show the contents of a bill for users to see what they owe. He wants to be able to search through the website using specific search criteria. For example, the PDF number, a certain town, a certain year etc... I have a form already made to use to search for these PDF files, I just don't know how to store the PDF files in the database using phpMyAdmin. Can anyone help?
I think you should keep all the metadata and filename in the database and store the actual files in uploads/ directory. When you search for a file by its ID, city or whatever, you'll retrieve the filename and you'll be able to redirect to a particular file.
Personally I'd change all filenames to uniqid().'.pdf' so that they don't repeat and have constant length.

Upload images via CSV data onto server

We have a site where users can add listings and they can optionally add images to these listings. Now we are working on a Excel bulk lister which spits out a formatted CSV file. However we're wondering how we can go about doing the image upload part as obviously it's not going to work if the user just enters the location of the image on their hard drive.
Is there any other method we can do what we are wanting to achieve? ...or will we need to think outside the box here?

PyroCMS - Pyrostreams multiple file upload on one entry

I've got the PyroStreams module for PyroCMS and made a stream called portfolio. Everything is working as expected, however it only allows to upload just one image for my file field. That is obvious, but I'd like to know if there's a way to upload multiple images for one stream entry without adding x number of extra file fields. Or do I need to code an extra field type myself to support this? Maybe someone's got it already?
Thanks
According to me you have to create a separate database table that will hold all the images those are related to particular portfolio and the portfolio id by id by which you can fetch the images for particular record and then use any multiple image upload library like http://www.plupload.com/example_queuewidget.php to upload multiple images in the portfolio image table. Hopefully this will help you in achieving what you want.
There's a multi-upload files field type available on the pyrostore.

Magento : Problem in Importing the csv file

I have a csv file with 2 records. but when i try to upload this file through the magento upload module it's uploading more than 196 records. I crossed check with everything in my file only 2 records are there. What's the problem? It's related to cache or index something??
For your reference i attached the screenshot of the page also.
You probably have records stuck in dataflow_batch_import that are reimporting.
It's a common problem to have stuff stuck in dataflow_batch_(import|export) and Nexcess has a nice cleanout tool here. Dataflow Batch Table cleanout
You can also monitor various log tables for bloat and also look at dataflow table contents with this script to see if you have stuck items before doing another import. Log Table Monitor
Dataflow Import also keeps each import file you've uploaded (var/import will get littered with these unless you manually delete them). Make sure you are choosing the latest file you've uploaded when you go to run the profile. The numbers at the front of the file names in the dropdown list are date/time stamps.

cakephp set field in this->data to a related field in database

I am trying to upload multiple images using meioupload which works fine if I set image.1.field and then image.2.field for each field of data. Then loop through and create/save rather than saveall.
My problem comes when I have field which is used as a subfolder for the image within an images folder.
for example I have a form
image.1.product id
image.1.artist
image.1.file to upload
image.2.product id
image.2.artist
image.1.file to upload
now when the items are saved, all data is correct including the belongsto relationship of product id, except the second image is stored in the wrong place.
The first image is stored in images / image.1.artist / file
the second image is stored in images / image.1.artist / image.2.artist / file
This is extremely annoying, and it is simply someting to do with the way the meioupload behaviour sets the subfolder to be a field from the array.
The way I have had to resort to saving the data is by looping through and creating then saving the values, which isnt a problem, but it obviously doesnt work with this method of setting a sub folder.
So a solution could possibly be to simply set the second artist field as blank and only add multiple images for the same artist..
Or to set the data field of artist to the actual field of artist in the related product the image will belong to, but I can't seem to get this to work?
So the question is how can I set the value of this field to the related products artist field that is already in the database for each seperate create/save?
ps. I am sorry if this is a bit long winded.
Right so the problem came because I was sending $this->data as 2 arrays. The solution was to read this->image->product->field('artist') and set it to this->data['Image'][1]['artist'].
This way it sets the field in the first array to artist, which in this particular meioupload behaviour will roll over to the second array of data and hence the image upload (which will then be suffixed with a /) This allows me to upload the images to their corresponding artist directory whilst creating 3 thumbnails and saving the relations, file info and so on.
I found that this doesn't seem to make a difference to loading the images (images work fine even though the display code effectively has two / in it, because the second image will be saved in the database as /dir/artist/ as a pose to the first one which is saved /dir/artist)
IF anyone has an ingenious way to call meioupload one at a time then this would hopefully avoid this slight issue, and then more and more images could be added into the same form..alas I am not clever enough to know how to do this yet..
Any help would be much appreciated!!!!

Categories