Jump to content

Foovince

Members
  • Posts

    102
  • Joined

  • Last visited

Everything posted by Foovince

  1. Hello, What is your configuration ? What is your permissions on your prestashop system ?
  2. Hello community I hosted on VPS with digitalocean, in Singapour (we are located in Australia). I use Prestashop software for my store. I installed nginx, php-fpm and mysql (LEMP Stack) by myself. No cache activated yet.. (opcache, memechached...) But I have like 8 sec for any page in prestashop to load this page (8sec only for the Time To First Byte) My vhost config : server { server_name sub.domain.com; # Normal listen 80; return 301 https://$server_name$request_uri; } # SSL server { listen 443 spdy; # Error / Access log error_log /var/log/nginx/domain.com_error.log; access_log /var/log/nginx/domain.com_access.log; #ssl : include '/etc/nginx/conf.d/ssl.conf'; # Server settings : server_name sub.domain.com; root /home/usersys/sites/domain.com; index index.html index.htm index.php; proxy_buffers 16 16k; proxy_buffer_size 32k; # Location php : include '/etc/nginx/conf.d/location-php.conf'; # Cache static : include '/etc/nginx/conf.d/cache_static.conf'; # Rewrite rule presta : include /etc/nginx/conf.d/ps_rewrite_rules.conf; } ssl.conf file : ssl on; ssl_certificate /etc/ssl/www.domain.com.crt; ssl_certificate_key /etc/ssl/www.domain.com.key; ssl_ciphers ECDHE-RSA-AES256-SHA384:AES256-SHA256:RC4:HIGH:!MD5:!aNULL:!eNULL:!NULL:!DH:!EDH:!AESGCM; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_session_cache shared:SSL:32m; ssl_buffer_size 4k; ssl_session_timeout 10m; client_max_body_size 15m; client_body_buffer_size 128k; ssl_stapling on; ssl_stapling_verify on; ssl_trusted_certificate /etc/ssl/trusted.crt; resolver 8.8.4.4 8.8.8.8 valid=300s; resolver_timeout 10s; ssl_prefer_server_ciphers on; ssl_dhparam /etc/ssl/certs/dhparam.pem; add_header Strict-Transport-Security "max-age=31536000"; add_header X-Content-Type-Options nosniff; location-php.conf file : location ~ \.php$ { try_files $uri =404; fastcgi_split_path_info ^(.+\.php)(/.+)$; # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini # With php5-cgi alone: #fastcgi_pass 127.0.0.1:9000; # With php5-fpm: fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; fastcgi_param HTTPS on; fastcgi_read_timeout 300; fastcgi_buffers 256 16k; fastcgi_buffer_size 32k; fastcgi_cache phpcache; # The name of the cache key-zone to use fastcgi_cache_valid 200 30m; # What to cache: 'code 200' responses, for half an hour fastcgi_cache_methods GET HEAD; # What to cache: only GET and HEAD requests (ot POST) add_header X-Fastcgi-Cache $upstream_cache_status; # Allow us to see if the cache was HIT, MISS, or BYPASSED inside a browser's Inspector panel fastcgi_cache_bypass $no_cache; # Dont pull from the cache if true fastcgi_no_cache $no_cache; # Dont save to the cache if true include fastcgi_params; } cache_static.conf : # Expire rules for static content # cache.appcache, your document html and data location ~* \.(?:manifest|appcache|html?|xml|json)$ { expires -1; # access_log logs/static.log; # I don't usually include a static log } # Feed location ~* \.(?:rss|atom)$ { expires 1h; add_header Cache-Control "public"; } # Media: images, icons, video, audio, HTC location ~* \.(?:jpg|woff|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc)$ { expires 1M; access_log off; add_header Cache-Control "public"; } # CSS and Javascript location ~* \.(?:css|js)$ { expires 1y; access_log off; add_header Cache-Control "public"; } ps_rewrite_rules.conf : rewrite ^/api/?(.*)$ /webservice/dispatcher.php?url=$1 last; rewrite ^/([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$1$2.jpg last; rewrite ^/([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$2/$1$2$3.jpg last; rewrite ^/([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$2/$3/$1$2$3$4.jpg last; rewrite ^/([0-9])([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$2/$3/$4/$1$2$3$4$5.jpg last; rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6.jpg last; rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7.jpg last; rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8.jpg last; rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9.jpg last; rewrite ^/c/([0-9]+)(-[_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ /img/c/$1$2.jpg last; rewrite ^/c/([a-zA-Z-]+)(-[0-9]+)?/.+\.jpg$ /img/c/$1.jpg last; rewrite ^/([0-9]+)(-[_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ /img/c/$1$2.jpg last; rewrite ^/order$ /index.php?controller=order last; if (!-e $request_filename){ rewrite ^(.*)$ /index.php last; } Thanks Thanks a lot
  3. Ben en faite, les lignes que je t'ai donnée vont te permettre de charger les variables et l'environnement de base de prestashop... Ensuite, tu vas pouvoir faire : $ton_produit = new Product(ID_DE_TON_PRODUIT); //appeler les bonnes fonctions qui vont bien Désolé mais je ne connais pas toutes les fonctions pour faire ce que tu souhaites. Mais honnetement, je pense pas que ce soit la meilleur solution de faire ce que tu veux, le mieux est de rester dans prestashop, développe un petit module qui ajoutera un onglet dans le back-office, un champs texte pour mettre l'ID ou la référence du produit, et faire apparaitre un tableau des quantités...
  4. d0ne Par contre, loooooong le chargement du site.. Bon courage
  5. Hello Pour pouvoir interargir avec Prestashop depuis tapage.php, je pense qu'il faut intégrer dans tapage.php require_once(dirname(__FILE__).'A_ADAPTER/../config/config.inc.php'); require_once(_PS_ADMIN_DIR_.'/init.php') Après il faudrait qu'on regarde plus en détail le fonctionnement de la mise a jour des quantités par déclinaison. Quel version de prestashop utilises tu ?
  6. Hmm... not sure to understand.. For google analytics normally you have just to save your google code number in the module ... ? Where do you get this error ?
  7. Sorry imnik, but I not able to help you without code (more code...)
  8. Did you clean your override ? Can we check your code from your module ?
  9. Check your API credentials in your backoffice > module> Paypal. if you are in test mode should be Sandbox credentials on developpers paypal or in live mode should be Live api credentials.
  10. Hello, The fix proposed by Thomas, works fine for me thanks
  11. Great news Yes on nginx.conf its all your global settings, and etc/nginx/sites-available/yourwebsite is you specials website settings IPSconfig works fine ? I ll probably install it on my server if you want speed up, try pagespeed module for nginx (You have to recompile it) but its just totally awesome ;-)
  12. You should rite lines on you server { } block where you have your server_name www.yourwebsite.com
  13. Yes, Are you on different database from the main website and testarea ? Can you activate on Performances > Always force template compilation and desactive caches and optimisation stuff Its maybe a bug.. :/ To say the truth I have no idea where that come from
  14. Yes, normally is on /etc/nginx/nginx.conf or /etc/nginx/sites-available/yourwebsite, in server { } block Do you get more infos with mode debug in your blank page ?
  15. Hello Why do you override all methods from AdminProductController ? Usually, we override only one or two functions.. What is your idea ?
  16. To active mode debug : Edit config/defines.inc.php and change variable from : define('_PS_MODE_DEV_', false); to define('_PS_MODE_DEV_', true);
  17. Hello Can you activate mode debug ? Edit config/defines.inc.php and change variable from : define('_PS_MODE_DEV_', false); to define('_PS_MODE_DEV_', true); For url rewriting and nginx : You have to modifiy your nginx configuration, on your server block add thoses lines #Specify a charset charset utf-8; rewrite ^/([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$1$2$3.jpg last; rewrite ^/([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$2/$1$2$3$4.jpg last; rewrite ^/([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$2/$3/$1$2$3$4$5.jpg last; rewrite ^/([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg last; rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg last; rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg last; rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg last; rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9$10.jpg last; rewrite ^/c/([0-9]+)(-[_a-zA-Z0-9-]*)/[_a-zA-Z0-9-]*.jpg$ /img/c/$1$2.jpg last; rewrite ^/c/([a-zA-Z-]+)/[a-zA-Z0-9-]+.jpg$ /img/c/$1.jpg last; rewrite ^/([0-9]+)(-[_a-zA-Z0-9-]*)/[_a-zA-Z0-9-]*.jpg$ /img/c/$1$2.jpg last; rewrite ^/order$ /index.php?controller=order last; if (!-e $request_filename){ rewrite ^(.*)$ /index.php last; } and sudo service nginx reload To load new nginx config.
  18. Hello, Faute de ne pouvoir pour l'instant utiliser paypal login, J'utilise paypal checkout (et ça semble bien marcher) par contre, ce serait cool de pouvoir personnaliser la page ckecout de paypal surtout que l'API le permet. En gros, il "suffit" d'ajouter dans la fonction public function setExpressCheckout($access_token = false){ $fields['LOGOIMG'] = 'URL_DU_LOGO' // Paypal recommande 90x60px mais 190px semble idéal $fields['CARTBORDERCOLOR'] = '0000DF' //Code couleur que Paypal utilise pour faire un dégradé } Ce serait cool de pouvoir avoir ces options dans le Back-office de paypal... Le bug de paypal login : http://forge.prestashop.com/browse/PNM-3334
  19. Update, still few hours spend on this s***t I use this tools from paypal : https://devtools-paypal.com/guide/openid/curl?success=true&env=sandbox Im redirected to prestashop but I got lots of errrors : Notice: Undefined property: PayPalLogin::$_logs in /modules/paypal/paypal_login/paypal_login.php on line 94 Notice: Undefined property: stdClass::$account_type in /modules/paypal/paypal_login/paypal_login.php on line 205 Notice: Undefined property: stdClass::$verified_account in /modules/paypal/paypal_login/paypal_login.php on line 207 Notice: Undefined property: stdClass::$zoneinfo in /modules/paypal/paypal_login/paypal_login.php on line 208 Notice: Undefined property: stdClass::$age_range in /modules/paypal/paypal_login/paypal_login.php on line 209 Fatal error: Uncaught exception 'PrestaShopException' with message 'Property PaypalLoginUser->verified_account is empty' in/classes/ObjectModel.php:872
  20. Yes I got this error 2 days ago. I activated JS on Footer (on back-office > Advanced Parameters > Performances > JS on Footer YES) I have activated directly on the code (paypal_login.php line 89) to write file with error : Result => {"error_description":"Invalid authorization code","error":"access_denied"}
  21. On your return url did you add ?authentication at the end ? Me I added this in my paypal app and I haven't got the error. (I saw in page source, javascript code (search with paypal keyword) paypal.use( ["login"], function(login) { login.render ({ "appid": "MA KEY", "authend" : "sandbox", "scopes": "openid profile email address phone https://uri.paypal.com/services/paypalattributes https://uri.paypal.com/services/expresscheckout", "containerid": "buttonPaypalLogin1", "returnurl": "http://mywebsite.com/modules/paypal/paypal_login/paypal_login_token.php?authentication", 'locale' : 'en-gb', }); }); But still not register after UPDATE : I did see your reply ! So try to add ?authentication at the end... I have same configuration as you (PS 1.6.0.13 and Paypal 3.8.2) single store UDPATE 2 : I got an error (on console with developper tool) /accounts/detail 405 (Method Not Allowed) on paypal developper page when Im trying to update my app --'
  22. So now i got back the error from bad url...
  23. Yes, check all items from paypal documentation (link in your configuration module)
  24. Yeah thanks ! But its amazing... acitvate one performance option to fixed an issue.
×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More