Guest mkjewels Posted April 13, 2010 Share Posted April 13, 2010 Hi Guys, I need a way to use HTML in my product description to use more than 1 image when viewing product details. I currently mass upload products via CSV directly into the database, the problem is that the description is inclosed with "" each and every time, I can't seem to figure this one out, please help me :-) regards Devan Quote Link to comment Share on other sites More sharing options...
bsmither Posted April 14, 2010 Share Posted April 14, 2010 You haven't given us sufficient details to offer a solid solution, so let's start by asking: 1. What is the application or utility that is creating the CSV file? 2. The fields of a CSV file can actually be delineated with a comma, a tab, a pipe, or a space (rarely). What is the delineation of your CSV file? 2a. The reason that quotes surround some data is that the field content itself may have instances of the delineation: a comma, a tab, a space, etc. 3. Can you verify that a description enclosed in quotes is truly a problem? 3a. What is exactly the undesired effect that the product description enclosed in quotes causes? 3b. Does, in fact, removing the quotes AFTER importation (that is, editing the content as it sits in the database) remove the undesired effect? 3c. Does removing the quotes BEFORE importation (that is, editing the content as it sits in the CSV file) cause any other undesired effects? 4. What is the application or utility that that is reading in the CSV file? The product's description actually is unmanipulated HTML. Whatever is in the _inventory table description field gets sent to the browser as is (I'm almost sure about that). So, you must be seeing a product's description text in the View Product page with a leading and finishing quote. Smart CSV importers can determine if a data item can have it's surrounding quotes stripped. Quote Link to comment Share on other sites More sharing options...
Guest mkjewels Posted April 14, 2010 Share Posted April 14, 2010 You haven't given us sufficient details to offer a solid solution, so let's start by asking: 1. What is the application or utility that is creating the CSV file? 2. The fields of a CSV file can actually be delineated with a comma, a tab, a pipe, or a space (rarely). What is the delineation of your CSV file? 2a. The reason that quotes surround some data is that the field content itself may have instances of the delineation: a comma, a tab, a space, etc. 3. Can you verify that a description enclosed in quotes is truly a problem? 3a. What is exactly the undesired effect that the product description enclosed in quotes causes? 3b. Does, in fact, removing the quotes AFTER importation (that is, editing the content as it sits in the database) remove the undesired effect? 3c. Does removing the quotes BEFORE importation (that is, editing the content as it sits in the CSV file) cause any other undesired effects? 4. What is the application or utility that that is reading in the CSV file? The product's description actually is unmanipulated HTML. Whatever is in the _inventory table description field gets sent to the browser as is (I'm almost sure about that). So, you must be seeing a product's description text in the View Product page with a leading and finishing quote. Smart CSV importers can determine if a data item can have it's surrounding quotes stripped. Hi, 1.) I'm using excel 2007 to generate the CSV file 2.) delineated with a comma 3.) I am trying to import HTML code directly to the databse ( a image link in source code ie <img scr="http......."/> ) but once loaded to the database it comes out all wrong and not a image link at all, hyperlink yes, but to nothing! the import from CSV to database some how breaks / changes my html code. 4.) Im using phpmyadmin to import from CSV to the database. If you can help, I will really appreciate it. Problem is I need 2 images to show for each product, cc3 default is 1 image, so I am trying to import the 2nd image via the product description in HTML form, am I doing something wrong or is it that the phpmyadmin changes my HTML string in the product description before saving it to the database? many thanks Devan Quote Link to comment Share on other sites More sharing options...
vokf Posted April 14, 2010 Share Posted April 14, 2010 I can recommend OpenOffice as being far better as CSV type Export than MS Office. This isn't MS Office bashing - just experience. The same applies to import. Cubecart will actually run a mySQLSafe on most data sent to the database. This will handle quotes etc, mainly as a security feature (to help prevent "bobby tables"), but also to ensure quotes are actually stored correctly in the table. So... you either need to swap your quotes to apostrophes or delimit your quotes. MS Office, or OpenOffice can do this easily. Quote Link to comment Share on other sites More sharing options...
bsmither Posted April 14, 2010 Share Posted April 14, 2010 OK, since this seems to be moving away from CubeCart functionality to CSV file processing, I suggest going to Private Messaging. Quote Link to comment Share on other sites More sharing options...
Guest mkjewels Posted April 15, 2010 Share Posted April 15, 2010 Hi Guys, I need a way to use HTML in my product description to use more than 1 image when viewing product details. I currently mass upload products via CSV directly into the database, the problem is that the description is inclosed with "" each and every time, I can't seem to figure this one out, please help me :-) regards Devan many thanks to bsmither for all the help and sending me in the right direction to help me solve this issue. regards devan Quote Link to comment Share on other sites More sharing options...
bsmither Posted April 15, 2010 Share Posted April 15, 2010 The solution did not involve CubeCart. An additional consideration in the creation of the CSV file solved the OP's issue. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.