X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   trying to make drop down list of SKU, isn't working! (https://forum.x-cart.com/showthread.php?t=61107)

plnewton 10-04-2011 04:11 PM

trying to make drop down list of SKU, isn't working!
 
Can someone PLEASE tell me why this code isn't working?



I made a file called products_t_bottommenu.tpl , and im calling it from customer_manufacturer.tpl,


but it just won't work?!


What could I be missing to make this work properly??!!




{*



$Id: products_t.tpl,v 1.3.2.5 2010/12/15 11:57:05 aim Exp $



vim: set ts=2 sw=2 sts=2 et:



*}

{list2matrix assign="products_matrix" assign_width="cell_width" list=$products row_length=$config.Appearance.products_per_row}



{assign var="is_matrix_view" value=true}




{if $config.Appearance.display_productcode_in_list eq "Y"}


{if $products_matrix}




<input type="hidden" name="ctl00$ContentPlaceHolder1$CascadingDropDown1 _ClientState" id="ctl00_ContentPlaceHolder1_CascadingDropDown1_C lientState" />

<center>

<tr>
<td >
</td>



<td style="border:0px solid red; padding-top:5px; text-align:left;" valign="top">

<select name="ctl00$ContentPlaceHolder1$ddlCartridges" id="ctl00_ContentPlaceHolder1_ddlCartridges" class="inkSearchDropDown" style="width:335px;padding-left:0px;">







{foreach from=$row item=product name=products}







{if $product.productcode}
<option value="{$product.productcode}">{$product.productco de}</option>
{else}
&nbsp;
{/if}

{/foreach}

</select>

</td>
<td >




</td>
</tr>

</center>


{/if}

{/if}

plnewton 10-04-2011 04:12 PM

Re: trying to make drop down list of SKU, isn't working!
 
And, that's <option value="{$product.productcode}">{$product.productco de}</option> in fact. For some reason this forum put a space in there, which isn't present.

plnewton 10-04-2011 04:42 PM

Re: trying to make drop down list of SKU, isn't working!
 
I fixed my own problem by doing this;

{foreach from=$products_matrix item=row name=products_matrix}

{foreach from=$row item=product}





<option value="{$product.productcode}">{$product.productco de}</option>

{/foreach}

{/foreach}


All times are GMT -8. The time now is 03:25 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.