tumil Posted August 5, 2016 Share Posted August 5, 2016 (edited) Hi, I'm not that advanced in css/java/php and I can't deal with this problem on my own. Could someone take a look at my website: http://wykrawacze.pl If you scroll down you can see products slider next to image with "Polecane" text. If you hover on a product, a button with "Dodaj do koszyka" (it means "Add to cart") appears. But this button is unclickable on mobile because of the hover appear thing. How can I make this button appear even without hover? I would write it in @media with demanded resolution. Here's a code from product-slider.tpl with this button. Maybe it will help with solving the issue. Thanks for help <a class="button ajax_add_to_cart_button btn btn-default" href="{$link->getPageLink('cart', true, NULL, $smarty.capture.default, false)|escape:'html':'UTF-8'}" rel="nofollow" title="{l s='Add to cart'}" data-id-product-attribute="{$product.id_product_attribute|intval}" data-id-product="{$product.id_product|intval}" data-minimal_quantity="{if isset($product.product_attribute_minimal_quantity) && $product.product_attribute_minimal_quantity >= 1}{$product.product_attribute_minimal_quantity|intval}{else}{if isset($product.minimal_quantity)}{$product.minimal_quantity|intval}{else}1{/if}{/if}"> <span>{l s='Add to cart'}</span> </a> Hmm, now I look at this and not only button but also the quantity field appears only on hover so I think that i posted wrong part of code. Here's the whole code for this element: {if isset($product.available_for_order) && isset($product.allow_oosp)} <div class="button-container"> {if ($product.id_product_attribute == 0 || (isset($add_prod_display) && ($add_prod_display == 1))) && $product.available_for_order && !isset($restricted_country_mode) && $product.customizable != 2 && !$PS_CATALOG_MODE} {if (!isset($product.customization_required) || !$product.customization_required) && ($product.allow_oosp || $product.quantity > 0)} {capture}add=1&id_product={$product.id_product|intval}{if isset($static_token)}&token={$static_token}{/if}{/capture} <div class="pl-quantity-input-wrapper"> <input type="text" name="qty" class="form-control qtyfield quantity_to_cart_{$product.id_product|intval}" value="{if isset($product.product_attribute_minimal_quantity) && $product.product_attribute_minimal_quantity > 1}{$product.product_attribute_minimal_quantity|intval}{else}{if isset($product.minimal_quantity)}{$product.minimal_quantity|intval}{else}1{/if}{/if}"/> <div class="quantity-input-b-wrapper"> <a href="#" data-field-qty="quantity_to_cart_{$product.id_product|intval}" class="transition-300 pl_product_quantity_down"> <span><i class="icon-caret-down"></i></span> </a> <a href="#" data-field-qty="quantity_to_cart_{$product.id_product|intval}" class="transition-300 pl_product_quantity_up "> <span><i class="icon-caret-up"></i></span> </a> </div> </div> <a class="button ajax_add_to_cart_button btn btn-default" href="{$link->getPageLink('cart', true, NULL, $smarty.capture.default, false)|escape:'html':'UTF-8'}" rel="nofollow" title="{l s='Add to cart'}" data-id-product-attribute="{$product.id_product_attribute|intval}" data-id-product="{$product.id_product|intval}" data-minimal_quantity="{if isset($product.product_attribute_minimal_quantity) && $product.product_attribute_minimal_quantity >= 1}{$product.product_attribute_minimal_quantity|intval}{else}{if isset($product.minimal_quantity)}{$product.minimal_quantity|intval}{else}1{/if}{/if}"> <span>{l s='Add to cart'}</span> </a> {else} <a class="button lnk_view btn" href="{$product.link|escape:'html':'UTF-8'}" title="{l s='View'}"> <span>{if (isset($product.customization_required) && $product.customization_required)}{l s='Customize'}{else}{l s='More'}{/if}</span> </a> {/if} {else} <a class="button lnk_view btn" href="{$product.link|escape:'html':'UTF-8'}" title="{l s='View'}"> <span>{if (isset($product.customization_required) && $product.customization_required)}{l s='Customize'}{else}{l s='More'}{/if}</span> </a> {/if} {hook h="displayProductPriceBlock" product=$product type='after_price'} </div> {/if} Edited August 5, 2016 by tumil (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now