Welcome Guest, Not a member yet? Register   Sign In
help with templates
#1

[eluser]zyklon[/eluser]
Hi
Can someone help me with sending the array to templates?I am having trobles with this problem,as i have multiple mysql queries which depend one on another and there are like 3 queries.If someone can please contact me on private message to help me as i don't think that if i put the code here the peoples will understand,and is better to be able to explain.I would need this help asap if possible.
I put the code here for one of the problems here,maybe someone can figure it out.
Template:

{specification_categories}
<div class="specs">
<div class="blue_11_bold"><span class="specs_title">{specification_category_name}</span></div>
{subspecifications}
<div class="specs_gray">
<div class="specs_left">{subspecification_name}</div>
<div class="specs_right">{subspecification_value}</div>
</div>
{/subspecifications}
</div>
{/specification_categories}

And the script:
$data["specification_categories"] = array();

foreach($result as $key => $value)
{

$product_specification_value = $value["product_specification_value"];




$result_category_spec = $this->lugnuts->get_products_category_specification_id($tableName,$id_product);
foreach($result_category_spec as $key_2 => $value_2)
{
$product_specification_category_id = $value_2["product_specification_category_id"];
$result_spec_id = $this->lugnuts->get_products_specification_id($tableName,$id_product,$product_specification_category_id);
foreach($result_spec_id as $key_4 => $value_4)
{
$result_spec_id_value = $value_4["product_specification_id"];

$specification_category_name_res = $this->lugnuts->get_category_specification_name($tableNameproducts_specifications_categories,$product_specification_category_id);
$specification_category_name = $specification_category_name_res->product_specification_category_name;
$data["specification_category_name"] = $specification_category_name;
$subspecification_name_result = $this->lugnuts->get_category_subspecification_name($tableNameproducts_specifications_subspecifications,$result_spec_id_value);
$subspecification_name = $subspecification_name_result->product_specification;

$data["specification_categories"][] = array_merge((array)$data["specification_category_name"],
array('subspecifications' => array(
array('subspecification_name' => $subspecification_name),
array('subspecification_value' => $product_specification_value)
)
)
);
}

}


}


Messages In This Thread
help with templates - by El Forum - 11-30-2007, 02:07 PM
help with templates - by El Forum - 12-02-2007, 03:45 AM
help with templates - by El Forum - 12-02-2007, 03:58 AM
help with templates - by El Forum - 12-02-2007, 03:24 PM
help with templates - by El Forum - 12-02-2007, 03:35 PM
help with templates - by El Forum - 12-02-2007, 04:09 PM
help with templates - by El Forum - 12-02-2007, 05:08 PM
help with templates - by El Forum - 12-02-2007, 05:15 PM
help with templates - by El Forum - 12-03-2007, 05:13 PM



Theme © iAndrew 2016 - Forum software by © MyBB