Home Forums WoodMart support forum Variation Swatches is not visible on Variable Raw Products

Variation Swatches is not visible on Variable Raw Products

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #429833

    k9casual.com
    Participant

    Hi sir/ ma’am,

    1. I am using woodmart theme on my website https://k9casual.com/; I am using swatches on product page but is on working on this https://k9casual.com/men-clothing/plain-t-shirts-for-men/ category. It shows dropdown instead of swatches.

    2. This category contains variable-raw-material product-type; which is managed by Atum Product level Plugin.How can I add variable raw material as product type to show swatches on these pages too.

    3. Another issue is with mega menu dropdown, I have recieved some complaints form customers that when they hover on menu button it doesn’t show mega menu drop down on first time, when they open another page or refresh page then it opens mega menu.

    4. Pls tell me how can I fix this bug.

    Normal product link https://k9casual.com/shop/alien-t-shirt-men/

    Raw product link https://k9casual.com/men-clothing/plain-t-shirts-for-men/

    An early reply is anticipated.

    Regards

    Attachments:
    You must be logged in to view attached files.
    #430033

    Hello,

    Sorry to hear about the inconvenience. Kindly, please share your Site WP-ADMIN Login details in the Private Content field so that we can check these concerns on your Site and help you out accordingly.

    Best Regards

    #430251

    k9casual.com
    Participant

    hi, pls find attached details.

    regards

    #430396

    Hello,

    Sorry to say but we are multiple third party Plugins active on your Site currently.

    Could you please once try deactivating all the third party Plugins on your Site remaining the Theme required ones activated. If the issue gets resolved, then reactivate them one by one to see which Plugin is causing the issue.

    If somehow issue still persists, then please take complete Backup of your Site first, then provide us the permission to completely debug your Site which includes deactivating all the third party Plugins and removal of on-Site Customization changes too, so that we can thoroughly check this issue on your Site and assist you accordingly.

    Best Regards

    #430582

    k9casual.com
    Participant

    hi sir, I tried method u have mentioned but it s not working, however I have copied the production website to https://beta.k9casual.com, u can test whatever testing is required here.

    Pls keep in mind that Atum product level and Sellkit plugin are most required. here are the use of both the plugins:-

    Atum – to manage raw materials on the website.
    Sellkit – for marketing, funnel, discount, notices etc.

    regards

    #430638

    Hello,

    We have checked the issue on your Staging Site and the dropdown for the Swatch is only appearing for the Size Chart variants that were appearing under the specific Raw Material Category Products which is coming through the ATUM third party Plugin.

    When we deactivated the both ATUM Plugins, the Size Chart dropdown disappears which clears the fact that they were coming through the third party Plugin end.

    Whereas, for other Products on your Site the Swatch is appearing fine: https://snipboard.io/fITsxo.jpg

    According to the Envato Policy, we don’t provide Support for the third party Plugin issues. You will need to contact the respective Plugin Support in this regard. They will guide you better.

    Secondly, the dropdown Mega Menu is appearing and working as we have confirmed this concern.

    Best Regards

    #430692

    k9casual.com
    Participant

    Hi ,
    Thanks for the quick support; my point is that this atum plugin one more product type in addition to default product types; which is “simple raw product and variable raw product”. It may be reason that swatches are available only for default products types.

    So my concern is that can we add this new product type in code of woodmart swatches function; if this happens then swatches will be also visible for raw product types.

    I fixed the same type of error for saving display in a single product page, pls check below custom code:-

    add_action( ‘woocommerce_single_product_summary’, ‘cssigniter_woocommerce_get_product_sale_savings’, 11 );
    /**
    * Returns a textual string with the amount saved for on-sale products.
    *
    * Compound products, such as grouped and variable products, may have multiple different savings amounts due to
    * on-sale children products or variations. In these cases, both ‘min’ and ‘max’ values are set, although may be the same.
    *
    * @return string
    */
    function cssigniter_woocommerce_get_product_sale_savings() {
    global $product;

    if ( ! $product->is_on_sale() ) {
    return;
    }

    $savings = array(
    ‘min’ => false,
    ‘max’ => false,
    );

    $savings_html = ”;

    switch ( $product->get_type() ) {
    case ‘grouped’:
    $children = array_filter( array_map( ‘wc_get_product’, $product->get_children() ), ‘wc_products_array_filter_visible_grouped’ );

    foreach ( $children as $child ) {
    if ( $child->is_purchasable() && ! $child->is_type( ‘grouped’ ) && $child->is_on_sale() ) {
    $child_regular_price = (float) wc_get_price_to_display( $child, array( ‘price’ => $child->get_regular_price() ) );
    $child_active_price = (float) wc_get_price_to_display( $child, array( ‘price’ => $child->get_sale_price() ) );
    $child_savings = $child_regular_price – $child_active_price;

    $savings[‘min’] = false !== $savings[‘min’] ? $savings[‘min’] : $child_savings;
    $savings[‘max’] = false !== $savings[‘max’] ? $savings[‘max’] : $child_savings;

    if ( $child_savings < $savings[‘min’] ) {
    $savings[‘min’] = $child_savings;
    }

    if ( $child_savings > $savings[‘max’] ) {
    $savings[‘max’] = $child_savings;
    }
    }
    }

    break;

    case ‘variable’:
    $prices = $product->get_variation_prices();

    foreach ( $prices[‘price’] as $variation_id => $price ) {
    $regular_price = (float) $prices[‘regular_price’][ $variation_id ];
    $sale_price = (float) $prices[‘sale_price’][ $variation_id ];

    if ( $sale_price < $regular_price ) {
    $variation_savings = $regular_price – $sale_price;

    $savings[‘min’] = false !== $savings[‘min’] ? $savings[‘min’] : $variation_savings;
    $savings[‘max’] = false !== $savings[‘max’] ? $savings[‘max’] : $variation_savings;

    if ( $variation_savings < $savings[‘min’] ) {
    $savings[‘min’] = $variation_savings;
    }

    if ( $variation_savings > $savings[‘max’] ) {
    $savings[‘max’] = $variation_savings;
    }
    }
    }

    break;

    case ‘variable-raw-material’:
    $prices = $product->get_variation_prices();

    foreach ( $prices[‘price’] as $variation_id => $price ) {
    $regular_price = (float) $prices[‘regular_price’][ $variation_id ];
    $sale_price = (float) $prices[‘sale_price’][ $variation_id ];

    if ( $sale_price < $regular_price ) {
    $variation_savings = $regular_price – $sale_price;

    $savings[‘min’] = false !== $savings[‘min’] ? $savings[‘min’] : $variation_savings;
    $savings[‘max’] = false !== $savings[‘max’] ? $savings[‘max’] : $variation_savings;

    if ( $variation_savings < $savings[‘min’] ) {
    $savings[‘min’] = $variation_savings;
    }

    if ( $variation_savings > $savings[‘max’] ) {
    $savings[‘max’] = $variation_savings;
    }
    }
    }

    break;

    case ‘external’:
    case ‘variation’:
    case ‘simple’:
    case ‘variable-raw-material’:
    default:
    $regular_price = (float) $product->get_regular_price();
    $sale_price = (float) $product->get_sale_price();

    if ( $sale_price < $regular_price ) {
    $savings[‘max’] = $regular_price – $sale_price;
    }
    }

    if ( ! empty( $savings[‘min’] ) ) {
    $savings_html = ‘<p class=”woocommerce-message”>’ . __( ‘Save ‘, ‘your-text-domain’ ) . ‘ up to ‘ . wc_price( $savings[‘max’] ) . ‘ ‘ . __( ‘per item.’, ‘your-text-domain’ ) . ‘</p>’;
    } else {
    $savings_html = ‘<p class=”woocommerce-message”>’ . __( ‘You save ‘, ‘your-text-domain’ ) . wc_price( $savings[‘max’] ) . ‘</p>’;
    }

    echo wp_kses_post( $savings_html );
    /*$savings_html = ‘<p class=”woocommerce-message”>’ . __( ‘Save from ‘, ‘your-text-domain’ ) . wc_price( $savings[‘min’] ) . ‘ up to ‘ . wc_price( $savings[‘max’] ) . ‘ ‘ . __( ‘per item.’, ‘your-text-domain’ ) . ‘</p>’;*/
    }

    regards

    #430888

    Hello,

    Sorry to say but unfortunately we can’t help you out with this question because such Customizations are out of our Theme Support policy scope. Hope you can understand our limitations in this regard.

    Best Regards

    #430903

    k9casual.com
    Participant

    Hi,
    I can understand your limitations but this is related to Woodmart theme only; I only sent those codes to show u how I fixed the same type of error; If u could tell me in the theme where I can declare this new product type to display the variation swatch; then also it will be very useful for me.

    Regards

    #430985

    Artem Temos
    Keymaster

    Hello,

    But we don’t know how this code is supposed to work so we can’t say where you should place it. You can send us a screenshot of a specific place in our theme and we will give you the location of the file that contains its code.

    Kind Regards

    #431033

    k9casual.com
    Participant

    Hi Sir,
    Sorry, sir, it seems that there is some misunderstanding in what u r getting and what I am trying to tell. Let me explain it:

    the code snippet I msged u earlier was only for an example; I have already placed that code in function.php and I is working well; (u can still get this in function file -child theme)

    when I placed codes from the attachment named ” code I received from web” in the function file then I was getting results like image 1, i.e. savings for raw product type were not being calculated and zero savings was being displayed. after investigation, I found that I need to define “raw-product-type” so I customized the code snippet in “code where I defined raw product type.txt” and placed in the function file, now my issue was solved and I got the desirous result like “image 2”.

    Now like above, I was wondering if u can tell me how can I define raw product type in woodmart theme; so that it will also display variable swatches for “raw product type” also.

    Hope everything confusion is fixed;

    Warm Regards

    Attachments:
    You must be logged in to view attached files.
    #431229

    k9casual.com
    Participant

    Hi,
    I hope my problem and this thread is still live as I haven’t heard anything from you guys since a long time.

    Regards

    #431282

    Artem Temos
    Keymaster

    Hello,

    Yes, we understand you but still can’t help you with this because it requires additional code customizations. We don’t have a working code to define raw product type in the WoodMart theme.

    Such customizations are out of theme support scope according to the Envato support policy that you can read here https://themeforest.net/page/item_support_policy

    Kind Regards

    #431350

    k9casual.com
    Participant

    Thanks for support till now

    regards

    #431437

    Artem Temos
    Keymaster

    Thank you for understanding. Feel free to contact us if you have any further questions.

    Kind Regards

Viewing 15 posts - 1 through 15 (of 15 total)

The topic ‘Variation Swatches is not visible on Variable Raw Products’ is closed to new replies.