Custom WooCommerce template for product
Custom WooCommerce template for product
Custom WooCommerce template for product
Loading different header and footer in woocommerce templates (AMP)
add_filter( ‘woocommerce_add_to_cart_fragments’, function($fragments) { ob_start(); ?> <li class=”my_cart”><a href=”javascript:void(0)” id=”sidebarCollapse” class=”carticonmain”><svg xmlns=”http://www.w3.org/2000/svg” style=”display: none;”> <symbol id=”shopping-cart” viewBox=”0 0 700 700″><title>shopping-cart</title> <path d=”m150.355469 322.332031c-30.046875 0-54.402344 24.355469-54.402344 54.402344 0 30.042969 24.355469 54.398437 54.402344 54.398437 30.042969 0 54.398437-24.355468 54.398437-54.398437-.03125-30.03125-24.367187-54.371094-54.398437-54.402344zm0 88.800781c-19 0-34.402344-15.402343-34.402344-34.398437 0-19 15.402344-34.402344 34.402344-34.402344 18.996093 0 34.398437 15.402344 34.398437 34.402344 0 18.996094-15.402344 34.398437-34.398437 34.398437zm0 0″></path> <path d=”m446.855469 94.035156h-353.101563l-7.199218-40.300781c-4.4375-24.808594-23.882813-44.214844-48.699219-48.601563l-26.101563-4.597656c-5.441406-.96875-10.632812 … Read more
Custom woocommerce payment gateway – Form
// Get the category ID from url $catsearched = $_GET[‘product_cat’]; //printf($catsearched); $earth_radius = 6371; // Get products of category with in range distance $querystrShop = $wpdb->prepare(” SELECT productid AS post_id,(%d * ACOS(COS(RADIANS(%s)) * COS(RADIANS(phiz_geo_location.latitude)) * COS(RADIANS(phiz_geo_location.longitude) – RADIANS(%s)) + SIN(RADIANS(%s)) * SIN(RADIANS(phiz_geo_location.latitude)))) AS distance, phiz_postmeta.meta_value FROM phiz_geo_location JOIN phiz_term_relationships ON phiz_geo_location.productid = phiz_term_relationships.object_id LEFT JOIN … Read more
That add_rewrite_endpoint(“scheduled-order-create/([0-9]+)/?”, …); doesn’t work because add_rewrite_endpoint() doesn’t work with custom RegEx pattern. And remember that in addition to default public query vars like cat, tag, year and author, WordPress also makes all public post types and taxonomies (with a non-empty query_var value when registered — see register_post_type() and register_taxonomy()) be readable from the URL … Read more
Sudden 404 pages on product category archives
The question that you posted is unfortunately not all that specific but take a look at Woocommerce analytics. Otherwise there are 2 ways to do this on your own. 1. Query all the orders for day X and count the qty of a specific product. 2. Update the products sold after each purchase. Perhaps to … Read more
I solved this by creating a custom post type “conversation” with several post meta Post meta: number of messages Post meta: message_1 Post meta: message_1_author Post meta: message_1_timeline When displaying a conversation I check against “number of messages” for (i=1; i<=nr_messages; i++){ show_message(i);
How to display 2 products per row for Mobile using WooCommerce?