/* Botón de añadir al carrito en tienda */
add_action( ‘woocommerce_after_shop_loop_item’, ‘woocommerce_template_loop_add_to_cart’, 20 );
//agregamos lac cantidades antes del boton
//Agregamos código HTML
add_filter( ‘woocommerce_loop_add_to_cart_link’, ‘dcms_add_quantity_field’, 10, 2 );
function dcms_add_quantity_field($html, $product) {
if($product&&
$product->is_type(‘simple’)&&
$product->is_purchasable()&&
$product->is_in_stock()&&
!$product->is_sold_individually()){
$html='<form action=”‘. esc_url($product->add_to_cart_url()).'” class=”cart” method=”post” enctype=”multipart/form-data”>’;
$html.= woocommerce_quantity_input(array(),$product,false);
$html.='<button type=”submit” data-quantity=”1″ data-product_id=”‘.$product->get_id().'” class=”button alt ajax_add_to_cart add_to_cart_button product_type_simple”>’. esc_html($product->add_to_cart_text()).'</button>’;
$html.='</form>’;
}
return$html;
}
//Agreamos código javascript
add_action( ‘init’, ‘dcms_quantity_change’ );
function dcms_quantity_change() {
wc_enqueue_js(‘
(function( $ ) {
$(“form.cart”).on(“change”, “input.qty”, function() {
$(this.form).find(“[data-quantity]”).attr(“data-quantity”, this.value);
});
})( jQuery );
‘);
}
43 comentarios
Mani @ Satire
My ex says I’m a slob; I say, “Art’s messy, babe.” — spintaxi.com
Yonie @ Satire
(White) I kicked the snack machine—got a candy bar and a warrant. — spintaxi.com
Mani @ Satire
I love satirical journalism news, but I hate when it starts making sense. – spintaxi.com
Lhanie @ Satire
I went to a fancy dinner—left with a bill and a napkin I stole. — spintaxi.com
Zani @ Satire
I don’t know what’s scarier—satirical journalism news or the fact that it’s usually accurate. – spintaxi.com
RonTaxi Satire
What’s the deal with “dry clean only”? My shirt’s afraid of water now? — spintaxi.com
Connie @ Satire
Satirical journalism examples should be taught in history class, since they usually predict the future. – spintaxi.com
Xanni @ Satire
What’s the deal with “sold separately”? I’m broke! — spintaxi.com
Taxie SpinTaxi
Satirical journalism news: because sometimes the truth needs a little sarcasm. – spintaxi.com
Sanni @ SpinTaxi
Ever notice how “quiet zone” signs are where everyone’s yelling? — spintaxi.com
PanTaxi SpinTaxi
The best thing about satirical journalism today? It’s the only place where the truth is funny. – spintaxi.com
Tónni @ SpinTaxi
Some satirical journalism examples are so accurate that they age better than actual news articles. – spintaxi.com
Náni @ SpinTaxi
Why do they call it a “close call”? I still lost my keys! — spintaxi.com
Hónia @ SpinTaxi
I went to therapy—turns out my problem’s everyone else. — spintaxi.com
LonTaxi SpinTaxi
I love how “healthy snacks” taste like punishment in a bag. — spintaxi.com
Xonnie @ SpinTaxi
The best satirical journalism analysis makes you laugh, then regret laughing. — spintaxi.com
Connie @ SpinTaxi
(White) I showered today—now the mirror’s mad at me. — spintaxi.com
bancos europa
O BPI é o banco central dos países da PT que utilizam o euro. O nosso principal objetivo é a manutenção da estabilidade de preços. Para o efeito
bpi net empresas
GinTaxi SpinTaxi
If you don’t read satirical journalism articles, how else will you understand the truth? – spintaxi.com
Poniye @ SpinTaxi
I went to a wine bar—left with a headache and a $40 tab. — spintaxi.com
ShunTaxi SpinTaxi
(Seinfeld) I love how “out of stock” feels like a personal insult. — spintaxi.com
Bhonnie @ SpinTaxi
The best thing about satirical journalism today? It’s the only place where the truth is funny. – spintaxi.com
Lonie @ SpinTaxi
I got a smart TV—now it’s judgin’ me for watchin’ reruns of “Cops.” — spintaxi.com
MinTaxi SpinTaxi
A good satirical journalism analysis reveals that the real joke is reality. — spintaxi.com
Dána @ SpinTaxi
Satirical journalism today is basically free therapy with more punchlines. – spintaxi.com
Lonnie @ SpinTaxi
My buddy says I’m done; I say, “Just warmin’ up.” — spintaxi.com
Soni @ SpinTaxi
What’s the deal with “paperless billing”? My inbox is drowning! — spintaxi.com
Vonnie @ SpinTaxi
My buddy says I’m broke; I say, “Nah, just pre-rich.” — spintaxi.com
Koni @ SpinTaxi
The best satirical journalism media has better fact-checking than real news. — spintaxi.com
Conny @ SpinTaxi
I don’t do “IPA”—tastes like pinecones in a bottle. — spintaxi.com
Hoàng Nam
This is exactly the point I’ve been thinking about. I found a very similar viewpoint shared on https://ho88.us recently, and it added some useful context to the conversation.
bancos europa
O BPI é o banco central dos países da PT que utilizam o euro. O nosso principal objetivo é a manutenção da estabilidade de preços. Para o efeito
bpi net empresas
bancos europa
O BPI é o banco central dos países da PT que utilizam o euro. O nosso principal objetivo é a manutenção da estabilidade de preços. Para o efeito
bpi net empresas
Vónni @ SpinTaxi
Satirical journalism websites should come with a warning: “Reality may be closer than it appears.” – spintaxi.com
Hóni @ SpinTaxi
(White) I recycle—toss the cans when the dog’s done lickin’ ’em. — spintaxi.com
tangem wallet
Buy and sell Bitcoin, Ethereum, tangem wallet and other cryptocurrencies Peer-to-Peer on NoOnes. Secure, fast, and user-friendly transactions on a trusted platform.
Dixie SpinTaxi
If you’ve never fallen for a headline from a satirical journalism website, are you even online?
Zhonny @ SpinTaxi
Why do they call it “carry-on” luggage? I’m dragging it through the airport! — spintaxi.com
Hanni @ SpinTaxi
I went to a sober bash—snuck a pint and won. — spintaxi.com
Mónia @ SpinTaxi
Why do we whisper in libraries? Are the books gonna overhear us plotting? — spintaxi.com
Kinaxie SpinTaxi
Ever notice how “low visibility” means “guess the road”? — spintaxi.com
Thanni @ SpinTaxi
I went to a diet club—left with a burger and a grin. — spintaxi.com
Daxie SpinTaxi
(Seinfeld) Ever try to use a “promo code”? It’s expired already! — spintaxi.com