Jump to content

Edit History

Théo Oliveira

Théo Oliveira

24 minutes ago, Daniel Tengler said:

Change URL from your theme product-list.tpl or add-to-cart-product-list.tpl ......

Each template has it differently.

So you can't advise exactly.



href="{$product.url}"

 

Hey, @Daniel TenglerThanks! Below is the code "product-add-to-cart.tpl", could you tell me where to change according to your suggestion?

 

{if Group::getCurrent()->id != 4}
    <div class="product-add-to-cart">
        {if !$configuration.is_catalog}
            <span class="control-label">{l s='Quantity' d='Shop.Theme.Catalog'}</span>

            {block name='product_quantity'}
                <div class="product-quantity clearfix">
                    <div class="qty">
                        <input
                            type="number"
                            name="qty"
                            id="quantity_wanted"
                            value="{$product.quantity_wanted}"
                            class="input-group"
                            min="{$product.minimal_quantity}"
                            aria-label="{l s='Quantity' d='Shop.Theme.Actions'}"
                            >
                    </div>

                    <div class="add">
                        <button
                            class="btn btn-primary add-to-cart"
                            data-button-action="add-to-cart"
                            type="submit"
                            {if !$product.add_to_cart_url}
                                disabled
                            {/if}
                            >
                            {l s='Add to cart' d='Shop.Theme.Actions'}
                        </button>
                    </div>
                </div>
            {/block}

            {block name='product_availability'}
                <span id="product-availability">
                    {if $product.show_availability && $product.availability_message}
                        {if $product.availability == 'available'}
                            <i class="material-icons product-available">&#xE5CA;</i>
                        {elseif $product.availability == 'last_remaining_items'}
                            <i class="material-icons product-last-items">&#xE002;</i>
                        {else}
                            <i class="material-icons product-unavailable">&#xE14B;</i>
                        {/if}
                        {$product.availability_message}
                    {/if}
                </span>
            {/block}

            {block name='product_minimal_quantity'}
                <p class="product-minimal-quantity">
                    {if $product.minimal_quantity > 1}
                        {l
          s='The minimum purchase order quantity for the product is %quantity%.'
          d='Shop.Theme.Checkout'
          sprintf=['%quantity%' => $product.minimal_quantity]
                        }
                    {/if}
                </p>
            {/block}
        {/if}
    </div>
{/if}


or in the code "product-list.tpl":

{block name='content'}
  <section id="main">

    {block name='product_list_header'}
      <h2 class="h2">{$listing.label}</h2>
    {/block}

    <section id="products">
      {if $listing.products|count}

        <div id="">
          {block name='product_list_top'}
            {include file='catalog/_partials/products-top.tpl' listing=$listing}
          {/block}
        </div>

        {block name='product_list_active_filters'}
          <div id="" class="hidden-sm-down">
            {$listing.rendered_active_filters nofilter}
          </div>
        {/block}

        <div id="">
          {block name='product_list'}
            {include file='catalog/_partials/products.tpl' listing=$listing}
          {/block}
        </div>

        <div id="js-product-list-bottom">
          {block name='product_list_bottom'}
            {include file='catalog/_partials/products-bottom.tpl' listing=$listing}
          {/block}
        </div>

      {else}

        {include file='errors/not-found.tpl'}

      {/if}
            {hook h="displayCategoryBottom"}
    </section>

  </section>
{/block}

 

Théo Oliveira

Théo Oliveira

18 minutes ago, Daniel Tengler said:

Change URL from your theme product-list.tpl or add-to-cart-product-list.tpl ......

Each template has it differently.

So you can't advise exactly.


href="{$product.url}"

 

Hey, @Daniel TenglerThanks! Below is the code "product-add-to-cart.tpl", could you tell me where to change according to your suggestion?

 

{if Group::getCurrent()->id != 4}
    <div class="product-add-to-cart">
        {if !$configuration.is_catalog}
            <span class="control-label">{l s='Quantity' d='Shop.Theme.Catalog'}</span>

            {block name='product_quantity'}
                <div class="product-quantity clearfix">
                    <div class="qty">
                        <input
                            type="number"
                            name="qty"
                            id="quantity_wanted"
                            value="{$product.quantity_wanted}"
                            class="input-group"
                            min="{$product.minimal_quantity}"
                            aria-label="{l s='Quantity' d='Shop.Theme.Actions'}"
                            >
                    </div>

                    <div class="add">
                        <button
                            class="btn btn-primary add-to-cart"
                            data-button-action="add-to-cart"
                            type="submit"
                            {if !$product.add_to_cart_url}
                                disabled
                            {/if}
                            >
                            {l s='Add to cart' d='Shop.Theme.Actions'}
                        </button>
                    </div>
                </div>
            {/block}

            {block name='product_availability'}
                <span id="product-availability">
                    {if $product.show_availability && $product.availability_message}
                        {if $product.availability == 'available'}
                            <i class="material-icons product-available">&#xE5CA;</i>
                        {elseif $product.availability == 'last_remaining_items'}
                            <i class="material-icons product-last-items">&#xE002;</i>
                        {else}
                            <i class="material-icons product-unavailable">&#xE14B;</i>
                        {/if}
                        {$product.availability_message}
                    {/if}
                </span>
            {/block}

            {block name='product_minimal_quantity'}
                <p class="product-minimal-quantity">
                    {if $product.minimal_quantity > 1}
                        {l
          s='The minimum purchase order quantity for the product is %quantity%.'
          d='Shop.Theme.Checkout'
          sprintf=['%quantity%' => $product.minimal_quantity]
                        }
                    {/if}
                </p>
            {/block}
        {/if}
    </div>
{/if}

or in the code "product-list.tpl":

 

{block name='content'}
  <section id="main">

    {block name='product_list_header'}
      <h2 class="h2">{$listing.label}</h2>
    {/block}

    <section id="products">
      {if $listing.products|count}

        <div id="">
          {block name='product_list_top'}
            {include file='catalog/_partials/products-top.tpl' listing=$listing}
          {/block}
        </div>

        {block name='product_list_active_filters'}
          <div id="" class="hidden-sm-down">
            {$listing.rendered_active_filters nofilter}
          </div>
        {/block}

        <div id="">
          {block name='product_list'}
            {include file='catalog/_partials/products.tpl' listing=$listing}
          {/block}
        </div>

        <div id="js-product-list-bottom">
          {block name='product_list_bottom'}
            {include file='catalog/_partials/products-bottom.tpl' listing=$listing}
          {/block}
        </div>

      {else}

        {include file='errors/not-found.tpl'}

      {/if}
            {hook h="displayCategoryBottom"}
    </section>

  </section>
{/block}

 

×
×
  • Create New...