Home Forums WoodMart support forum Code to format product variation dropdown

Code to format product variation dropdown

Viewing 24 posts - 1 through 24 (of 24 total)
  • Author
    Posts
  • #602318

    churchworks
    Participant

    Hello, I’m trying out a plugin from Iconic called Woocommerce Linked Variations which creates a path to link single products together as if they were variations. Iconic promises “theme compatibility.” The plugin does seem to work well. However, the default formatting offered by the Woodmart theme is pretty bad. I’ve attached some screenshots. I’ve also added info to view the element live on our staging site.

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

    Hello,

    Add below Custom CSS code to Theme Settings > Custom CSS > Global custom CSS:

    td.iconic-wlv-variations__label, td.iconic-wlv-variations__value {
        border-bottom: none !important;
    }
    .iconic-wlv-terms {
        margin: -20px 0 -10px;
        padding: 12px;
        width: 200px;
    }

    But you can use the linked variation feature without a plugin. This feature is available in the theme.
    Please follow this guide:
    https://xtemos.com/docs-topic/linked-variations/

    Best Regards

    #602614

    churchworks
    Participant

    Thank you, this looks much better! The format is unfortunately shown twice (see attached screenshot)—next to the “Format:” label and again in the dropdown menu (see attached screenshot). Is it possible to move the dropdown picker up next to the “Format:” label?

    I did try the theme’s built-in Linked Variations, but I don’t particularly like the formatting options. If Woodmart also had the option to display linked variations as a dropdown menu, I would certainly consider that.

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

    Hello,

    Add the below Custom CSS code to Theme Settings > Custom CSS > Global Custom CSS.

    span.iconic-wlv-variations__selection {
        display: none;
    }
    td.iconic-wlv-variations__label, td.iconic-wlv-variations__value {
        display: inline-block;
    }

    Best Regards

    #606884

    churchworks
    Participant

    Thank you! So far the code works great for simple products. When I added a variable product to the dropdown list, the formatting broke (see attached screenshot). Is there an adjustment to the code that would keep the “Format” dropdown inline for variable products as well?

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

    Hello,

    Can you please share the product page URL so I will check and give you a possible solution?

    Best Regards

    #607112

    churchworks
    Participant

    Yes, I’m trying this out on our staging site. URL and credentials shared privately below.

    #607297

    Hello,

    Add the below Custom CSS code to Theme Settings > Custom CSS > Global Custom CSS.

    .variations td.iconic-wlv-variations__label, td.iconic-wlv-variations__value {
        display: inline !important;
    }
    
    table.variations {
        margin-bottom: 20px !important;
    }

    Best Regards

    #607481

    churchworks
    Participant

    We’re so close! Just one more adjustment needed to remove the duplicate format label (see attached). Thanks!

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

    churchworks
    Participant

    Another oddity on the variable product—there is extra space between “Format” and “:” (see attached screenshot).

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

    churchworks
    Participant

    I’ve been adjusting the CSS to get the Iconic dropdown menu looking just how I want. But I’m utterly baffled at why it behaves differently for Variable products. The only thing I can think of is that if Iconic built the plugin specifically for Simple products, there may be something in the plugin code preventing the plugin from displaying properly on Variable products.

    If you guys can find a solution (or perhaps a way to separate the CSS that’s applied to Simple vs. Variable products), that would be exciting! But if the solution goes beyond the scope of theme support, I’d understand.

    Here is my modified CSS…which looks great on the Simple products I’m testing:

    td.iconic-wlv-variations__label, td.iconic-wlv-variations__value {
        border-bottom: none !important;
        display: inline block;
        margin-left: -12px;
        color: #282A2D;
    }
    span.iconic-wlv-variations__colon {
        padding-left: 2px;
        font-weight: bold;
    }
    .iconic-wlv-terms {
        margin: -20px -10px -15px;
        padding: 12px;
        width: 120px;
    }
    
    span.iconic-wlv-variations__selection {
        display: none;
    }
    
    .variations td.iconic-wlv-variations__label, td.iconic-wlv-variations__value {
        display: inline !important;
        color: #282A2D !important;
    }
    .variations td.iconic-wlv-variations__selection {
        display: none;
    }
    table.variations {
        margin-top: 30px;
        margin-bottom: 30px !important;
    }
    #607536

    Hello,

    Add below Custom CSS code to Theme Settings > Custom CSS > Global custom CSS:

    table.variations .label span {
        display: none;
    }
     table.variations {
    margin-top: 10px !important;
    }

    Best Regards

    #608857

    churchworks
    Participant

    Hello, thank you for the code. It helped me reach a passable level of formatting for the plugin.

    At last, I am trying to add space below (and above) the Iconic plugin dropdown, but only for simple products. I can’t seem to figure out the CSS to do so (see screenshot). Any ideas would be appreciated. Thanks!

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

    Hello,

    Can you please share the product page URL so I will check and give you a possible solution?

    Best Regards

    #609027

    churchworks
    Participant

    Yes, please see url and login credentials in private content.

    #609078

    Hello,

    Add the below Custom CSS code to Theme Settings > Custom CSS > Global Custom CSS.

    .single-product .product-type-simple .variations {
        margin-top: 40px !important;
        margin-bottom: 40px !important;
    }

    Best Regards

    #609368

    churchworks
    Participant

    Thank you again for the code. This did the trick! I’m happy with how it looks.

    In case anyone else goes looking for this, here is the CSS I used to format the Iconic Linked Variations dropdown within the Woodmart theme—particularly getting it to match the theme’s product variations dropdown:

    td.iconic-wlv-variations__label, td.iconic-wlv-variations__value {
        border-bottom: none !important;
        display: inline !important;
        margin-left: -12px;
        color: #282A2D;
    }
    .iconic-wlv-terms {
        margin: -20px -5px -15px;
        padding: 12px;
        width: 140px;
        color: #5d5d5d
    }
    .variations td.iconic-wlv-variations__label, td.iconic-wlv-variations__value {
        color: #282A2D !important;
    }
    table.variations .label span {
        display: none;
    }
    table.variations {
        margin-top: 28px !important;
    }
    .single-product .product-type-simple .variations {
        margin-top: 35px !important;
        margin-bottom: 35px !important;
    }

    Note: This bit of necessary code (from above) removes the colon (:) from the dropdown label (product attribute), which looks odd, so I just added a colon to the attribute name (not ideal, but it works):

    table.variations .label span {
        display: none;
    }
    #609381

    Hello,

    Great, we are glad that you sorted it out. Feel free to contact us if you have any further questions.

    Best Regards

    #610908

    churchworks
    Participant

    Well, I’m back. This time, I need to adjust space around the dropdown for External/Affiliate products. (screenshot attached; product link in private content) Thanks!

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

    Hello,

    Add the below Custom CSS code to Theme Settings > Custom CSS > Global Custom CSS.

    .single-product form.cart{
        margin-top: 50px !important;
    }

    Best Regards

    #611981

    churchworks
    Participant

    Hi, that bit of code was not the solution I need, but I figured it out (using .product-type-external)!

    HOWEVER, I have another request: when one or more products are External/Affiliate products, they show up in the linked variations dropdown as “Unavailable” (see attached screenshot). Is there a way to hide the “Available/Unavailable” product labels in this dropdown?

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

    Hello,

    Sorry, but there is no option available for that in Theme Settings.

    It requires customizations and this is beyond our limitations and support policy.

    Best Regards

    #612144

    churchworks
    Participant

    No problem. Thanks for all the help!

    #612167

    Most Welcome!!!.

    I’m so happy to hear you are pleased with the Theme and Support. XTEMOS strives to deliver the best customer experience, and it makes our day to hear we have accomplished that.

    We count ourselves lucky to have you as a customer. You can always reach us at any time. We are always here to help you.

    Thanks for contacting us.
    Have a great day.

    Topic Closed.
    Best Regards.

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

The topic ‘Code to format product variation dropdown’ is closed to new replies.