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

Thursday, October 27, 2022

[FIXED] How to get more datas from database in a .tpl file in Prestashop

 October 27, 2022     database, prestashop-1.7     No comments   

Issue

I'm working on prestashop 1.7. I added a field to the specific_price table. I would like to use the data in this field in the cart-detailed-product-line.tpl

How should I do this ? Do I need to connect to the price_specific table in the Cart.php class? If yes, how?

Thanks in advance!


Solution

Yes, the simplest in view of your situation, is to create an override Link.php, and in there make a call to your table to fetch your information.

In the tpl you only have to put {$link->nameoffunction(parametre)}

Regards



Answered By - ethercreation
Answer Checked By - Timothy Miller (PHPFixing Admin)
  • 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