Jump to content

T.Baron

Members
  • Posts

    23
  • Joined

  • Last visited

Profile Information

  • Location
    Lille
  • First Name
    Tristan
  • Last Name
    Baron

T.Baron's Achievements

Newbie

Newbie (1/14)

0

Reputation

3

Community Answers

  1. Bonjour à tous, J'ai mis en place un script qui, via les webservices de Prestashop, viendrait mettre à jour le mot de passe d'un client. C'est une requête en POST qui récupère le client via son adresse email. Le problème c'est qu'il n'arrive pas à mettre à jour le mot de passe, il s'arrête juste avant et me retourne plusieurs erreurs du genre : [PHP Warning #2] SimpleXMLElement::__construct(): namespace error : Namespace prefix xlink for href on id_default_group is not defined (/home/XXX/site/classes/webservice/WebserviceRequest.php, line 1374)] J'ai beau relire mon code, impossible de trouver ce qui pourrait coincer. J'ai d'autres utilisations des webservices sur ce site qui fonctionnent très bien (création de client par exemple). Le code PHP : <?php define('DEBUG', true); define('PS_SHOP_PATH', 'XXXXXXXXX'); define('PS_WS_AUTH_KEY', 'XXXXXXXX'); require_once('./PSWebServiceLibrary.php'); require_once('./Encrypt.php'); $email=$_POST['email']; $decrypted=$mcrypt->decrypt($_POST['passwd']); $passwd=$decrypted; try { $webService = new PrestaShopWebservice(PS_SHOP_PATH, PS_WS_AUTH_KEY, DEBUG); $filter = array( 'email' => $email ); $opt = array( 'resource' => 'customers', 'display' => 'full', 'filter' => $filter ); $xml = $webService->get($opt); $resources = $xml->children()->children(); $customer_id = $resources->customer->id; $resources->customer->passwd = $passwd; // Appel du web service $opt = array('resource' => 'customers'); $opt['putXml'] = $xml->children()->asXML(); $opt['id'] = $customer_id; $xml = $webService->edit($opt); echo "Successfully updated"; } catch (PrestaShopWebserviceException $ex) { $trace = $ex->getTrace(); if ($trace[0]['args'][0] == 404) echo 'Bad ID'; else if ($trace[0]['args'][0] == 401) echo 'Bad auth key'; else echo 'Other error<br />'.$ex->getMessage(); } ?> L'erreur retournée : <?xml version="1.0" encoding="UTF-8"?> <prestashop xmlns:xlink="http://www.w3.org/1999/xlink"> <errors> <error> <code><![CDATA[3]]></code> <message><![CDATA[[PHP Warning #2] SimpleXMLElement::__construct(): namespace error : Namespace prefix xlink for href on id_default_group is not defined (/home/XXX/site/classes/webservice/WebserviceRequest.php, line 1374)]]></message> </error> <error> <code><![CDATA[3]]></code> <message><![CDATA[[PHP Warning #2] SimpleXMLElement::__construct(): <id_default_group xlink:href="https://site.com/api/groups/3">3</id_default (/home/XXX/site/classes/webservice/WebserviceRequest.php, line 1374)]]></message> </error> <error> <code><![CDATA[3]]></code> <message><![CDATA[[PHP Warning #2] SimpleXMLElement::__construct(): ^ (/home/XXX/site/classes/webservice/WebserviceRequest.php, line 1374)]]></message> </error> <error> <code><![CDATA[3]]></code> <message><![CDATA[[PHP Warning #2] SimpleXMLElement::__construct(): namespace error : Namespace prefix xlink for href on id_lang is not defined (/home/XXX/site/classes/webservice/WebserviceRequest.php, line 1374)]]></message> </error> <error> <code><![CDATA[3]]></code> <message><![CDATA[[PHP Warning #2] SimpleXMLElement::__construct(): <id_lang xlink:href="https://site.com/api/languages/1">1</id_lang> (/home/XXX/site/classes/webservice/WebserviceRequest.php, line 1374)]]></message> </error> <error> <code><![CDATA[3]]></code> <message><![CDATA[[PHP Warning #2] SimpleXMLElement::__construct(): ^ (/home/XXX/site/classes/webservice/WebserviceRequest.php, line 1374)]]></message> </error> <error> <code><![CDATA[3]]></code> <message><![CDATA[[PHP Warning #2] SimpleXMLElement::__construct(): namespace error : Namespace prefix xlink for href on group is not defined (/home/XXX/site/classes/webservice/WebserviceRequest.php, line 1374)]]></message> </error> <error> <code><![CDATA[3]]></code> <message><![CDATA[[PHP Warning #2] SimpleXMLElement::__construct(): <group xlink:href="https://site.com/api/groups/3"> (/home/XXX/site/classes/webservice/WebserviceRequest.php, line 1374)]]></message> </error> <error> <code><![CDATA[3]]></code> <message><![CDATA[[PHP Warning #2] SimpleXMLElement::__construct(): ^ (/home/XXX/site/classes/webservice/WebserviceRequest.php, line 1374)]]></message> </error> </errors> </prestashop> Si quelqu'un a déjà eu ce genre de problème.... Merci d'avance pour votre aide
  2. UP Une idée sur l'origine de mon problème ?
  3. Bonjour, j'ai un soucis concernant l'accès à mon tunnel de commande. Depuis quelques jours celui m'envoie vers une erreur : "Cette page Web présente une boucle de redirection. ERR_TOO_MANY_REDIRECTS" Et voilà l'url qu'il me donne: /order?mediaplan=R3058819224&__utma=224152601.1340589435.1450450880.1455618360.1455639759.5&__utmz=224152601.1455555410.1.1.utmcsr%3D%28direct%29%7Cutmccn%3D%28direct%29%7Cutmcmd%3D%28none%29&PrestaShop-6bc3e09121183b9340f586e8daaf1d9a=VNuqloAQQGU%3DEX1X47jlI7E%3DN8SHgHAG5lU%3DkjFieV%2B9%2B0g%3DoUmWn%2BpO9Eo%3D4ulvyJ23oC8%3DsDd9kCd%2BPwg%3D7O86rfl4JDE%3DRpuCzLAc2s8%3Db8gCn8oMw%2FQ%3DhAY9E3Tr%2BIs%3DM8YDso26EV4%3DeImBY4YljDM%3DLHNt26kSSjo%3DwyDboMaZg0Q%3D1GXg3nMITCs%3DjbCafDEDjSE%3DzM7rwnPSY2A%3DBk9U7M9dZsQ%3DvE4jXsy1UyM%3Ds24iXNyUEik%3D1A0MBLCO6Ts%3Dx5TVPFkBgdY%3DcHH6619VwFE%3DoN4P9KtoRds%3DRT2L5gdAB8I%3D000201&PrestaShop-ad35c583fafbc8fd9a9b245798119248=VNuqloAQQGU%3Dfluo4N3Dz1U%3DFq3L2q8guQY%3D0Fg3NzQn1Hw%3DoUmWn%2BpO9Eo%3D4ulvyJ23oC8%3DsDd9kCd%2BPwg%3DLI46CVR%2FecA%3DDJi6rfGPhGs%3DDUOfUuAydCo%3D1tEw52Ip9Xo%3DJCIjruLVeEU%3DSrZvSF57Yqk%3DUeJlg%2FEtyRY%3DvqM96kFosz4%3D37Cxlk4jy70%3DleJgjzIfOV4%3D%2FZVagTn2wAk%3DTazzQ4Nh14I%3DmHSJultxH2A%3DTWSTv3R1ZNg%3DSwaTgfIuwuE%3DW65lb79jQAo%3D7V4tnbuYHO0%3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DCzZiR%2Bsnnv0%3D0U0sxpXFGFs%3Dibyc00eaEbg%3DzccbnAuGPdY%3D44PtnUkddH8%3DNWGSUrceHws%3D5avqZt6eKZw%3DVJpB6ZrdChM%3DgUrRjZsMz9U%3Dfci0FSKOZWw%3DmYVJhPMcreY%3Dd6s2weDmIRk%3Dyb0PPmz7phc%3DSAN%2BNlev%2BWM%3D%2BCYzL%2BBw6nI%3D3vjpjQizg0o%3DDtZDO6GigYg%3DGRomQLvBqwg%3DZ71kVp8DVg8%3DMuzcgsFtVi8%3DrG4E6b%2F4zWA%3DyVIscsCtjMQ%3D16G3W1ApOsc%3DLzNw%2ByVeXj0%3DG4uHYTY5pDY%3DObb4mzkswJU%3Ddok6q79U9Tg%3DeU6nkrxeMjg%3DS4jeSxbiK8g%3DPJVg2PQ%2F4yc%3DDd%2Bg%2BM7z3VE%3Ddok6q79U9Tg%3DCL4Bwfxszsg%3DpmMiqAqpTp0%3DwGtfOCosbEU%3D%2BgXUSKHhTBE%3DovFAdw70QZ4%3DrAcYwLLSBwU%3DheiRG%2BBOLaY%3Df21rBUOgpCU%3D8ZXwBaqdZu8%3DNt2mi1JhFs8%3DgHnqLsXsWFA%3DOaonLEkI6PY%3DSrFpzg04Ao8%3DDIjOk5qmc%2F4%3DPE%2FDn%2B%2BbkRA%3DNFuC5cuGw%2Bs%3DLzVpq2BacN0%3DrLUs%2FWKsBR0%3D49ubbj%2BZNUI%3DYZ1617n14a4%3DHFThHFrtZA8%3DeK18y8ietfw%3D001581&_gat=1&mediaplanBAK=R129324588&_ga=GA1.2.1340589435.1450450880 J'ai réussi à contourner le problème en passant mon tunnel de commande sur une seule page (/quick-order) qui lui fonctionne très bien. Je précise que j'ai supprimé la langue anglaise de ma boutique la semaine dernière, ce qui fait que toutes mes URLs ont perdu le /fr à la suite de mon domaine. Ce qui n'a causé aucune erreur ailleurs. Le contenu de mon .htaccess à la racine du serveur : SetEnv PHP_VER 5_3 SetEnv REGISTER_GLOBALS 0 Merci d'avance pour votre aide.
  4. Thanks tuk66 ! I'm looking at it right now. I'll post further informations if I solved this problem or if I find anything relevant to it.
  5. Hi, So we've had this problem for a long time. The best sellers module (prestashop's official module) is showing apparently random products. The list is always the same, however it doesn't fit the best sellers list I can see in stats. I've tried to reinstall best sellers modules, the block and the stats ones, which displayed other products but still wrong ones. I've looked at the php and the getBestSellers method doesn't seem to get the best selling products and instead is fixing prices from a list. Here's the code of the function : protected function getBestSellers($params) { if (Configuration::get('PS_CATALOG_MODE')) return false; if (!($result = ProductSale::getBestSalesLight((int)$params['cookie']->id_lang, 0, (int)Configuration::get('PS_BLOCK_BESTSELLERS_TO_DISPLAY')))) return (Configuration::get('PS_BLOCK_BESTSELLERS_DISPLAY') ? array() : false); $currency = new Currency($params['cookie']->id_currency); $usetax = (Product::getTaxCalculationMethod((int)$this->context->customer->id) != PS_TAX_EXC); foreach ($result as &$row) $row['price'] = Tools::displayPrice(Product::getPriceStatic((int)$row['id_product'], $usetax), $currency); return $result; } Any help and any tip is welcome ! Thanks
  6. Up I didn't find in which file it goes to load the new page. Any idea someone ? I think it might be a SQL mistake that seeks for something wrong, maybe because of a typo.
  7. I have the very same problem about filters and when I try to navigate through the pages in the orders list. I've been looking in controllers/admin/AdminOrdersController.php and js/admin/orders.js to find out where the problem comes from, but so far I've no clue about what does what. This problem shouldn't be left behind, it's crippling when you're trying to see a specific order. However, dlobalzo, you can access your orders via the carts (in the clients submenu) as a partial and temporary solution. The carts with green prices are validated (and so became orders).
  8. J'ai réussi. En fait lors de l'import des clients, il doit y avoir des dépendances dans les tables qui ne se font pas forcément. Après avoir enlevé le mail d'un utilisateur pour tester si je pouvais commander avec son compte, j'ai pu passer les étapes et aller jusqu'au paiement. La solution : Il faut modifier les utilisateurs, et même sans rien toucher, juste enregistrer les mêmes données fonctionne et doit modifier des dépendances qui n'étaient pas là lors de l'ajout en dur des clients. Il suffit donc d'aller dans la page où les clients sont listés, tous les sélectionner et faire l'action groupée de tous les activer (même s'ils sont déjà activés).
  9. Est-ce que mettre à jour l'ancien site puis mettre les anciens clients fonctionnerait ? J'ai déjà des clients sur le nouveau site, donc importer les anciens est ma seule solution valable pour le moment. Merci de ta réponse
  10. Bonjour, J'ai tenté d'importer la table ps_customer sur mon nouveau site en 1.6.1.2 depuis mon site en 1.5.4.1. Les clients apparaissent bien et peuvent se connecter, mais il y a un bug quand ils veulent passer commande. Les commandes sur mon site sont en 5 étapes. Ils ne peuvent pas passer l'étape 1, quand ils avancent dans la commande, ils sont redirigés sur l'étape 1. Y a-t-il une solution ? Une autre table à importer ? Je n'ai pas encore trouvé où commencer pour identifier le problème. Merci.
  11. I didn't find where it wrecks my code, but I found a solution, for anyone who has this problem. Apparently, as absurd as it can be, the returns in the code were causing that trouble. To correct this, I went to themes/mytheme/modules/tmproductvideos/views/templates/hooks/tmproductvideos_tab_content.tpl I modified these lines <iframe src="{$video.link|escape:'html'}" style="z-index: 99;" ></iframe> into this line <iframe width="100%" src="{$video.link}" frameborder="0" allowfullscreen style="z-index: 99;"></iframe> and it now works.
  12. Thanks john smith 151, I tried it, and it seems to work well. However it looks like the videos keep playing while not in the popup, and the title below reviews isn't that visible. I'm telling you that for your module, it doesn't fit ergonomic requirements for a professional website, you need some more work on it. But I can't ask you for improvements since I'm not paying you .
  13. Hello, I have installed TMProductVideo module to have a video on my product pages. It worked at first, but now, after a change that I can't figure out, my videos don't display anymore. I've searched through the whole module's tpl/php/js files and found nothing relevant. However I suspect it could come from ajax, and here is why : In every single product page, I have this code for the video in the source code of the HTML page : <iframesrc="https://www.youtube.com/embed/X9j1OYK-iCw"style="z-index: 99;" ></iframe> And when I use the examinator (or whatever the name is) to see the current state of this same iframe, I have this result : <iframesrc="https: www.youtube.com="" embed="" x9j1oyk-icw"style="z-index: 99;"></iframesrc="https:> As one might understand, this last code above doesn't do anything and is very incorrect... I guess it's transformed by some asynchronous action, and I think it's ajax, but I can't find anything. Note that the change is operated when you load the page, it's effective before you click on the Video tab. Thanks in advance.
×
×
  • Create New...