Jump to content

How to retrieve information from Smarty Debug Console overview


twc02

Recommended Posts

Hello,

 

Using PS16011

 

The smarty tag {debug} shows me a popup windows with all kinds of variables and information.

 

Does anyone know how I can retrieve or call the value    0.9 (  in  ecotax => 0.9) to my template? I want to use it to calculate.

 

When I use the following:

Ecotax: {$combinations->ecotax|escape:'html':'UTF-8'}

It only display: ecotax:

 

So not the value of 0.9

 

I guess ecotax is a variable within an array of an array or something.

 

 

$combinations Smarty_Variable Object (3)
->value = Array (2)
  46 => Array (13)
    attributes_values => Array (1)
      4 => "1 bottle"
    attributes => Array (1)
      0 => 25
    price => 0
    specific_price => false
    ecotax => 0
    weight => 0
    quantity => 1000
    reference => ""
    unit_impact => "9.999999"
    minimal_quantity => "1"
    available_date => ""
    id_image => -1
    list => "'25'"
  47 => Array (13)
    attributes_values => Array (1)
      4 => "1 box"
    attributes => Array (1)
      0 => 26
    price => 40
    specific_price => false
    ecotax => 0.9
    weight => 0
    quantity => 1000
    reference => ""
    unit_impact => "8.333332"
    minimal_quantity => "1"
    available_date => ""
    id_image => -1
    list => "'26'"
->nocache = false
->scope = "..."

 

 

 

Link to comment
Share on other sites

or can anyone explain which type of array this is?

 

w3schools explains:

 

In PHP, there are three types of arrays:

  • Indexed arrays - Arrays with a numeric index
  • Associative arrays - Arrays with named keys
  • Multidimensional arrays - Arrays containing one or more arrays

Is this an associative array? if so how can I get to this value from within a template?

Link to comment
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
×
×
  • Create New...