Jump to content

Dares8

Members
  • Posts

    3
  • Joined

  • Last visited

Profile Information

  • Location
    Sevilla
  • Activity
    Project Owner

Dares8's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hi, I am trying to synchronize stock of several webs using Webservice. I am using PUT with stocks_availables but it only works in Prestashop 1.6. If I try it with Prestashop 1.5.6.2 return the next error: object(PrestaShopWebserviceException)#717 (7){ [ "message":protected ] => string(102) "This call to PrestaShop Web Services failed and returned an HTTP status of 404. That means:Not Found." [ "string": "Exception":private ] => string(0) "" [ "code":protected ] => int(0) [ "file":protected ] => string(73) "/usr/home/myweb.com/web/modules/mymodule/PSWebServiceLibrary.php" [ "line":protected ] => int(84) [ "trace": "Exception":private ] => array(8) { [ 0 ] => array(6) { [ "file" ] => string(73) "/usr/home/myweb.com/web/modules/mymodule/PSWebServiceLibrary.php" [ "line" ] => int(327) [ "function" ] => string(15) "checkStatusCode" [ "class" ] => string(20) "PrestaShopWebservice" [ "type" ] => string(2) "->" [ "args" ] => array(1) { [ 0 ] => int(404) } } [ 1 ] => array(6) { [ "file" ] => string(82) "/usr/home/myweb.com/web/modules/mymodule/controllers/front/sync.php" [ "line" ] => int(107) [ "function" ] => string(4) "edit" [ "class" ] => string(20) "PrestaShopWebservice" [ "type" ] => string(2) "->" [ "args" ] => array(1) { [ 0 ] => array(3) { [ "resource" ] => string(16) "stock_availables" [ "putXml" ] => string(510) " 12063 1806 0 1 0 95 0 2 " [ "id" ] => string(5) "12063" } } } } [ "previous": "Exception":private ] => NULL } In the Prestashop 1.5 documentation (http://doc.prestashop.com/display/PS15/Web+service+reference#Webservicereference-AvailableHTTPmethods) appears some exceptions, among them is stock_available. Stock_available only allow GET, POST and HEAD, however in webservice window you can only select GET, PUT and HEAD. How could I do it? Thanks!
  2. Buenas tardes, He duplicado una web prestashop y me sale el siguiente error: ------ Notice: Undefined index: logo in /usr/home/example.es/web/tools/smarty/sysplugins/smarty_internal_templatebase.php(156) : eval()'d code on line 69 Notice: Trying to get property of non-object in /usr/home/example.es/web/tools/smarty/sysplugins/smarty_internal_templatebase.php(156) : eval()'d code on line 69 ----- La versión del pretashop es la 1.6.1.3 y he probado a deshabilitar la caché, actualizar prestashop y activar el modo de depuración para desactivar los módulos no nativos, pero me sigue saliendo el mismo error. Espero que me puedan ayudar. Muchas gracias de antemano.
  3. Buenos días, necesito sincronizar el stock de los productos de varias tiendas prestashop. Para sincronizar el stock estoy usando el hook "UpdateQuantity" para que cada vez que se realize un cambio se actualize en las demás tiendas. El problema es que este hook solo me dice la cantidad actualizada del producto, sin embargo, necesito saber cual es la diferencia entre la cantidad actual y la antigua para poder informar a las demás tiendas. En un principio modificando la llamada al hook en la clase SotckAvailable y añadiéndole la cantidad antigua puedo saber la diferencia, pero el problema es que cuando un cliente realiza un pedido el hook es llamado desde la clase Core_Business_Stock_StockManager y esta clase no sé como la puedo sobreescribir. ¿Cómo podría obtener la diferencia en este caso? Muchas gracias, saludos.
×
×
  • Create New...