How To Pass Variable In .tpl To Order.post.php?

I created an addon. I need to pass variable



from

design/backend/templates/addons/MY_ADDON/hooks/orders/payment_info.post.tpl
```<br />
<br />
to<br />
```php
app/addons/MY_ADDON/controllers/backend/orders.post.php
```<br />
<br />
<br />
<br />
<br />
I can get the value to .tpl file. by using this:<br />
orders.post.php<br />
```php
<br />
if ($mode == 'details') {<br />
 $data = db_get_row("SELECT invoice_no FROM ?:cce_order_invoice WHERE order_id = ?i", $_REQUEST['order_id'] );<br />
 Registry::get('view')->assign('invoice', $data);<br />
}<br />

```<br />
payment_info.post.tpl<br />
```php
value="{$invoice.invoice_no}"
```<br />
I don't know how .tpl file need to be designed. What should be in name, id and value tags in input field.<br />
<br />
I want to update column in my_table. What to put in<br />
```php
<br />
if ($mode == 'update_details') {<br />
//codes...??<br />
}<br />

Duplicate Listing Own Values In Orders Manage - Hints & Modifications - CS-Cart Community Forums

how can pass variables from my addon php to footer.post.tpl

[color=#660066]Registry[/color][color=#666600]::[/color][color=#000088]get[/color]color=#666600->[/color][color=#000000]assign[/color][color=#666600]([/color][color=#008800]'invoice'[/color][color=#666600],[/color][color=#000000] $data[/color][color=#666600]); [/color]

[color=#666600]this is not working in cs-cart 4.3[/color]

[quote name='deepak@tagnpin.com' timestamp='1428654617' post='210912']

how can pass variables from my addon php to footer.post.tpl

[color=#660066]Registry[/color][color=#666600]::[/color][color=#000088]get[/color]color=#666600->[/color][color=#000000]assign[/color][color=#666600]([/color][color=#008800]'invoice'[/color][color=#666600],[/color][color=#000000] $data[/color][color=#666600]); [/color]

[color=#666600]this is not working in cs-cart 4.3[/color]

[/quote]



Look at here: Listing Own Values In Orders Manage - Hints & Modifications - CS-Cart Community Forums

[quote name='deepak@tagnpin.com' timestamp='1428654617' post='210912']

how can pass variables from my addon php to footer.post.tpl

[color=#660066]Registry[/color][color=#666600]::[/color][color=#000088]get[/color]color=#666600->[/color][color=#000000]assign[/color][color=#666600]([/color][color=#008800]'invoice'[/color][color=#666600],[/color][color=#000000] $data[/color][color=#666600]); [/color]

[color=#666600]this is not working in cs-cart 4.3[/color]

[/quote]



Make sure that your php file starts with


```php

use Tygh\Registry;
.....
```

Yes. I too need the same requirement in buynow button that i have created. Im having a button nearby addtocart. So i have created a addon with add_to_cart.post.tpl.

I want to redirect the page to checkout after the item is added to cart. Im unable to redirect it.I dont know why. So i store the redirect url in controller and make the page to be redirected after the variable is assigned with the url.

But i cant get value in that variable.

How to do this. Why cant i redirect directly to checkout?

Please provide us with the code of this button

I have just read “[color=#666600]this is not working in cs-cart 4.3[/color]” above. So, what is the correct usage of this for cs cart 4.3?