View Single Post
  #4  
Old 03-29-2009, 06:21 AM
  rogue's Avatar 
rogue rogue is offline
 

X-Adept
  
Join Date: Apr 2007
Location: Loveland, Ohio
Posts: 770
 

Default Re: pass variable from 1 template to the other

In cart_subtotal.tpl you get the smarty var value $newsubtotal and put it in a global php var $phpnewsubtotal.

Code:
{php} global $phpnewsubtotal; $phpnewsubtotal = $smarty->get_template_vars('newsubtotal'); {\php}

Then in cart.tpl you get the value from the php global var and put it in the smarty var.

Code:
{php} global $phpnewsubtotal; $this->assign("newsubtotal", $phpnewsubtotal); {\php}

That's it I think. Be warned there is probably a more conventional way to do this as you will no doubt find out in subsequent replys by other folks.
__________________
Richard Williams
Rogue Wave Limited

Initial Inventory Imports
Daily Inventory Updates
Daily Inventory Reports
Drop Ship Support
Order Export to Shipper/Supplier
Shopping Feeds That Work
Programming for X-Cart

richard@roguewavelimited.com
http://www.roguewavelimited.com
Reply With Quote