[Solved] (ID 1) cannot be saved, cvs import - Development - PrestaShop

Jump to content

Photo

[Solved] (ID 1) cannot be saved, cvs import

#1

Posted 29 December 2010 - 01:11 AM

ctech

    PrestaShop Newbie

  • Members
  • Pip
  • 10 Active Posts
so i manually put this" "Stocked in China into ps_product_lang::available_later field.
the cvs import tool does some error checking and does not like html in this field.....
what i didnt expect is if only update the fields name,id,img() that it would do error checking on whats already in the db, WOW.
anywho i need to disable this error checking where do i start???

#2

Posted 29 December 2010 - 01:35 PM

CYTechnologies

    PrestaShop Apprentice

  • Members
  • PipPip
  • 156 Active Posts
Can we see a sample line item from the import? :)
CYTechnologies - Professional Website Design and Development

Free & Paid PrestaShop Modules

GetCustomerRated.com - Get Customer Rated allows a business to capture genuine word of mouth advertising and place it in a virtual player on their website. (Serving US clients only at this time)

#3

Posted 29 December 2010 - 03:32 PM

ctech

    PrestaShop Newbie

  • Members
  • Pip
  • 10 Active Posts
sure:
"1","http://server17.hosting24.com/~semisane/product_img/TL-WR541G.jpg","TL-WR541G"
,"","TL-WR541G"

and a picture of ps_product_lang row one. i think the available_later is the problem
(edit) content of the DB before the insert/update

Attached Files



#4

Posted 30 December 2010 - 06:44 AM

rocky

    PrestaShop Legend

  • US Moderators
  • 10229 Active Posts
It's line 192 of classes/Product.php that prevents you putting HTML in the available_later field:

'description' => 'isString', 'description_short' => 'isString', 'available_now' => 'isGenericName', 'available_later' => 'IsGenericName');


The isGenericName function generates an error if you use any of the characters ^<>;=#{}

To allow HTML, change the line to:

'description' => 'isString', 'description_short' => 'isString', 'available_now' => 'isGenericName', 'available_later' => 'isCleanHtml');


This will allow all HTML except Javascript and events.
Nethercott Constructions - PrestaShop modules and guides

#5

Posted 30 December 2010 - 06:44 PM

ctech

    PrestaShop Newbie

  • Members
  • Pip
  • 10 Active Posts
available_later' => 'isGenericName', seems to remove all the html so i just removed that from the array.
that was very helpful

thank you very much!!!!


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cookies help us deliver our services. By using our services, you agree to use our cookies.     Learn more