Jump to content

Pluncker

Members
  • Posts

    40
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Pluncker's Achievements

Newbie

Newbie (1/14)

8

Reputation

  1. Ok, got it! Thank you for the suggestion, musicmaster. I rebuilt the code, using EXISTS and it works: SELECT c.id_customer, c.id_gender, c.firstname, c.lastname, c.email, o.date_add, o.id_order FROM ps_customer c LEFT JOIN ps_orders o ON (c.id_customer = o.id_customer) WHERE ( EXISTS ( SELECT count(*) AS ocount FROM ps_orders o WHERE o.id_customer = c.id_customer HAVING ocount = 1 ) AND EXISTS ( SELECT * FROM ps_orders o WHERE o.id_customer = c.id_customer AND TO_DAYS(date_add) >= TO_DAYS(NOW()) - 30 ) AND EXISTS ( SELECT * FROM ps_order_detail d WHERE o.id_order = d.id_order AND d.product_id = xx ) ) GROUP BY c.id_customer ORDER BY o.date_add Unfortunately, the SQL-Manager does not accept comments ("--" or "/* */")...
  2. Dear @musicmaster: Could you please help me again with a further SQL-Select? SQL is not my joy 😉 I need to select customers who ordered a specific product (product_id) AND this order was made in the last xx days AND the customer didn't order anything afterwards. The output should be: id_customer and date_add of this last order. What I`ve made is: SELECT d.id_order, o.date_add, c.id_customer FROM ps_order_detail d LEFT JOIN ps_orders o ON (d.id_order = o.id_order) LEFT JOIN ps_customer c ON (o.id_customer = c.id_customer) WHERE d.product_id = 38 AND TO_DAYS(o.date_add) >= TO_DAYS(NOW())-60 GROUP BY o.id_customer ORDER BY o.date_add Which selects the orders of this particular product in the last 60 days. But how to filter customers, who didn't order anything afterwards??? It would be great if you could help me again! Many thanks!
  3. SELECT c.id_customer FROM ps_customer c WHERE ( ( EXISTS ( SELECT count(*) AS ocount FROM ps_orders o2 WHERE o2.id_customer = c.id_customer AND date_add >= '2018-01-01' AND date_add < '2019-01-01' HAVING ocount >= 3 ) OR EXISTS ( SELECT SUM(o2.total_paid) opaid FROM ps_orders o2 WHERE o2.id_customer = c.id_customer AND date_add >= '2018-01-01' AND date_add < '2019-01-01' HAVING opaid > 1000 ) ) AND NOT EXISTS ( SELECT null FROM ps_orders o1 WHERE o1.id_customer = c.id_customer AND date_add >= '2019-01-01' ) ) works fine! Thank you for a great support!
  4. Many thanks, @musicmaster, I will try it tomorrow.
  5. I'm playing around with SQL-Queries in Back Office (PS 1.6.1.24). The task is to select customers who ordered last year (at least 3 times OR at leaset xxx Euro) but have not made an order this year. It would be great if an SQL professional could help! Thanks!
  6. Thank you! After some debugging I noticed that blockcustomerprivacy duplicates the entries in the db (ps_configuration_lang) for each language used. For example I am using 2 languages - blockcustomerprivacy duplicates the first entry (which was empty). In the modules settings editor I can save "text1" for the first language and "text2" for the second, but ps_configuration_lang shows "text1" for both entries... Strange!
  7. Is someone using the module blockcustomerprivacy? Problem: Go to BO/Modules/Block Customerprivacy/Settings. Write a new text, save. Leave the settings, go to Modules/Block Customerprivacy/Settings again - no text, empty! This happens with 1.6.0.12/13/14. PS <= 1.6.0.11 works without problems. Could someone prove this? Thanks!
  8. Hallo Carla, versuch es lieber im englischsprachigen Forum - da ist wesentlich mehr los. Ich habe diese Woche übrigens nach 4 monatiger, sehr intensiver Entwicklungsarbeit ein Relaunch eines alten Shops (PS 1.4.4.1) fertiggestellt, der Umstellung erfolgt noch diese Woche. Habe inzwischen auch meine Bedenken bzgl. Prestashop 1.6.x, die alte Version läuft aber zuverlässig seit 4 Jahren. Einige gekaufte Module und Templates sind mit heisser Nadel gestrickt, man muss sich viel Zeit lassen, wenn man Qualitätsansprüche hat... Aber Ende gut - alles gut! Viel Erfolg mit Deinem Projekt!
  9. Auflösung des Rätsels: Es ist ein Übersetzungsfehler! So heißt im Backoffice irreführend das Standard Payment in Deutsch "PayPal Express". Aus paypal/translations.xml: en: <website_payment_standard>Website Payments Standard</website_payment_standard> de: <website_payment_standard>PayPal Express</website_payment_standard> fr: <website_payment_standard>PayPal Intégral</website_payment_standard> Das liebe ich so an Prestashop!
  10. Habe jetzt unter PS 1.6.0.14 das Paypal-Modul 3.8.2 von Prestashop installiert (das bis eine zus. Abfrage in express_checkout/process.php identisch mit der Version von eu_legal ist). In den Moduleinstellungen wird aber nur Paypal Express angeboten (siehe Screenshot). Ich wollte aber unbedingt Paypal Standard Payment nutzen, also die Variante, bei der die Kundendaten über PS gepflegt werden und Paypal am Ende des Bestellvorgangs als Zahlungsmethode gewählt wird. Als Land ist Deutschland im Modul ausgewählt. Es steht aber kein Paypal Standard Payment zur Verfügung, nur Paypal Express... Merkwürdig, die Funktion getPaymentMethods() im paypal.php liefert für Deutschland ausschliesslich WPS (also Paypal Standard) zurück... Wie wähle ich Paypal Standard Payment aus? Bin für jeden Hinweis dankbar! Ich nutze im übrigen nicht das eu_legal_modul... https://www.prestashop.com/forums/topic/398626-gelöst-paypal-modul/ habe ich auch gerade durchgelesen
  11. Ok, mod_filter isn't installed on my server, preventing the execution of the generated AddOutputFilterByType DEFLATE-code. ​Are there any drawbacks using AddOutputFilterByType DEFLATE without installed mod_filter?
  12. Following to a recommendation from gtmetrix.com, I enhanced the .htaccess file (in PS root directory) with: <IfModule mod_deflate.c> # Compress HTML, CSS, JavaScript, Text, XML and fonts AddOutputFilterByType DEFLATE application/javascript AddOutputFilterByType DEFLATE application/rss+xml AddOutputFilterByType DEFLATE application/vnd.ms-fontobject AddOutputFilterByType DEFLATE application/x-font AddOutputFilterByType DEFLATE application/x-font-opentype AddOutputFilterByType DEFLATE application/x-font-otf AddOutputFilterByType DEFLATE application/x-font-truetype AddOutputFilterByType DEFLATE application/x-font-ttf AddOutputFilterByType DEFLATE application/x-javascript AddOutputFilterByType DEFLATE application/xhtml+xml AddOutputFilterByType DEFLATE application/xml AddOutputFilterByType DEFLATE font/opentype AddOutputFilterByType DEFLATE font/otf AddOutputFilterByType DEFLATE font/ttf AddOutputFilterByType DEFLATE image/svg+xml AddOutputFilterByType DEFLATE image/x-icon AddOutputFilterByType DEFLATE text/css AddOutputFilterByType DEFLATE text/html AddOutputFilterByType DEFLATE text/javascript AddOutputFilterByType DEFLATE text/plain AddOutputFilterByType DEFLATE text/xml # Remove browser bugs (only needed for really old browsers) BrowserMatch ^Mozilla/4 gzip-only-text/html BrowserMatch ^Mozilla/4\.0[678] no-gzip BrowserMatch \bMSIE !no-gzip !gzip-only-text/html Header append Vary User-Agent </IfModule> This allows a GZIP-compression on Apache server. The effect is massive on my PS 1.6.0.13-installation! Loading time is increased by near 60%! However, there is already a <IfModule mod_deflate.c>-statement in my .htaccess, automatically generated by PS: <IfModule mod_deflate.c> <IfModule mod_filter.c> AddOutputFilterByType DEFLATE text/html text/css text/javascript application/javascript application/x-javascript font/ttf application/x-font-ttf font/otf application/x-font-otf font/opentype </IfModule> </IfModule> which seems not have any effect at all! Whatever - with gtmetrix-Code, PS is running like hell on my dedicated server...
  13. Wenn Du Englisch brauchst, wird das so bleiben (ev. eigene Rewrite-Regeln im .htaccess verwenden). Wenn nicht: Im BO Lokalisierung | Sprache kann Englisch deaktiviert werden (nicht Löschen, nur deaktivieren!) -> dann verzichtet PS automatisch auf das /de/, vorausgesetzt, dass Deutsch die einzige aktivierte Sprache bleibt.
  14. To be precise: Adding define('_PS_PRICE_DISPLAY_PRECISION_', 2); to config/defines.inc.php solves this problem. I updated from 1.6.0.9 to 1.6.0.11 and after that all prices incl. tax in FO/BO were whole numbers without decimals (BO settings - Number of decimals were ignored!).
×
×
  • Create New...