Jump to content

Hoe gewicht toevoegen in shoppingcart?


Recommended Posts

Je kan hier gebruik maken van de waarden die beschikbaar zijn in de $cart.products.

Als je hier een dump op loopt {$cart.products|@var_dump} zie je dat er twee velden beschikbaar zijn  namelijk weight_attribute en weight.

Je kan deze dan gebruiken in bijvoorbeeld uwwinkel/themes/classic/templates/checkout/_partials/cart-summary.tpl

waar je dan uw twee variabele kan toevoegen

    {block name='cart_summary_product_list'}
        <div class="collapse" id="cart-summary-product-list">
            <ul class="media-list">

                {foreach from=$cart.products item=product}
                <li id="Crezzur">
                    <b>weight_attribute:</b> {$product.weight_attribute} <br>
                    <b>weight:</b> {$product.weight}
                </li>
                <li class="media">{include file='checkout/_partials/cart-summary-product-line.tpl' product=$product}</li>
              {/foreach}
            </ul>
        </div>
    {/block}

 

zodat je deze weergaven kan zien:

afbeelding.thumb.png.c0582765b3db063a5aaf7545c4844a87.png

Edited by Crezzur (see edit history)
  • Like 1
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...