Jump to content

how can i pass varaible from php to tpl


bilal2005
 Share

Recommended Posts

 

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 ??? 

Share this post


Link to post
Share on other sites

 

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.

Share this post


Link to post
Share on other sites

 

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 ?? 

Share this post


Link to post
Share on other sites

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;


?>

Share this post


Link to post
Share on other sites

 

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"]);

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More