PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Tuesday, June 28, 2022

[FIXED] How can I access Configuration::get('PS_LAST_QTIES') at core.js?

 June 28, 2022     javascript, php, prestashop, smarty     No comments   

Issue

at prestashop 1.7 how could I access Configuration::get('PS_LAST_QTIES') at core.js?

Thank you, Miguel Gibert


Solution

I've sorted it out by passing the variable through the ProductController.php

at $this->ajaxRender(Tools::jsonEncode([

I added: 'ps_last_qties' => Configuration::get('PS_LAST_QTIES')

and then I received it at core.js: o.default.on("updatedProduct", function (e) {

and was able to use it as e.ps_last_qties



Answered By - Miguel Gisbert
Answer Checked By - Candace Johnson (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing