
sooi65
Members-
Posts
13 -
Joined
-
Last visited
About sooi65
- Birthday 11/04/1965
Contact Methods
- Website
Profile Information
-
Location
TILBURG, The Netherlands
-
Interests
ERP <-> E-Commerce
-
Activity
Agency
sooi65's Achievements
Newbie (1/14)
1
Reputation
-
Well, sometimes when you expect the least you get the most. Just a minute ago my friend - who happens to own the hosting company where our shops are hosted - called me and told that he was able to solve the issue. Because of a problem with e-mails sent from our shop earlier this week, they had to change something in DirectAdmin and had to run a kind of configuration repair procedure. This appearently broke the php version binding in some way. On the server php 5.6, 7.0 and 7.2 are installed. Our shops were running php 7.0. Only when ajax calls were served it seemed that php 7.2 was used and this lead to all kind of problems. The strange thing is that it did not report any errors at all. Because something broke between DirectAdmin and the PS virtual machine config the solution was to add one line in the .htaccess: AddHandler application/x-httpd-php7 .php Now all calls are working as expected. Also on the installations where we did not restore a backup yet. I hope this solution is of any help for Rodentia but is was for me.
-
Hi musicmaster, I have cleared the cache and disabled all the cache options in the backend of one of the 3 shops. I happend to have a cookie or something on one particular PC with which I was able to get in. We allready restored the installation with the version from 3 days back (when verything was still o.k.) but that did not solve it. About the ajax call: using the Chrome Browser Console I could see that the ajax call did not return a error message. It was the 'on success handler' that went wrong because there was no response data received where it was expected. Jus the value 'null'. So the real issue is that the XMLHttpRequest went well but without any data returned.
-
I have the same issue and it started yesterday on all my 3 PrestaShop websites. I'v been looking for the reason all day and it seems to me that it is JQuery.ajax related. It started when we noticed that we did not get orders all day yesterday. The ajax-enabled cart's 'Add to cart' did not work anymore. These shops are running for over 3 years without a problem and suddenly this happend. When we disabled the ajax functionality the 'Add to cart' button started working again. Using this mode, after adding something to the cart, the full cart is shown. So I tried to delete a product from the cart and it failed. Using the Chrome developer tools (also tried it on FireFox) I found out that the ajax calls did not return anything so 'data.hasErrors' crashed because 'data' was 'null'. What does this have to do with this thread? Well during our search I tried to login into the backend in order to clear the cache and to disable all the CCC stuf and smarty cache. On one website I was able to get in the backend because the browser remembered me. But on the other sites the login failed just as you can see in the image above. I was so stupid to sign out from the shop where I was able to get in the backend because after that I could not login here also. So now I have 3 shops where I cannot make any sale and cannot login in the backend also. I assume the login is also depending on Ajax but I'm not sure. Maybe this rings a bell for someone? Oh, and yes, I have enabled developer mode ('_PS_MODE_DEV_ = true' in defines.inc.php) but it shows nothing.
-
Hello, We experienced problems using the PUT method on one of our customers' servers while trying to update category data with the PrestShop REST api. Although all credentials where correctly setup we got the message '403 Forbidden - You dont have the permission blablabla' On our development server we did not have this issue. After spending some time trying to find the location where it went wrong we ended up in the dispatcher.php file. The problem ocurred int these lines // if a XML is in PUT or in POST if (($_SERVER['REQUEST_METHOD'] == 'PUT') || ($_SERVER['REQUEST_METHOD'] == 'POST')) { while ($putData = fread($putresource, 1024)) // <== The while loop failed $input_xml .= $putData; fclose($putresource); } Changing these lines into the ones as shown below solved the problem. // if a XML is in PUT or in POST if (($_SERVER['REQUEST_METHOD'] == 'PUT') || ($_SERVER['REQUEST_METHOD'] == 'POST')) { while (!feof($putresource )) { $input_xml .= fread($putresource, 1024); } fclose($putresource); } Having a chat with the hosting provider learned that it probably has something to do with the combination of Apache and PHP using FastCGI and maybe the PHP version (5.4) Hope this info is useful for others. Kind regards, Frans
-
[SOLVED] Customer/category groups and reduction
sooi65 replied to sooi65's topic in Configuring and using PrestaShop
How do I add SOLVED to the thread subject? -
[SOLVED] Customer/category groups and reduction
sooi65 replied to sooi65's topic in Configuring and using PrestaShop
SOLVED! I solved the problem myself. I added a function to the Group class to filter the groups which are common to categories and customers The order it by reduction descending and you have the appropriate reduction for products from that category for a specific customer. For who is interested: static public function getProductReduction($id_product, $id_customer) { $result = Db::getInstance()->getRow(' SELECT g.`reduction` FROM `'._DB_PREFIX_.'group` g INNER JOIN `'._DB_PREFIX_.'customer_group` cug ON (cug.`id_group` = g.`id_group`) INNER JOIN `'._DB_PREFIX_.'category_group` cag ON (cag.`id_group` = g.`id_group`) INNER JOIN`'._DB_PREFIX_.'category_product` cp ON (cp.`id_category` = cag.`id_category`) WHERE g.`reduction` > 0 AND cug.`id_customer` = '.intval($id_customer).' AND cp.`id_product` = '.intval($id_product).' ORDER BY g.`reduction` DESC'); return $result['reduction']; } The modify the file product.php (from the Prestashop base folder) by changing Group::getReduction(intval($cookie->id_customer)) into Group::getProductReduction(intval($product->id_product), intval($cookie->id_customer)) and classes\Product.php Group::getReduction($id_customer)) into Group::getProductReduction($id_product, $id_customer)) -
Jouw voorbeeld ziet er goed uit met die achtergrond. Ik zal er eens naar kijken. Bedankt. Ik heb in een andere post ook e.e.a over dit onderwerp gevonden. Daar werd verwezen op een passage in blockcart.tpl zie hier: {t text=$product.name length="16" encode='true'} Als je de length aanpast (kleiner instelt) dan ziet het er wel goed uit. (De dubbele aanhalingstekens doen overigens niets, je kunt ze ook weglaten) Ik ben nog niet helemaal ingewijd in prestashop maar veronderstel dat de inhoud van het tpl-bestand door Smarty wordt verwerkt en de reguliere php-instructies werken niet. Ik heb verschillende pogingen gedaan (trial an error) om te zien of ik iets kon bereiken. Het liefst zou ik een constructie vinden die zoiets doet als wat ik beoog met het onderstaande fragment: {t text=$product.name length=20-strlen(displayWtPrice p="`$product.real_price`") encode='true'} Heeft er iemand suggesties?
-
Ik heb geen idee waarom mijn naam hier nou ineens moet worden neergezet. Graag weghalen s.v.p. Geachte heer, Neemt u mij niet kwalijk. Ik meende dat wanneer u uw naam in de signature vermeld dat u ermee er geen probleem mee hebt als deze gebruikt wordt wanneer men op uw posts reageert. Ik ben er zelf voorstander van dat wanneer mensen elkaar niet kennen of wanneer er niet aangegeven wordt dat men elkaar mag tutoyeren er enige beleefdheid in acht wordt genomen. Ken u wellicht de SIRE reclame campagne 'Hoe gaan we om met aardige mensen'? Eigenlijk vind ik dat wanneer u denkt dat ik de normen van het forum niet respecteer dat u dat dan ook in een Personal Message kenbaar had kunnen maken in plaats van het via het forum te communiceren. Het heeft immer niets met de onderwerp zelf te maken. In zekere zin dwingt u mij nu ook om hetzelfde te doen, wat mij ten zeerste spijt. Met vriendelijke groet, Frans van Meir.
-
Beste Prestashoppers, De weergave van de omschrijving en de prijs in mijn mandje is niet helemaal zoals ik het graag zou hebben. (zie afbeelding) Weet iemand wat hier gaande is en hoe dat verholpen kan worden? Met vriendelijke groet, Frans van Meir
-
Hallo Simonantonanton, Ik denk dat je je hier niet druk om hoeft te maken. Naar mijn bescheiden mening is het 'maar' een nummer. Daarnaast vindt ik dat de nummering een weergave dient te zijn van de chronologische volgorde van handelingen. M.a.w.: een order die eerder uitgeleverd wordt dan een order die later is geplaats 'verdient' een lager nummer. Wat je hiermee voorkomt is dat er gaten ontstaan in de nummering. Stel dat een klant de betaling waarop je zit te wachten uiteindelijk nooit doet, dan heb je reeds een pakbonnummer gereserveerd voor een levering die nooit plaats vindt. Datzelfde geldt uiteraard ook voor factuurnummers. Dit 'probleem' bestond (vroeger?) ook in Exact en met factuurnummers is het overigens ook nog eens dat je aan de belastingdienst moet kunnen verantwoorden waarom een nummer ontbreekt, maar dat terzijde. Succes met je ontwikkeling. Vriendelijke groet, Frans van Meir
-
Good day to you all! I have the following data: group 1, the default group group 1010, 25% reduction group 1020, 10% reduction customer A belongs to group 1010 only (and 1 ofcourse). category X is connected to both groups 1 and 1010 category Y is connected to group 1 and 1020. I expect customer A to get 0% reduction on products from category Y because he does not belong to group 1020 and 25% on products from category X (due to the membership of group 1010). But as I noticed, customer A gets 25% reduction on both categories. What am I doing wrong? Greetz, Sooi