Foros del Web » Programando para Internet » PHP »

Problema con las combinaciones de atributos en Prestashop

Estas en el tema de Problema con las combinaciones de atributos en Prestashop en el foro de PHP en Foros del Web. Buenas tardes Tengo un problema con Prestashop. Resulta que para un producto manejo unos atributos y sus respectivas combinaciones. Para dicho producto supongamos que tengo ...
  #1 (permalink)  
Antiguo 27/10/2011, 14:55
 
Fecha de Ingreso: abril-2010
Ubicación: Pereira
Mensajes: 38
Antigüedad: 14 años
Puntos: 1
Problema con las combinaciones de atributos en Prestashop

Buenas tardes

Tengo un problema con Prestashop. Resulta que para un producto manejo unos atributos y sus respectivas combinaciones. Para dicho producto supongamos que tengo 7 atributos y deseo descartar unos 3 atributos para las combinaciones, solamente con 4 atributos combinados me genere el item de compra.

Prestashop no maneja atributos opcionales, por eso tuve que personalizar el codigo fuente para que los atributos opcionales queden al margen de las combinaciones, pero al momento de agregar al Carrito de Compra figura el item de la compra con los atributos obligatorios y no captura los valores de los atributos opcionales.

Este es el código


Código PHP:
{if isset($groups)}

            <!-- 
atributos obligatorios -->

            <
div id="attributes">

            {foreach 
from=$groups key=id_attribute_group item=group}

            {if 
$group.attributes|@count}

            <
p>

                <
label for="group_{$id_attribute_group|intval}">{$group.name|escape:'htmlall':'UTF-8'} :</label>

                {
assign var="groupName" value="group_$id_attribute_group"}

                <
select name="{$groupName}" id="group_{$id_attribute_group|intval}" onchange="javascript:findCombination();{if $colors|@count > 0}$('#wrapResetImages').show('slow');{/if};">

                    <
option value=0 selected="selected">Escoger</option>
                    
                    {foreach 
from=$group.attributes key=id_attribute item=group_attribute}

                        <
option value="{$id_attribute|intval}" title="{$group_attribute|escape:'htmlall':'UTF-8'}">{$group_attribute|escape:'htmlall':'UTF-8'}</option>

                    {/foreach}

                </
select>

            </
p>

            {/if}

            {/foreach}

            </
div>

            {/if}

            <!-- 
atributos opcionales -->
            
            <
p>
            <
label for="group_8">{'Color del Folio'|escape:'htmlall':'UTF-8'} :</label>
                <
select name="group_8" id="group_8">
                    <
option value=0 selected="selected">Escoger</option>
                    <
option value="79" title="{'Nogal'|escape:'htmlall':'UTF-8'}">{'Nogal'|escape:'htmlall':'UTF-8'}</option>
                    <
option value="80" title="{'Roble Dorado'|escape:'htmlall':'UTF-8'}">{'Roble Dorado'|escape:'htmlall':'UTF-8'}</option>
                    <
option value="81" title="{'Winchester'|escape:'htmlall':'UTF-8'}">{'Winchester'|escape:'htmlall':'UTF-8'}</option>
                    <
option value="88" title="{'Sapelli'|escape:'htmlall':'UTF-8'}">{'Sapelli'|escape:'htmlall':'UTF-8'}</option>
                    <
option value="89" title="{'Ninguno'|escape:'htmlall':'UTF-8'}">{'Ninguno'|escape:'htmlall':'UTF-8'}</option>
                </
select>
            </
p>
            <
br />
            <
p>
            <
label for="group_11">{'Apertura'|escape:'htmlall':'UTF-8'} :</label>
                <
select name="group_11" id="group_11">
                    <
option value=0 selected="selected">Escoger</option>
                    <
option value="90" title="{'Derecha'|escape:'htmlall':'UTF-8'}">{'Derecha'|escape:'htmlall':'UTF-8'}</option>
                    <
option value="91" title="{'Izquierda'|escape:'htmlall':'UTF-8'}">{'Izquierda'|escape:'htmlall':'UTF-8'}</option>
                </
select>
            </
p>
            <
br />
            <
p>
            <
label for="group_12">{'Accionamiento'|escape:'htmlall':'UTF-8'} :</label>
                <
select name="group_12" id="group_12">
                    <
option value=0 selected="selected">Escoger</option>
                    <
option value="92" title="{'Derecha'|escape:'htmlall':'UTF-8'}">{'Derecha'|escape:'htmlall':'UTF-8'}</option>
                    <
option value="93" title="{'Izquierda'|escape:'htmlall':'UTF-8'}">{'Izquierda'|escape:'htmlall':'UTF-8'}</option>
                </
select>
            </
p>
            <
br />
            <
p id="product_reference" {if isset($groups) OR !$product->reference}style="display: none;"{/if}><label for="product_reference">{l s='Reference :'} </label><span class="editable">{$product->reference|escape:'htmlall':'UTF-8'}</span></p
Espero me ayuden. Gracias.
__________________
FRANCISCO DÍAZ
Ing. Desarollo Ingecol International

Etiquetas: atributos, combinaciones, prestashop
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 16:37.