Jump to content

Updating Products via csv


Recommended Posts

Hi all - I've recently taken over a website which operates Cubecart and I'm just having a fiddle about and have a few queries which I'm hoping techies will be able to answer or alternatively offer assistance on.

1. Is there a way of editing products via csv import rather than having to change each one manually. I am aware that there is a replace inventory tick box (will this remove and replace everything with the latest import or just the products the import replaces?) Usually the only things that would change would be price and it would be easier to update 500 products at a time by re-importing the csv file. FYI I have over 10,000 individual products and I'd rather not take the risk of re-importing everything again.

2. Are there any ways of bulk assigning an image to a product? Currently I have uploaded all images by FTP but having to individually upload them via the Images Tab in each Product can be painstaking to say the least compared to say Woocommerce.

Any help would be appreciated.

Regards,

Aron

 

Link to comment
Share on other sites

Welcome to the forums, @Match Attax Outlet !

I'm not the one to help with this, but someone who can would want to know what version you are on, as there have been some recent changes to FileManager behavior in the last few upgrades. If you create a Signature (Look in your forum Account) you should also add what skin you are using and any other useful information about your hosting situation.

Link to comment
Share on other sites

For editing products, you could bulk edit via PHP MyAdmin using an SQL query if you wanted to modify a number of products en mass.

For instance, lets assume you sell shoe laces, but someone forgot to add the word 'cotton' to them, you could run a query along the lines.

 

UPDATE `CubeCart_inventory`

SET `description` = replace(description, 'shoe laces', 'cotton show laces')

 

Alternatively, you could export the database inventory table as a CSV, perform your cut and paste edits etc, then import it back in to the database.

making a backup copy beforehand though.

 

 

Images is a different story though.

In previous versions, the image file name was part of the inventory table, so would have been easy enough, however, each image is now allocated a number, and that number is part of another table. All quite complex to fudge.

Link to comment
Share on other sites

Thanks @keat unfortunately my knowledge of SQL is zero :( the only fields I'd be changing regularly is Stock and Price.

I've have over 10,000 Products split into 10 subcats so don't really want to be re-importing the csv (for the sake of price updates to a subcat) in case data is lost.

I just thought there would be a quicker way of doing this.

Thanks - Aron

 

Link to comment
Share on other sites

Data shouldn't be lost provided you copy the database table first.

Any changes I make in the database, I always ensure that i have a copy of the live data.

Exporting the inventory table as a CSV is pretty painless, and usually takes only seconds.

I could spend days working on a CSV copy, and when I'm happy with my edits, I'll copy the original table (so I have a backup) and then import the one I've been working on back in.

If anything went wrong, it's easy to roll back, again in seconds.

 

Link to comment
Share on other sites

If all your items have a single price, then everything you need is in the inventory table. Product Code, Product Name, Description, Price etc etc.

If you have price breaks ie £1.00 for 1 item, £9 for 10 items and £75.00 for 100 items, then it gets complicated, and you're probably better off doing it through Cubecart.

Link to comment
Share on other sites

4 hours ago, havenswift-hosting said:

Just taken a look at that script and it looks very good - a great contribution !  The warnings about security and protecting it from unauthorised access are important for anyone looking to use it otherwise something could make a real mess of your store but the documentation looks very good !

Thanks! I wrote it for my own use and figured I'd toss it up on GitHub. It's not a pretty interface and some of the product warnings aren't useful / entirely accurate, but it gets the job done. ;)

For the OP, it doesn't update stock levels, but with a little MySQL/PHP knowledge, it wouldn't be difficult to modify it to do so.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...