Jump to content

Update field values from module settings


xkushme

Recommended Posts

Helo,

 

I made a module for show several products whose id come from a new table.

 

 

The table´s (ps_inicialmod) structure is:

 

  - id_desta

 

  - id_prod (id_product for the relationship)

 

  - mod (Values - 1: "Featured Prod", 2: "Product Offer", 3 "Featured Collection").

 

 

The table data is:

 

   id_desta           id_prod           mod

 

         1                     2                   1

         2                     7                   1

         3                     5                   2

         4                    11                  2

         5                    23                  2

         6                    20                  3

 

The module has 3 functions:

 

  -  obtenerDestacados(): Searchs for mod 1, gets the products data and pass it to the tpl.

 

  -  obtenerOfertas(): Searchs for mod 2, gets the products data and pass it to the tpl. 

 

  -  obtenerColeccion(): Searchs for mod 3, gets the products data and pass it to the tpl.

 

So far, so good.

 

But i don´t know how to change the id_prod field of each row from settings page.

 

Settings.tpl:

 

{$message}
<fieldset>
<legend>Configuración</legend>
<form method="post">
    <p>
        Productos destacados:
        
     </p>
        
     <p>
         <label for="???">Prod. Destacado 1:</label>
 
         <input id="???" name="???" type="text" style="width:20px !important;" value="{???}" />
     </p>
 
      <p>
         <label for="???">Prod. Destacado 1:</label>
 
         <input id="???" name="???" type="text" style="width:20px !important;" value="{???}" />
     </p>
        
 
        
        <p>
        Productos en oferta:
        
        </p>
        
        <p>
           <label for="???">Prod. Oferta 1:</label>
 
           <input id="???" name="???" type="text" style="width:20px !important;" value="{???}" />
        </p>
        
        <p>
           <label for="???">Prod. Oferta 1:</label>
 
           <input id="???" name="???" type="text" style="width:20px !important;" value="{???}" />
        </p>
        
        <p>
           <label for="???">Prod. Oferta 1:</label>
 
           <input id="???" name="???" type="text" style="width:20px !important;" value="{???}" />
        </p>
        
        <p>
        Colección destacada:
        
        </p>
        
        <p>
           <label for="???">Colec. Destacada 1:</label>
           <input id="???" name="???" type="text" style="width:20px !important;" value="{???}" />
       </p>
 
   
        <p>
        <br />
<label> </label>
<input id="submit_{$module_name}" name="submit_{$module_name}" type="submit" value="Guardar" class="button" />
</p>
</form>
</fieldset>

 

Thanks!

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...