Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Заменить кнопку <button> на <a href


Recommended Posts

Как  отправить значения заменив :

 <button type="button" onclick="cart.add('<?php echo $product['product_id']; ?>', '<?php echo $product['minimum']; ?>');">

на

<a href = "#"

Link to comment
Share on other sites


тему можно закрыть,решил следующим образом:

<a  onclick="cart.add('<?php echo $product['product_id']; ?>', '<?php echo $product['minimum']; ?>');" class="add_to_cart_button"><i class="fa fa-cart-plus"></i> Добавить в корзину</a>

 

Edited by mirstiker
Link to comment
Share on other sites


решил следующим образом:

<a type="button" onclick="cart.add('<?php echo $product['product_id']; ?>', '<?php echo $product['minimum']; ?>');" class="add_to_cart_button"><i class="fa fa-cart-plus"></i> Добавить в корзину</a>

 

Link to comment
Share on other sites


Еще похожая ситуация возникла,нужно изменить внешний  вид корзины ,в стандарте она отображается вот так:

<button type="button" data-toggle="dropdown" data-loading-text="<?php echo $text_loading; ?>" class="btn btn-inverse btn-block btn-lg dropdown-toggle"><i class="fa fa-shopping-cart"></i> <span id="cart-total"><?php echo $text_items; ?></span></button>

убирая <button и заварачивая так:

<div  class="widget_shopping_cart_icon" ><a type="button" data-loading-text="<?php echo $text_loading; ?>"><i class="wicon fa fa-shopping-bag"></i> <span id="cart-total"><?php echo $text_items; ?></span> </a> </div>

значения не добавляются  "на лету " в корзину только после перезагрузки страницы,как можно решить?

Edited by mirstiker
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
 Share

×
×
  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.