Multiple products_form.tpl links

Proxivire

No avatar

2007-04-27 15:07

Good day,

In the admin panel, I want to place multiple links to different products_form.tpl files to auto-insert some information into the fields.
So, for example, for brand X I'd have products_form_x.tpl and for brand Y I'd have products_form_y.tpl

I am however unable to find where in the site's code the reference to products_form.tpl is made. I know how to add the links, I just don't know how to connect the different products_form.tpl files to those links.

Any help?

» Quick.Cart v1.x

-DmD-

merci

No avatar

2007-04-30 12:07

Proxivire -
1)in file templates/admin/page.tpl you have to add link to page with new brand form. You wrote that you know how to add links, but I give you example:
after this:

<class="menuItem" href="?p=productsForm&amp;iCategory=$iCategory"><span class="menuItemText">$lang[Add_product]</span></a>


paste new link for example:

<class="menuItem" href="?p=productsForm&amp;iCategory=$iCategory&amp;sBrand=_x"><span class="menuItemText">$lang[Add_productbrand X</span></a>



2)in file actions_admin/products.php
before this:

if( isset( $iProduct ) && is_numeric$iProduct ) )


paste this:

if( !isset( $sBrand ) )
      
$sBrand null;



3)in the same file replace this:

$content .= $tpl->tbHtml'products_form.tpl''FORM' );


with this:

$content .= $tpl->tbHtml'products_form'.$sBrand.'.tpl''FORM' );



4)Now create in templates/admin directory file for example products_form_x.tpl

Proxivire

No avatar

2007-05-01 10:03

merci; merci >)

That worked exactly how I wanted it, thanks a lot.
Can't understand how I didn't find the products_form.tpl reference in products.php, must've been a long day when I was looking.

again, thanks a bunch, this'll help me alot :)

-DmD-

Back to top
about us | contact