Jump to content

load one module variable to another


Recommended Posts

Hi 

 

   

 

i have  module, product discount countdown which makes separate block which loads discount price products and shows timer

 

 

module is using following code to display countdown timer

  <div id="defaultCountdownc{$countdown.id_product}"></div>

i wana load it in featured deals section can i use it?

Share this post


Link to post
Share on other sites

It depends.

You must edit this 'featured deals' module's core php file. In the hook function where you want to display the timer, you must include the php file of the countdown module. Instantiate it, then run all the functions and assign the same variable.

 

OR

 

if you launch both modules, you can try running Module::getInstanceByName(''countdownmodulename') instead of having to include the other one. But again, the required steps change depending on the module's configuration.

 

Not easy at all ;)

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