woocommerce-code für Warenkorb-button
Muss ich hinzufügen das woocommerce Warenkorb-button auf einer meiner Seiten und wollte Fragen ob mir jemand helfen könnte mit der code zum Aufruf der Schaltfläche "Warenkorb". Hier ist der aktuelle code:
<?php woocommerce_product_loop_start(); ?>
<?php woocommerce_product_subcategories(); ?>
<?php while ( have_posts() ) : the_post(); ?>
<div id="product-image1">
<a href="<?php echo esc_url( get_permalink( $product->id ) ); ?>" title="<?php echo esc_attr( $product->get_title() ); ?>">
<?php echo $product->get_image(); ?>
</a>
</div>
<div id="product-description-container">
<ul>
<a href="<?php echo esc_url( get_permalink( $product->id ) ); ?>" title="<?php echo esc_attr( $product->get_title() ); ?>">
<li><h4><?php echo $product->get_title(); ?></h4></li></a>
<li><?php echo apply_filters( 'woocommerce_short_description', $post->post_excerpt )?></li>
<li><h6><?php echo $product->get_price_html(); ?> **MISSING CODE TO ADD TO CART BUTTON HERE**</h6></li>
</ul>
</div>
<?php endwhile; //end of the loop. ?>
InformationsquelleAutor helpanoobout | 2014-03-27
Du musst angemeldet sein, um einen Kommentar abzugeben.
Ich denke, vielleicht müssen Sie folgenden code.
Fügen Sie diesen code in Ihre Ort = (
**MISSING CODE TO ADD TO CART BUTTON HERE**
).Hoffe, das wird helfen.
$product->id sollte nun ersetzt werden durch $product->get_id() und $product->product_type durch $product->get_type(), sonst erhalten Sie eine Fehlermeldung.
Wenn ich die get_price_html vor diesem code bekomme ich einen fatal error, keine Ahnung warum?
Wie kann ich den text ändern, hinzufügen zum Warenkorb Hinzugefügt zum Warenkorb nach Klick dieser?
InformationsquelleAutor Akshãy Paghdar