Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

Hey all,

 

Something weird has started to happen. I have a store with 750 products. I've been importing beautifully for the past 30 days without a problem.

 

Recently, easypopuplate started to choke on apostrophes. My product name and desctiptions, sometimes, contains both quotations and apostrophes.

 

I know its the apostrophes because I will fix the product that easy populate chokes on and the next product it chokes on is the very next product that has an apostrophe either in the product name or description.

 

What baffles me is that even tab import files I've used preivously are choking now so basically files that imported perfectly before now choke on specific products.

 

Here is a snippet of the actual error I get upon importing, there is a bunch of successful updates and then this:

 

----------Begin ------------------------------

 

| 9333343000 | | 2002 Torbr | 95 points | | 48.99 | 3.00 | | | 10 | | Import | Australia | Aussie Shi | Taxable Go | Active Updated

| 1138042 | | 2002 Penny | Cassis, Li | | 28.99 | 3.00 | | | 22 | | Import | Australia | Aussie Shi | Taxable Go | Active Updated

1064 - You have an error in your SQL syntax near 's Hill Shiraz', products_description='Cassis, Licorice & Eath-92 points ' at line 2

 

UPDATE products_description SET products_name='2002 Penny's Hill Shiraz', products_description='Cassis, Licorice & Eath-92 points Robert Parker-The 2002 Shiraz is an elegant yet powerful red aged 22 months in 80% French and 20% American oak barrels. Deep ruby/purple-colored, with full body, and loads of blackberry, cassis, licorice, earth, and vanilla aromas as well as flavors, this chewy Shiraz possesses good underlying acidity along with fine definition and purity. It should drink well for 7-8 years.', products_url='' WHERE products_id = '2689' AND language_id = '1'

 

----------End ---------------------------------

 

It chokes on a product called Penny's Hill Shiraz and the actual row in the tab delimited file looks llike this:

 

----------Begin -------------------------------

 

1138042 2002 Penny's Hill Shiraz "Cassis, Licorice & Eath-92 points Robert Parker-The 2002 Shiraz is an elegant yet powerful red aged 22 months in 80% French and 20% American oak barrels. Deep ruby/purple-colored, with full body, and loads of blackberry, cassis, licorice, earth, and vanilla aromas as well as flavors, this chewy Shiraz possesses good underlying acidity along with fine definition and purity. It should drink well for 7-8 years." 28.99 3.00 22 Import Australia Aussie Shiraz Taxable Goods Active EOREOR

 

-----------End ---------------------------------

 

The only inconsistency I can see between this line and other products is that the 2nd column (product name), on other products, has quotes around it. But there are products that do have quotes that import fine.

 

The next product that it stalls on, has apostrophe in the description which is the 3rd column. So on and so forth.

 

What confuses me, again, is that I was importing fine before with this file structure and I can't pinpoint what changed in the past week that would create this type of scenario.

 

Any thoughts would be appreciated.

 

Thanks

 

Alan Wang

Posted

Well the only fix I could come up with for the time being is the do a Global Search and Replace of ' to \' whicih just escapes it.

 

Anyone have any suggestions on why that is happening and if I'm not enabling a feature that escapes the ' anyways?

 

Thanks

 

Alan

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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...