Forum Replies Created

Viewing 15 replies - 1 through 15 (of 22 total)
  • I just rechecked the issue discussed, I think the problem has to do with the value ‘0’. When I changed the value from the number zero to ‘Zero’ the product was successfully added to the cart.
    Odd , dont u think?
    What could cause this?

    anmaree.annarbortees – everything worked fine for me for a day or two and all of a sudden I started getting that same error ‘ please choose product options’ even-though I clearly choose all the product options available.
    I did however notice that the error occurs only if I do not have a default option set in the backend of WooCommerce. For example, all my products have three options : 1. Weight (or) 2. Units 3. Cut type. So if the customer chooses ‘Weight’, ‘Units’ are automatically 0 and if he chooses ‘Units’ ‘Weight’ is automatically on 0.
    I have a fresh installation of WooCommerce, removed the function I added to the functions.php but this error is still occuring.
    Any ideas?
    my dev site is – https://www.best-foods-for-fat-burning.com/wordpress

    I finally got this to work for me, please find my re-edited code for the functions.php file (iv’e had an incorrect reference name -‘add-to-cart’ instead of ‘wc-add-to-cart’):
    added the code below to functions.php file of my theme

    function register_woo_radio_button_scripts () {
    wp_deregister_script('wc-add-to-cart-variation');
    wp_dequeue_script('wc- add-to-cart-variation');
    wp_register_script( 'wc-add-to-cart-variation', plugins_url( get_stylesheet_directory_uri().'woocommerce/assests/js/frontend/add-to-cart-variation.min.js', __FILE__ ), array( 'jquery'), false, true );
    wp_enqueue_script('add-to-cart-variation');
    }
    add_action( 'wp_enqueue_script', 'register_woo_radio_button_scripts' );

    [Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]

    2. Next would be to add the line in css: .single_variation_wrap{display:block !important;}

    Hi,

    I’m also trying to make the ‘add-to-cart’ button visible permanently and I’ve done the following but nothing has changed in this regard:
    1. I’ve edited ‘add-to-cart-variation.js’ like so and place it in the following folder – child-theme/woocommerce/assets/js/frontend
    // Fallback to window property if not set – backwards compat
    if ( ! all_variations )
    all_variations = window[ “product_variations_” + product_id];
    if ( ! all_variations )
    all_variations = window[ “product_variations” ][ product_id ];
    if ( ! all_variations )
    all_variations = window[ “product_variations” ];
    if ( ! all_variations )
    all_variations = window[ “product_variations_” + product_id ];
    2. Copied the entire code to ‘add-to-cart-variation.min.js – same directory as above
    3.added the code below to functions.php file of my theme
    function register_woo_radio_button_scripts () {

    wp_deregister_script(‘add-to-cart-variation’);

    wp_dequeue_script(‘add-to-cart-variation’);

    wp_register_script( ‘add-to-cart-variation’, plugins_url( get_stylesheet_directory_uri().’woocommerce/assests/js/frontend/add-to-cart-variation.min.js’, __FILE__ ), array( ‘jquery’), false, true );

    wp_enqueue_script(‘add-to-cart-variation’);

    }

    add_action( ‘wp_enqueue_script’, ‘register_woo_radio_button_scripts’ );
    4. Working with WooCommerce 2.017 (latest version)

    What am I doing wrong or missing?

    Best Regards
    Ofer

    Thread Starter ouverz

    (@ouverz)

    Anyone?

    You would need to change the code to the following:
    <?php if (is_product_category(arrry(‘cat1′,’cat2′,’cat3’)){ ?>
    <div></div>
    <?php } ?>

    Hi,
    I tried your solution Ron but unfortunately I have a similar problem to the other solution I tried. Simple products are displayed correctly for the most part (a little CSS is required) but on variable products, all the associated variations for each product are shown which makes the category page very messy and unorganized.

    Did you have that problem and if so how did you solve this issue?

    I did something similar by adding the following lines of code to the functions.php file in my theme (see below).
    I’ve noticed two problems, one is that the code adds the quantity to simple products but exposes all of the variations on variable products which makes the page looks really busy and unorganized. The second issue is that after adding a product the page has to reload itself.
    I’ll try your solution, hopefully I can follow it.
    =================
    remove_action( ‘woocommerce_after_shop_loop_item’, ‘woocommerce_template_loop_add_to_cart’); // remove that ajaxified Add To Cart button that automatically adds 1 item to the cart.
    add_action( ‘woocommerce_after_shop_loop_item’, ‘woocommerce_template_single_add_to_cart’, 1); // replace it with the Add To Cart Button, complete with QTY field.. the same one that is used on the Single Product page.
    ==========

    Thread Starter ouverz

    (@ouverz)

    I just realized that I get an error when i try reading the xml file generated by Yoast.
    “sitemap_index.xml error on line 8 at column 32: Entity ‘raquo’ not defined Below is a rendering of the page up to the first error”

    I dont understand why thats happening either.

    Thread Starter ouverz

    (@ouverz)

    Good news, I was able to add mobile specific css styling adjustments to the website and things are hopefully looking better on mobile devices.
    I’ll upload the changes to the website tomorrow and i’ll be happy to hear your comments and recommendations, im currently running the changes i made on a test environment.

    Thread Starter ouverz

    (@ouverz)

    I solved the issue, it had to do with a change i made to a selector in CSS.
    I appreciate the help and assistance!

    Thread Starter ouverz

    (@ouverz)

    From what I can tell the error has yet to repeat since updating the htaccess.
    But the widget issue is still occuring. If I could just figureout how to change the url path than maybe this issue would also be solved.

    Thread Starter ouverz

    (@ouverz)

    This is the content of the htaccess now(i just edited it via a post i saw online of a similar problem):
    BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*) index.php?/$1
    </IfModule>

    # END WordPress
    This is how it looked before:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

    Thread Starter ouverz

    (@ouverz)

    there are around 30-40 of these errors:
    /wordpress/.htaccess: Invalid command ‘\xef\xbb\xbf’, perhaps misspelled or defined by a module not included in the server configuration, referer: https://www.helenkdesigns.co.il/

    I just checked that, but I have no idea what the means.
    Do you know how to change the URL of these widgets ?

    Thread Starter ouverz

    (@ouverz)

    I found this error in firebug:
    Failed to load resource:” https://localhost/wordpress/wp-content/uploads/2013/05/widget1.png&#8221;

    Is it possible that the problem lies with the old website being situated on localhost and the new one on a live domain, having some resources not updated automatically to https://www.helenkdesigns.co.il/wp-content etc?
    I had additional issues with most of the images on site today, suddendly they weren’t displayed because they couldn’t be found on localhost and i had to change it to domainname.co.il.
    But for widgets i dont know how to fix the problem.

Viewing 15 replies - 1 through 15 (of 22 total)