0

Introduction

I am encountering a problem with a WordPress WooCommerce site. My client has many products all of them are “old” before I took over from the previous web bureau. Now, if you make new products or update the “old” ones, will the product “act” differently. They will be displayed differently in the basket and they set their own max quantity a user can buy to one, so you can’t add multiple copies of a product into the basket.

Links and information

The website: https://www.guldbrandsenjuveler.dk/

An “old” product: https://www.guldbrandsenjuveler.dk/smykker/armbaand/daisy-maguerit-armbaand

A “new” product: https://www.guldbrandsenjuveler.dk/43mm-daisy-broche-test

An example of how the products are shown different can be seen here: enter image description here

WordPress version 5.1.1 (latest per 17 April)

Theme: Jupiter version 6.1.6 (with child theme)

WooCommerce Version 3.5.8 (latest per 17 April)

List of installed plugins:

Accordions

Advanced Woo Search

Ajax Dropdowns

All-in-One WP Migration

Booster Plus for WooCommerce

Content Blocks (Custom Post Widget)

Cookie-message

Duplicate Page

Flexible Product Fields

Flexible Product Fields Pro

Loco Translate

Meta Tag Manager

Pakkelabels.dk for WooCommerce

Permalink Manager Lite

Responsive Select Menu

SendGrid

WooCommerce

WooCommerce AJAX Cart

WooCommerce Gift card

Woocommerce Gift Wrapper

WooCommerce Load More Products

WooCommerce PensoPay

WooCommerce Product Carousel Slider

WooCommerce Product Filter

WooCommerce Product Slider

WooCommerce Stripe Gateway

WordPress Carousel

WP Desk Helper

WP File Manager

WP Logo Showcase Responsive Slider Pro

WPBakery Page Builder (Modified Version)

WPForms

WPForms MailChimp

YITH WooCommerce Brands Add-on Premium

YITH WooCommerce Category Accordion Premium

Yoast SEO

Resources I’ve found

I haven't been able to find anything remotely related to this issue, I’ve searched on Google, StackOverflow and various WordPress support forums.

What I’ve tried

In WooCommerce you can select a product and edit it. While you are editing a product there is an option called “Sold individually” (something like that) all products have this option TURNED OFF so it shouldn’t act like it’s turned on!

In the picture I’ve posted I looked at the DOM in the quantity section to see if I could see what was wrong. To no surprise, the DOM differed. With the difference being that the old product shows the selected quantity in an <input> element with lots of attributes and classes, while the new products show the quantity in a plain <p> element. Below you can see the two DOM elements.

Old product

<tr class="woocommerce-cart-form__cart-item cart_item">

    <td class="product-remove">
        <a href="https://www.guldbrandsenjuveler.dk/kurv?remove_item=d4dc131d4da40b983b48be10a3fbea30&amp;_wpnonce=8cd1b7cb7d" class="remove" aria-label="Fjern denne vare" data-product_id="523" data-product_sku="3557400">×</a> </td>

    <td class="product-thumbnail">
        <a href="https://www.guldbrandsenjuveler.dk/smykker/<!-- Minimized for readability -->"></a>
    </td>

    <td class="product-name" data-title="Vare">
        <a href="https://www.guldbrandsenjuveler.dk/smykker/ringe/11mm-daisy-ring?attribute_pa_ringstoerrelse=48">11mm Daisy ring - 48</a> </td>

    <td class="product-price" data-title="Pris">
        <span class="woocommerce-Price-amount amount">1.300,00<span class="woocommerce-Price-currencySymbol">DKK</span></span>
    </td>

    <td class="product-quantity" data-title="Antal">
        <div class="quantity wac-quantity buttons_added">
            <input type="button" value="-" class="minus">
            <div class="wac-qty-button">
              <b>
                <a href="" class="wac-btn-sub">-</a>
              </b>
            </div>
            <label class="screen-reader-text" for="quantity_5cb5ac0e2744d">Antal</label>
            <input type="text" id="quantity_5cb5ac0e2744d" class="input-text qty text" step="1" min="0" max="" name="cart[d4dc131d4da40b983b48be10a3fbea30][qty]" value="2" title="Stk." size="4" pattern="[0-9]*" inputmode="numeric" aria-labelledby="11mm Daisy ring - 48 antal">
            <div class="wac-qty-button">
              <b>
                <a href="" class="wac-btn-inc">+</a>
              </b>
            </div>
            <input type="button" value="+" class="plus">
        </div>
    </td>

    <td class="product-subtotal" data-title="Total">
        <span class="woocommerce-Price-amount amount">2.600,00<span class="woocommerce-Price-currencySymbol">DKK</span></span>
    </td>
</tr>

New product

<tr class="woocommerce-cart-form__cart-item cart_item">

    <td class="product-remove">
        <a href="https://www.guldbrandsenjuveler.dk/kurv?remove_item=e5f6ad6ce374177eef023bf5d0c018b6&amp;_wpnonce=8cd1b7cb7d" class="remove" aria-label="Fjern denne vare" data-product_id="573" data-product_sku="3531075_0">×</a> </td>

    <td class="product-thumbnail">
        <a href="https://www.guldbrandsenjuveler.dk/smykker/<!-- Minimized for readability -->"></a>
    </td>

    <td class="product-name" data-title="Vare">
        <a href="https://www.guldbrandsenjuveler.dk/smykker/armbaand/11mm-daisy-paa-forgyldt-armbaand">11mm Daisy på forgyldt armbånd</a> </td>

    <td class="product-price" data-title="Pris">
        <span class="woocommerce-Price-amount amount">895,00<span class="woocommerce-Price-currencySymbol">DKK</span></span>
    </td>

    <td class="product-quantity" data-title="Antal">
        <div class="quantity wac-quantity buttons_added">
            <input type="button" value="-" class="minus">
            <div class="wac-qty-button">
              <b>
                <a href="" class="wac-btn-sub">-</a>
              </b>
            </div>
            1
            <input type="hidden" name="cart[e5f6ad6ce374177eef023bf5d0c018b6][qty]" value="1">
            <div class="wac-qty-button">
              <b>
                <a href="" class="wac-btn-inc">+</a>
              </b>
            </div>
            <input type="button" value="+" class="plus">
        </div>
    </td>

    <td class="product-subtotal" data-title="Total">
        <span class="woocommerce-Price-amount amount">895,00<span class="woocommerce-Price-currencySymbol">DKK</span></span>
    </td>
</tr>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.