Jump to content

ambitos

Members
  • Posts

    4
  • Joined

  • Last visited

Profile Information

  • Activity
    Developer

ambitos's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. I think the correct code for the trigger is this DELIMITER $$ CREATE /*[DEFINER = { user | CURRENT_USER }]*/ TRIGGER `change_active_after_update` AFTER UPDATE ON `ps_stock_available` FOR EACH ROW BEGIN UPDATE ps_product_shop SET active = IF(NEW.quantity <= 0,0,1) WHERE id_product = OLD.id_product; END$$ DELIMITER ;
  2. Can you please show all your c# code? I am trying to add new category with c# and I have problems. Thanks
  3. Hello. I try to add a product via web service and I receive bellow error code: RETURN HTTP BODY <?xml version="1.0" encoding="UTF-8"?> <prestashop xmlns:xlink="http://www.w3.org/1999/xlink"> <errors> <error> <message><![CDATA[internal error. To see this error please display the PHP errors.]]></message> </error> </errors> </prestashop> I am searching 2 days but nothing. Please can anyone help me? My Code is below. define('DEBUG', true); define('_PS_DEBUG_SQL_', true); define('PS_SHOP_PATH', 'http://localhost/dev...shop/trunk/src/'); define('PS_WS_AUTH_KEY', 'CBYB5G5UVRA7FCN7JK2WZ625DFWG8SK3'); require_once ('./PSWebServiceLibrary.php'); $webService = new PrestaShopWebservice(PS_SHOP_PATH, PS_WS_AUTH_KEY, DEBUG); $opt = array('resource' => 'products'); $xml = $webService->get(array('url' => PS_SHOP_PATH.'/api/products?schema=synopsis')); $resources = $xml->children()->children(); unset($resources->position_in_category); unset($resources->manufacturer_name); $resources->price = '1000'; $resources->active = '1'; $resources->quantity = '50'; $resources->link_rewrite = 'blabla'; $resources->name->language[0][0] = 'blabla'; $resources->description->language[0][0] = '<p>blabla</p>'; $resources->description_short->language[0][0] = 'blabla'; $resources->associations = ''; $opt = array('resource' => 'products'); $opt['postXml'] = $xml->asXML(); $xml = $webService->add($opt);
  4. Hello. I try to add a product via web service and I receive bellow error code: RETURN HTTP BODY <?xml version="1.0" encoding="UTF-8"?> <prestashop xmlns:xlink="http://www.w3.org/1999/xlink"> <errors> <error> <message><![CDATA[internal error. To see this error please display the PHP errors.]]></message> </error> </errors> </prestashop> I am searching 2 days but nothing. Please can anyone help me? My Code is below. (Same with code in top) define('DEBUG', true); define('_PS_DEBUG_SQL_', true); define('PS_SHOP_PATH', 'http://localhost/dev/clients/Anthagora/Prestashop/trunk/src/'); define('PS_WS_AUTH_KEY', 'CBYB5G5UVRA7FCN7JK2WZ625DFWG8SK3'); require_once ('./PSWebServiceLibrary.php'); $webService = new PrestaShopWebservice(PS_SHOP_PATH, PS_WS_AUTH_KEY, DEBUG); $opt = array('resource' => 'products'); $xml = $webService->get(array('url' => PS_SHOP_PATH.'/api/products?schema=synopsis')); $resources = $xml->children()->children(); unset($resources->position_in_category); unset($resources->manufacturer_name); $resources->price = '1000'; $resources->active = '1'; $resources->quantity = '50'; $resources->link_rewrite = 'blabla'; $resources->name->language[0][0] = 'blabla'; $resources->description->language[0][0] = '<p>blabla</p>'; $resources->description_short->language[0][0] = 'blabla'; $resources->associations = ''; $opt = array('resource' => 'products'); $opt['postXml'] = $xml->asXML(); $xml = $webService->add($opt);
×
×
  • Create New...