Search the Community
Showing results for tags 'Javascript'.
-
This would maybe be like an addon. I would use prestashop.on with checkoutChangedStep, hide page body, do a custom country check, then if correct check, then show page again. I am unsure if I need to hide page initially as prestashop.on with that is as submitted and may be like synchronous but I do not know. Anyway, ends hidden if not success in check. I would be doing a custom country check by calling weatherapi.com using navigator.geolocation. I would be using a withreach.com thing for checkout. I would have like my custom Javascript using weatherapi.com and checking country by it. I would save this custom country check data and, not needed, but trying for, check if address country for taxes is same. Am I missing anything needed for this custom country check or is there any improvements that should be? I would be using withreach.com as payment processor and taxes calculator. They already integrate with prestashop. I am trying for custom country check certainly before payment and after or with cart filled with items. I would be using that to enter in Javascript. I am new to this so where do I need to enter this Javascript? I think that should handle it though. I may use other prestashop.on events if needed. All as per one might be maybe or might not be maybe, maybe or maybe not, maybe.
-
I am trying for when a built in prestashop.on thing is triggerred, synchronously do some check. Like event to prestashop.on as triggerred to like my code to next step, no running code other than that between steps. https://devdocs.prestashop-project.org/8/themes/reference/javascript-events/ Maybe in updateAddressForm or changedCheckoutStep. I would also reload for rejection if needed. Like my question is, is prestashop.on synchronous like that? I know that on country change is an event thing. All as per one might be maybe or might not be maybe, maybe or maybe not, maybe.
-
Hello Developers, Sometimes you need to customise your PrestaShop theme. To customise the code of any PrestaShop themes, you have to open files from the server and FTP. It's a very time consuming and complex process. 😰 To reduce time-wasting customisation, we have made ClassyDevs Custom CSS & JS module for you. This module is completely FREE! 😃 This module allows you to customize your prestashop custom css styles and JavaScript code. Override your theme's aesthetics and add client-side functionality with this module. Why should you use PrestaShop Custom CSS Module? The Custom CSS & JS module allows you to add extra CSS and JavaScript without deploying any code. This module is extremely lightweight, as it does not rely on any third-party libraries. This module has theme-specific JavaScript and CSS conditions. There's no need to access the server's core files via FTP. Save Valuable times. Installation ---------------- Download Zip File Upload Module Publish Configuration ------------------- PrestaShop 1.7.x Settings --------------- Go to PrestaShop Admin Dashboard Quick Access > ClassyDevs Custom CSS & JS You will get two text-areas if you use this module. One is for CSS and the other is for JS. You can enable and disable CSS and JS Text-areas fields. This module adds CSS and JS without requiring any code deployment since it stores CSS and Javascript in variables rather than files. Download Module from here 👇👇 DOWNLOAD MODULE classy_custom_js_cs.zip Is there any feature and suggestions that you want to get in this module? Please comment below. Regards, ClassyDevs Team
- 12 replies
-
- 5
-
-
-
- js
- custom css & js
- (and 11 more)
-
Bonjour, Je débute sur prestashop et j'aimerais exécuter un code Javascript lorsqu'il y a un ajout au panier. J'ai register le hook actionCartSave, et j'ai un code Javascript dans /views/js/module.js mais je ne sais pas comment exécuter ce code Javascript dans cette méthode (voir code ci-dessous). Est-ce que je m'y prends correctement ? Est-ce que vous savez comment faire ? Merci pour votre aide. PS: je ne suis pas habitué à poster sur des forums, n'hésiter pas à me dire si vous avez besoin de plus d'informations pour répondre. public function hookActionCartSave($params) { //executer code javascript }
-
Hi, Do you have nay idea how to create different registration form for each multistore shop? What happend... ? I have a Prestashop with multistore feature active. Both shops are different and I need custom registration for each of them. Each registration page will contain different form fields, so simple HTML/CSS would not work here, as the POST data need to be stored somewhere... I tried to override /classes/form/CustomerFormatter.php but it change registration content in all shops. I also try to create custom module which override above file but only for specific multistore ID and it do not help. Same results as above.
- 1 reply
-
- css
- javascript
-
(and 6 more)
Tagged with:
-
Hola, recientemente he realizado una migración de mi tienda prestashop 1.6 a 1.7. Para ello cree un directorio en el servidor dentro de prestashop 1.6, para realizar la instalación de la nueva versión y volcar ahí los datos. Tras la migración todo funcionaba correctamente por lo que me dispuse ha sustituir la versión 1.6 activa hasta el momento por la nueva versión. Para ello, borré todos los archivos de prestashop 1.6 de la raiz del dominio y moví (en vez de copiar) ahí los de la nueva versión. Como no había modificado la url de la tienda en el apartado SEO & URL, no podía acceder ni a la web ni al backoffice. Por lo que copié la versión 1.7 nuevamente en la carpeta donde había realizado la instalación para realizar los cambios de url. Borré caché y comprobé que el frontoffice y el backoffice en la raíz del dominio funcionaran. Pero me he encontrado con algunos detalles que no están como deberían: En los transportistas, se ha desconfigurado la vista (adjunto captura) En la página principal del backoffice no muestra ningún dato de pedidos, ventas, usuarios en linea... y si entra un pedido, no sale la alerta en la esquina superior. Y aunque pulse sobre las opciones de día, mes, año o para indicar un tramo de fechas, no hace nada ni despliega calendario para indicar fechas (adjunto captura). Si luego voy zona a zona dando al botón de "actualizar", me va mostrando los datos: últimos pedidos, visitantes el linea, gráfica... pero la parte de selección de fechas sigue sin funcionar, por lo que la gráfica muestra hasta el día 12 (fecha de la la migración de datos) y no hasta el día actual por ejemplo. En algunos módulos (cookies, pop up) no aparece la caja de funciones para texto. Es decir, puedo escribir, pero no puedo poner negrita, centrado... El javascript del menu del backoffice no funciona correctamente en algunas secciones del mismo. Es decir, se ilumina el texto al pasar el ratón, pero no muestra ni la flecha para abrir el submenú, ni oscure el background de ese item... Lo curioso es que no es generalizado, que sólo ocurre en cuando estoy en algunas secciones concretas del backoffice. En las secciones donde no funciona correctamente, coincide que no muestra las alertas de nuevos pedidos/usuarios y que en la parte superior del menú se encuentra el gift de flechas dando vueltas sin que nunca se llegue a quitar, como si no hubiera terminado de cargar la página. Y en las que si funciona bien, aparecen las alertas, se despliega el submenú y se muestra la caja de funciones de texto en caso de que la haya... en la página de un pedido, no muestra el mapa de google maps, y el desplegable de estado de pedido, lo muestra como cuando le das antes de haber cargado completamente la página. El problema lo tenía accediendo tanto al backoffice de la raíz como al del directorio donde instalé inicialmente. Borré el directorio por si acaso se estuvieran interfiriendo ambos backoffice y desinstalé los módulos que no se visualizaban correctamente, pero el fallo continúa. Aunque son problemas visuales con los que podría vivir, me da miedo que ello esté provocando algún fallo de funcionalidad importante que no esté viendo. Yo creo que puede ser que no cargue algún script correctamente, pero no se cual puede ser ni como resetearlo. ¿alguna idea? ¿alguien me puede echar un cable?
- 5 replies
-
- cambio de directorio
- 1.7
-
(and 1 more)
Tagged with:
-
Hi, Here is a new free module development for the PrestaShop community to help its beginners to easily integrate any JavaScript code on their stores. This module simplifies the integration of JavaScript code by avoiding the edition of TPL file of the template at the risk of forgetting these codes, not allowing an external actor to identify their existence or even causing a 500 error during a bad integration. Short presentation: https://www.mediacom87.fr/en/100-simply-add-javascript-code-to-your-prestashop-or-thirtybees-store/ Direct download without creating an account: https://www.prestatoolbox.com/free-prestashop-modules/458-simply-add-javascript.html
- 3 replies
-
- 2
-
-
- javascript
- prestashop
-
(and 1 more)
Tagged with:
-
Bonjour, voici un nouveau développement de module gratuit à l'attention de la communauté PrestaShop pour aider ses utilisateurs débutant à intégrer facilement n'importe quel code JavaScript sur leurs boutiques. Ce module simplifie l'intégration de code JavaScript en évitant l'édition de fichier TPL du template au risque d'oublier ces codes, de ne pas permettre à un intervenant externe d'identifier leur existence ou encore de provoquer une erreur 500 lors d'une mauvaise intégration. Présentation rapide du module : https://www.mediacom87.fr/100-ajoutez-du-code-javascript-simplement-a-votre-boutique-prestashop-ou-thirtybees/ Téléchargement direct sans création de compte : https://www.prestatoolbox.fr/modules-gratuits/458-aujoutez-du-javascript-simplement.html
- 1 reply
-
- 1
-
-
- module gratuit
- prestashop
-
(and 2 more)
Tagged with:
-
Hello, I have install version 1.7.4.2 on which there is a very long loading time.. The analyze on GTmetrix shows that : "Defer parsing of Javascript". But I can't find anywhere how to fix it. Is someone have an idea ? This is a printscreen : http://prntscr.com/ktet6h Thank you very much for your help.
- 8 replies
-
- javascript
- slow
-
(and 1 more)
Tagged with:
-
Hi, Hope everything is fine. Im developing a module on prestashop 1.7 and i got my self in trouble so my be someone can help me. Im registring the Hook actionCustomerAccountAdd $this->registerHook('actionCustomerAccountAdd') in my Javascript part of the module im using localStorage localStorage.setItem('item_name','item_value'); and i want in my hook function public function hookActionCustomerAccountAdd($params) To delete that item from localStorage Thank you in advance and have a nice day .
- 5 replies
-
- 1
-
-
- ps17
- javascript
-
(and 2 more)
Tagged with:
-
hello i'am about to develop a payment module, at the end of a positive procedure i have to redirect to order-confirmation page with javascript. for example window.location="index.php?controller=order-confirmation&id_cart=1&id_module=2&id_order=3&key=aaabbbbccc123" is it safe to expose secure key in this way or is better to use other way like a POST request or what ? thx
-
- javascript
- payment
-
(and 1 more)
Tagged with:
-
i have to mesure the add_to_cart function in my shop, but i can't find a guide or anything to help to add to Prestashop 1.7 and i really need to add this code, please, help
-
- javascript
- ga4
-
(and 1 more)
Tagged with:
-
I created a new page in my module by creating a new front controller. I want to add js and css files to this page but I am unable to do so. I have tried a couple of things, but none are working for me. I tried adding the setMedia() function in the front controller: public function setMedia() { parent::setMedia(); $this->registerJavascript( 'module-easypaymentoption-front', 'modules/' . $this->module->name . '/views/js/front.js', [ 'priority' => 200, 'attribute' => 'async', ] ); } I have also tried to load it by using the actionFrontControllerSetMedia hook: public function hookActionFrontControllerSetMedia() { Media ::addJsDef([ 'easypaymentoption' => $this->context->link->getModuleLink($this->name, 'validation', [], true), ]); $this->context->controller->registerJavascript('modules-easypaymentoption', 'modules/' . $this->name . '/views/js/front.js'); $this->context->controller->registerStylesheet( 'module-easypaymentoption-style', 'modules/' . $this->name . '/views/css/front.css' ); } I even tried the hookHeader: public function hookHeader() { $this->context->controller->addCSS($this->_path . '/views/css/front.css'); } But none are working. Can anyone help me out please? Any help is very much appreciated.
- 1 reply
-
- css
- javascript
-
(and 1 more)
Tagged with:
-
Buenas tardes, Estoy creando páginas php (con controllers y su correspondiente tpl) en las que quiero añadir un mapa con marcadores. He encontrado esta solución: https://programacion.net/articulo/google_maps_con_multiples_marcadores_y_ventana_de_informacion_mediante_la_api_v3_1738 El problema es que al ser código Javascript, al añadirlo al final de la página .tpl, no lo muestra y no crea el mapa. Lo he intentado incorporar en una página CMS, sospechando que no funcionaría. Y efectivamente, me daba errores y no podía guardar la página. ¿Alguna solución a mi problema? ¡Gracias de antemano!
-
Buenas noches chicos, os escribo a ver si me podéis ayudar en mi PrestaShop 1.7. Necesito actualizar la cantidad de producto dentro de la pagina de un producto mediante JS. Se podría añadir de manera fácil en un principio con un código como este: $("#quantity_wanted").val(4). El problema es que con esto solo no vale ya que PrestaShop no reconoce ese cambio de cantidad ya que si hago esto y le doy al botón añadir al carrito me mete cantidad 1 y otra cosa muy importante es que tampoco cambia el precio total. Todo esto lo realiza correctamente si se hace manualmente dándole al botón + y - ya que parece que hace una especie de carga mediante ajax al pulsar esos botones. Por lo que he leído (https://devdocs.prestashop.com/1.7/themes/reference/javascript-events/) creo que se podría hacer mediante los eventos JavaScript de PrestaShop pero por mucho que pruebo no doy con la solucion. Hasta ahora lo que he conseguido es esto pero tampoco funciona ya que ni cambia el precio total ni PrestaShop reconoce que la cantidad se a cambiado. prestashop.emit('updateProduct', { eventType: 'updatedProductQuantity', event: $("#quantity_wanted").val(4) }); ¿Alguna idea?
- 1 reply
-
- prestashop 1.7
- emit
-
(and 4 more)
Tagged with:
-
Bonjour, Souhaitant gagner du temps lors d'un ajout d'une balise et accélérer le chargement des pages de mon site, je souhaite utiliser l'outil Google Tag Manager. Néanmoins, j'ai un problème lorsque j’intègre le code javascript qui m'est donné par Google. Quelque soit où je met le script dans le <head> du site, je n'obtient qu'une page d'erreur : "Cette page ne fonctionne pas ... Impossible de traiter cette demande via NomDeMonSite à l'heure actuelle ... HTTP ERROR 500". En reprenant ligne par ligne le code fourni par Google, il semblerait que la ligne qui fait tout planter est la suivante : w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'}); Si quelqu'un a des idées sur d'où vient le problème, je suis preneur ! Merci d'avance
- 2 replies
-
- Problème
- Google Tag Manager
-
(and 4 more)
Tagged with:
-
Good night! I do not know why but, we have not changed anything on our web, but since yesterday the JS files stopped working. We used the default theme 1.6.0.6 and the top horizontal menu stopped work, you can not change the page in a list in the Administration menu, icon ajax running always appear moving, some payment option dont work, etc ... Trying to fix it we have updated the page to 1.6.0.9 but the problem still happening. We also changed the permissions of all the folders and files to 755. We have disabled some modules but it still happening. I dont know what else to try. Our website is www.llavemania.com Any help?! Thank yu so much
- 7 replies
-
- js
- javascript
-
(and 4 more)
Tagged with:
-
Hello community, I try to edit shipping number in order using prestashop API and jQuery and Javascript. I read all of the docs about API and I can create GET requests to receive any information that I want but I still can't put anything by using jQuery. Does anyone has any example how to edit something in order or whatever in prestashop using jquery/javascript? Docs are saying: This is just to global and overall it is not helping with nothing. How to edit something via API using just browser calls?
- 2 replies
-
- prestashop
- javascript
-
(and 5 more)
Tagged with:
-
Bonjour, Je voudrai rajouter ce code Facebook messenger dans mon site, mais je n'arrive pas a trouver où ni comment; merci ! <!-- Load Facebook SDK for JavaScript --> <div id="fb-root"></div> <script> window.fbAsyncInit = function() { FB.init({ xfbml : true, version : 'v9.0' }); }; (function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = 'https://connect.facebook.net/fr_FR/sdk/xfbml.customerchat.js'; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script> <!-- Your Chat Plugin code --> <div class="fb-customerchat" attribution=setup_tool page_id="103390091660561" theme_color="#7646ff" logged_in_greeting="Une Question? Besoin d'Aide? Un probleme?" logged_out_greeting="Une Question? Besoin d'Aide? Un probleme?"> </div>
- 2 replies
-
- js
- javascript
-
(and 2 more)
Tagged with:
-
Hi everyone ! J'ai installé le module gratuit tnt sur mon presta 1.7.5.1. Malheureusement, j'ai une erreur Javascript que je n'arrive pas à résoudre malgrès de nombreuses recherches et essais. This is this module: https://addons.prestashop.com/fr/suivi-livraison/26753-tnt-officiel.html Here is the problem: The fancybox with TNT withdrawal points does not charge. In the console I have a js error: (see image) I thought of a problem in the order of loading js files. But a false trail. I installed the module on a virgin presta and it works. Has anyone ever had this problem? Thanks for your help Geoffrey
-
Hello, i'm using a management software to export all of my products before I can upload them to Prestashop: since the title are getting wiped out at every upload (I know I can just ignore the title column, but I work for a pharmacy and products are constatly changing, so I add a lot of them every time) I'm using the meta tag. The product names from the management are ugly as hell (it's a kind of conventional code of abbreviation for pharmacies, where, for instance, "pills" are "PLL"): is there a way to let the customers display the meta title in place of the ugly product name? I attached a screenshot with highlighted ugly title and meta title (as under <head>) I already got the "meta title" written in its location, I just need prestashop frontend to display that instead of the product name... but when I analyzed the product page I found that there are two <title> tag, one in the head section (that's the meta title, which is what I want my customers to see) and the other one in the body section (the ugly one, but that I can't get rid of because it's automatically imported each time I run the cvs upload)
- 3 replies
-
- meta_title
- title
-
(and 6 more)
Tagged with:
-
Um in der Datenschutzerklärung einen Link einzubetten um Google Analytics abschaltbar zu machen, habe ich diesen Code gefunden: <a href="javascript:gaOptout();" onclick="alert('Google Analytics wurde deaktiviert');">Erfassung von Daten durch Google Analytics für diese Website deaktivieren</a> Quelle: https://www.internetwarriors.de/blog/kein-google-analytics-ohne-opt-out-cookie/ Den "HTML-Purifier verwenden" habe ich im BO ausgeschaltet: Das Speichern des JavaScript-Codes war nicht möglich. Anschließend habe ich die Zeilen der Funktion isCleanHtml in der /classes/Validate.php auskommentiert (wie von eleazar beschrieben: Link) : Wiederum Fehler beim Speichern ... Hat Jemand eine Idee ?
-
Bonjour, Depuis La mise à jour de mon hébérgeur cloud (infomaniak qui est au passage au top pour moi depuis mes différents migrations et tests) qui m'a passé automatiquement de la version 1.7.6.1 à 1.7.6.8 j'ai une erreur dans le backoffice. Dans les fiches produits je modifie une valeur j'ai cette erreur qui s'affiche + des erreurs consoles à savoir que la valeur se modifie bien en DB ci joint le screenshot au demarrage de la page une idée ? merci !
- 6 replies
-
- javascript
- backoffice
-
(and 2 more)
Tagged with:
-
Hi! So I use PrestaShop together with a module called "tshirtecommerce". And I've written a code that calculates the amount of custom text and updates the price accordingly. The problem is that I would like to save the custom calculated price to the product so when the product appears in the checkout stage, the custom price will be combined with the basic price. For example: A shirt costs 10 dollars. The user adds custom text that amounts to 4 dollars. When the user adds the product to the cart, the product should be 14 dollars instead of 10 dollars. Thank you in advance!
-
- javascript
- custom
-
(and 1 more)
Tagged with: