GT ITECH Posted September 28, 2015 Share Posted September 28, 2015 (edited) Hello, i want to know how to get the final product price including taxes AND specific prices. I need this in PHP, i can't use sort of hacks by loading product page and get price showed via JS or whatever like this. Please i really need this :/ Thank you Edited September 29, 2015 by GT ITECH (see edit history) Link to comment Share on other sites More sharing options...
presta4you.com Posted September 28, 2015 Share Posted September 28, 2015 Check class Product. Inside is getPriceStatic method. You can use this method to show price. 1 Link to comment Share on other sites More sharing options...
GT ITECH Posted September 29, 2015 Author Share Posted September 29, 2015 How i am supposed to use this function ? When i try : $specific_price_output = null; $price = Product::getPriceStatic($productid, true, null, 2, null, false, true, 1, false, null, null, null, $specific_price_output, true, true, null, true); It return me Fatal Error message but nothing else :/ I am not in a module structure it's a simple script but i'm able to use Prestashop functions because i include these files : include 'config/settings.inc.php'; include 'config/config.inc.php'; And i use this for displaying errors : @ini_set('display_errors', 'on'); @error_reporting(E_ALL | E_STRICT); I don't know what is the problem, please help me ^^ Link to comment Share on other sites More sharing options...
presta4you.com Posted September 29, 2015 Share Posted September 29, 2015 Try use only first parametr: $price = Product::getPriceStatic($productid); 3 Link to comment Share on other sites More sharing options...
GT ITECH Posted September 29, 2015 Author Share Posted September 29, 2015 I got the same Fatal Error message :/ I tried also by entering manually the product id (not storing him to a variable) like this : Product::getPriceStatic(1453); But still give me the simple Fatal Error message I really don't know where is the problem to correct it Link to comment Share on other sites More sharing options...
presta4you.com Posted September 29, 2015 Share Posted September 29, 2015 This is only script? not module, controller or something else? If this is script try that: include(dirname(__FILE__).'/../../config/config.inc.php'); //first check if this link is ok include(dirname(__FILE__).'/../../init.php'); //this link also $price = Product::getPriceStatic($productid); 1 Link to comment Share on other sites More sharing options...
GT ITECH Posted September 29, 2015 Author Share Posted September 29, 2015 It work well :D Guys if you have same problem, just include config.inc.php (in config folder) and init.php (in root of your shop) files Not even config/settings.inc.php Many Thank to you presta4you Link to comment Share on other sites More sharing options...
presta4you.com Posted September 29, 2015 Share Posted September 29, 2015 No problem 1 Link to comment Share on other sites More sharing options...
CS Appsaradev Posted December 17, 2015 Share Posted December 17, 2015 Thanks you so much. it works well.. Chantouch Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now