Encerrado

Fix Magento error 1452

i have this error in my magento with fresh installation. it happen when i try to add a new product with this code

$newproduct->setSku((string)$item->itemId)

->setAttributeSetId(9)# 9 is for default

->setTypeId(Mage_Catalog_Model_Product_Type::TYPE_SIMPLE)

->setName(utf8_encode($item->title))

->setWebsiteIDs(array(1)) # Website id, 1 is default

->setDescription(utf8_encode($text))

->setShortDescription(utf8_encode($item->title))

->setMetaTitle((string)$item->subtitle)

->setMetaKeyword((string)$item->subtitle)

->setPrice($price) # Set some price

->setWeight(10)

->setStatus(Mage_Catalog_Model_Product_Status::STATUS_ENABLED)

->setVisibility(Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH)

->setTaxClassId(1)

->setStockData(array( "use_config_manage_stock" => "1", "original_inventory_qty" => "1", "qty"=> "99999", "use_config_min_qty" => "1", "use_config_min_sale_qty" => "1", "use_config_max_sale_qty" => 1, "is_qty_decimal" => "0", "use_config_backorders" => "1", "use_config_notify_stock_qty" => "1", "use_config_enable_qty_increments" => "1", "use_config_qty_increments" => "1", "is_in_stock" => 0 ))

->setCreatedAt(strtotime('now'));

$newproduct->save();

=================

exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 1452 Cannot add or update a child row: a foreign key constraint fails (`magento/catalog_product_entity`, CONSTRAINT `FK_CAT_PRD_ENTT_ATTR_SET_ID_EAV_ATTR_SET_ATTR_SET_ID` FOREIGN KEY (`attribute_set_id`) REFERENCES `eav_attribute_set` (`attribute_set_id`) ON DELE)' in C:\AppServ\www\magento\lib\Zend\Db\Statement\[url removed, login to view]

could somebody help please.

Habilidades: Comércio eletrônico, Magento, PHP, Carrinhos de compras

Veja mais: magento 1452, references `eav_attribute_set` `attribute_set_id`, pdo website, php pdo, pdo, magento sqlstate hy000 general error, 1452, general error 2013, add foreign key constraint, add update child row foreign, magento add update child row foreign key, magento update product php, foreign key, magento qty, zend help, exception pdoexception message sqlstate, magento product qty, magento general error 1452 add update child, error 1452 sqlstate, pdoexception, error 1452 add update child row, add update child row foreign magento, sqlstate hy000 magento, update sqlstate hy000 general error, 1452 foreign key constraint

Acerca do Empregador:
( 20 comentários ) Armenia, Colombia

ID do Projeto: #5135250

18 freelancers estão ofertando em média $55 para esse trabalho

nmans

We are highly interested to work with you on this project and can assure you quality results ready to start immediately some of our developed websites are listed below E-commerce [login to view URL] ht Mais

$257 USD in 3 dias
(454 Comentários)
8.3
ktinfosoft

Sir, I am working on magento from early 2008, at the first release of magentocommerce. I have customize magento on many parts of this secure package. I have experienced to work with most recent stable version of mag Mais

$44 USD in 2 dias
(390 Comentários)
8.2
KatrinaQ

Hello I can assist you with this now. **************************************************************************************

$30 USD em 1 dia
(832 Comentários)
7.9
dannv

Hi, I was working with magento from 2008. I often provide Magento extension and Magento theme. I have exp with upgraded, import data, themes, tax, payment, sales, shipping, SEO, etc... Please see my profile for mor Mais

$34 USD em 1 dia
(291 Comentários)
7.2
morff

I have read your project description, i understand what you want, and i would like to offer you my services. I have strong knowledge of Magento, and plenty of experience with it, most importantly including fixing vario Mais

$30 USD em 1 dia
(298 Comentários)
7.3
mtavartkiladze

Hello, I have solved this kind of error with other magento websites, if your interested contact me thanks

$25 USD em 1 dia
(92 Comentários)
6.9
kiutisuperking

I have read your job posting and am sure can do the job. I have more than 4 year experience in magento so I have done a lot of tasks like yours before. It would be great if I have a chance to discuss with you more. Mais

$30 USD em 1 dia
(262 Comentários)
7.3
froiden07

Hello, Hope you remember me.. I think i can fix...lets do it... Regards Froiden .................. .........................

$30 USD em 1 dia
(217 Comentários)
7.3
zyeloncomputech

Hi sir, Thank you for giving opportunity for biding... we have gone through your requirements and we can fix your magento error according to your exact requirements. Please Before Awarding this project to others Mais

$190 USD in 5 dias
(199 Comentários)
7.0
bhupal123

Magento Expert we can do Magento Expert we can do Magento Expert we can do Magento Expert we can do Magento Expert we can do Magento Expert we can do

$30 USD in 3 dias
(319 Comentários)
6.1
tyna

Hello prosperidad,I have a experience in prestashop, I can fix it for you. Please pm for you. Thank you!

$25 USD in 2 dias
(28 Comentários)
5.5
usha12345

Hello, I have gone throw your requirement. i have understand this error i have 4+ experiences in magneto I have solid work experience in magento website design and development . i am looking forward your rep Mais

$30 USD em 1 dia
(19 Comentários)
4.7
TheCupiD

Hi, I am Expert in "Magento" with a huge experience of Developing Magento Stores, Magento Extensions and Magento Themes. I am expert in Magento custom Plug-in developing, System Optimization ,Payment Gateway, Custom Mais

$40 USD em 1 dia
(24 Comentários)
4.1
pratham30

Introducing myself as Magento Developer having having 5+yrs of experience in working with magento. I have been working with highly feature loaded store with customized solutions & concept driven programming. I have spe Mais

$50 USD em 1 dia
(15 Comentários)
4.2
northbangelsoft

Hello sir I have great experience about [login to view URL] you hire me I will do the job as per your [login to view URL] hire me.I am waiting for your response. thanks

$35 USD in 3 dias
(17 Comentários)
3.6
akupaku

Hello, I saw your [login to view URL] will complete this project successfully with your all requirements.

$15 USD in 3 dias
(11 Comentários)
3.6
sharadpatel1914

Dear Hiring Manager , I have just seen your Job posting and upon reading thoroughly, I felt strongly that I would be the most qualified contractor for your job. Over the last couple of years, I have provided my Web Mais

$77 USD in 3 dias
(3 Comentários)
1.3
camila1984

Hi! See if this helps you [login to view URL]

$20 USD in 3 dias
(0 Comentários)
0.0