• jonathan66

    (@jonathan66)


    Hello everybody.

    You have a major problem with the default option display. You’re confusing the product ID and its SKU.

    So this automatically adds products that don’t belong in the bundle.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Support Janilyn T

    (@janilyn409)

    Hi @jonathan66 ,

    Could you kindly show some images of the backend settings and a link to your published product for checking from my end here?

    I have checked on our dev site, it’s working properly.

    Best regards.

    Thread Starter jonathan66

    (@jonathan66)

    Hello. I’m having trouble importing some images here.

    Here’s a URL with the images. https://imgur.com/a/iqacJ3O

    I did this with the latest version, 7.5.5. I restored my website when I noticed this problem.

    Plugin Support Janilyn T

    (@janilyn409)

    Hi @jonathan66 ,

    You mentioned the SKU in your last thread, however, in your image, that’s UGS.

    UGS is not the same as SKU for products. Youn might have confused SKU with UGS.

    UGS (Universal Goods Specification) is a standard that defines the physical characteristics of a product, while SKU (Stock Keeping Unit) is a unique identifier used by businesses to manage their inventory. 

    The SKU is listed at the end of each item on the search box. When a product doesnt’t have any SKU assigned, the product ID will be used: https://prnt.sc/8cc6r_02nxv0.

    When searching for products to add to smart composite, our plugin will search and display both the Product ID and SKU as in this image: https://prnt.sc/drbxhvaO9mc1. The UGS won’t be considered in this case.

    So I can confirm that our plugin is working fine and do not mix up SKU with product ID at all. It’s just that our plugin doesn’t regard the UGS instead of SKU.

    Best regards.

    Thread Starter jonathan66

    (@jonathan66)

    Hello.

    No, I’m not confusing SKU and SKU. UGS = SKU in French. (See image)

    https://imgur.com/a/CAI4hZP

    Let’s stick with the word SKU to avoid adding complexity. I’m simply telling you that when I upgrade from version 7.5.4 to 7.5.5, you see BOTH the SKU and the product ID. I showed you the proof in my previous images.

    Pay more attention to the previous images. In the “default option,” I only have one product. However, when I look at the smart composite product and the drop-down list, a product has been added called “Ph moins piscines… …” even though it shouldn’t be there.

    I’m telling you that its SKU (602), coincidentally, is identical to the ID of the product “Tuyau PVC souple…” (602).

    And I think that’s why I have 2 products when I only need 1.

    Plugin Support Janilyn T

    (@janilyn409)

    Hi @jonathan66 ,

    Our developers responded that UGS is not a standard equivalence for SKU. It’s a translation, not an official equivalent term that can be treated the same as SKU when you switch to French. There are some other translations being used for SKU in Friench as well.

    Possibly, our plugin could not recognize UGS as the translation of SKU. They said it was difficult to identify the translated elements so our plugin will use the universal elements to be sure.

    If you are using a multilingual plugin for translating texts and phrases on your site, kindly make sure the translation of UGS as SKU is recognized properly in the other plugin settings.

    For smart composite, any unique identified number will be treated as a way to search for and add products to the offer. There’s no distinct option dfor choosing which to be used separately as in our WPC Product Bundles plugin. Users can choose to search by product ID or SKU in that plugin though.

    Our developers said they would consider this further if possible, however, I must state in advance that this is dififcult to be modified as your preference as UGS is not really considered an official element for managing products’ inventory instead of SKU. Also, smart composite offer different sources of pulling products, so making options to choose the product ID or SKU separately as in smart bundles will be really hard to not affect other current users (we have over 30K now).

    Best regards.

    Thread Starter jonathan66

    (@jonathan66)

    Hello. The difference between UGS and SKU isn’t the issue. Why do you keep talking to me about this?Pretend I never mentioned it and let’s get back to the problem.

    If SKU (e.g., 602) has an equivalent Product ID (e.g., 602), then Problem.

    Can you check this piece of code please?

    file : class-woocoo.php line 426

    if ( ! empty( $component[‘default’] ) ) {
    if ( is_numeric( $component[‘default’] ) ) { // ← 🚩 Problem HERE!!!!!!!!!!
    // id
    $product_default = wc_get_product( $component[‘default’] );
    } else {
    // sku
    $product_default = wc_get_product( wc_get_product_id_by_sku( $component[‘default’] ) );
    }

    if ( $product_default ) {
        echo '<option value="' . esc_attr( $component['default'] ) . '" selected="selected">' . wp_kses_post( $product_default->get_formatted_name() ) . '</option>';
    }

    }

    is_numeric() considers anything that looks like a number (e.g., "1234") as a number.

    So if your SKU is "1234" (which is a string of digits), it will pass this test.

    But WooCommerce will then try to fetch a product using the ID 1234:

    $product_default = wc_get_product( $component['default'] );

    … instead of using the function that searches by SKU:

    • This reply was modified 1 year ago by jonathan66.
    Thread Starter jonathan66

    (@jonathan66)

    Correction :

    $product_id = wc_get_product_id_by_sku( $component[‘default’] );
    $product_default = wc_get_product( $product_id );

    • This reply was modified 1 year ago by jonathan66.
    Plugin Support Janilyn T

    (@janilyn409)

    Hi @jonathan66 ,

    We do not provide any kind of technical customization on this forum cause we do not have any technical developers available here. We can only help you with general questions about our plugin features.

    What I said to you was what our developers said from our discussion about your case. I will send the information you gave to our developers so that they can further consider this case. Which action to take is dependent on our developers and their tests.

    I cannot guarantee this can be fixed as you prefer. The final decision is up to our developers. I can only write reports to them.

    Best regards.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Error UGS / ID’ is closed to new replies.