bilal2005 Posted April 16, 2015 Share Posted April 16, 2015 hi geys iam new in prestashop . please how can i paas the varaible from php to tpl product and change the prixe programaticly Link to comment Share on other sites More sharing options...
sandipchandela Posted April 16, 2015 Share Posted April 16, 2015 Are you talking about back-end or want to do from front end site ? Any specific ps version you are using ? Link to comment Share on other sites More sharing options...
bilal2005 Posted April 17, 2015 Author Share Posted April 17, 2015 Are you talking about back-end or want to do from front end site ? Any specific ps version you are using ? thanks for your replay I writing a module for ps 1.6 and I need how to changer the price of the products programatclly I have a special equtaion to calculate the price so hw can I overreid the price ??? Link to comment Share on other sites More sharing options...
sandipchandela Posted April 17, 2015 Share Posted April 17, 2015 you can create product class that will extended to core main product class of Classes folder. In that class you can achieve your special calculation for product pricing. you have two choices- 1) create module which will better for future conflictions. 2) create override class in override folder to do same. Link to comment Share on other sites More sharing options...
bilal2005 Posted April 17, 2015 Author Share Posted April 17, 2015 you can create product class that will extended to core main product class of Classes folder. In that class you can achieve your special calculation for product pricing. you have two choices- 1) create module which will better for future conflictions. 2) create override class in override folder to do same. thanks you very much for your time Iam actuelle witre a module for special work . can you give me an exemle how to change and give special calculte price ?? Link to comment Share on other sites More sharing options...
sandipchandela Posted April 17, 2015 Share Posted April 17, 2015 Have a look into this page as reference. http://doc.prestashop.com/display/PS16/Overriding+default+behaviors#Overridingdefaultbehaviors-Example1 1 Link to comment Share on other sites More sharing options...
bilal2005 Posted April 17, 2015 Author Share Posted April 17, 2015 I have a problem if you can help me I paas the dta between file php in presta module the file name selet_type.php this is the code jqeyru <script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js'></script> <script type="text/javascript"> $(document).ready(function() { $("#selec1").change(function() { var iid = $("#selec1 option:selected").attr('value'); $.ajax({ type: "POST", url: 'select2_type.php"', data: { jsondata : iid }, success: function(data) { $("#inp").html(data); } }); }); }); if I need to return reslt from seconde file dont work the seconnd file <?php require_once(dirname(__FILE__).'/../../config/config.inc.php'); $data = json_encode($_REQUEST["jsondata"]); echo $data; ?> Link to comment Share on other sites More sharing options...
sandipchandela Posted April 17, 2015 Share Posted April 17, 2015 I have a problem if you can help me I paas the dta between file php in presta module the file name selet_type.php this is the code jqeyru <script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js'></script> <script type="text/javascript"> $(document).ready(function() { $("#selec1").change(function() { var iid = $("#selec1 option:selected").attr('value'); $.ajax({ type: "POST", url: 'select2_type.php"', data: { jsondata : iid }, success: function(data) { $("#inp").html(data); } }); }); }); if I need to return reslt from seconde file dont work the seconnd file <?php require_once(dirname(__FILE__).'/../../config/config.inc.php'); $data = json_encode($_REQUEST["jsondata"]); echo $data; ?> Change second file this line - > $data = json_encode($_POST["jsondata"]); Link to comment Share on other sites More sharing options...
sandipchandela Posted April 17, 2015 Share Posted April 17, 2015 Can you post the javascript response in chrome ? https://developer.chrome.com/devtools Link to comment Share on other sites More sharing options...
bilal2005 Posted April 17, 2015 Author Share Posted April 17, 2015 Can you post the javascript response in chrome ? https://developer.chrome.com/devtools yes I do but I dnt recive any result n div 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