Woocommerce Attributes Pulling data in alpahabetic order

This topic has 11 replies, 3 voices, and was last updated 8 years, 11 months ago ago by Eva Kemp

  • Avatar: jagadeesh
    jagadeesh
    Participant
    May 5, 2015 at 12:19

    My Problem is trying to pull the size attributes for the different products. So, for that i used this php code

    
    <?php 
            $terms = get_terms('pa_size');
            foreach ( $terms as $term ) {
            echo "<li>" .$term->name. "</li>";
             }
     ?>

    The size attributes displaying for the above code should be in alphabetic order such as like L, M , S , XS instead of XS, S, L, M, XL, XXL. Help me out from these.

    10 Answers
    Avatar: Eva
    Eva Kemp
    Support staff
    May 5, 2015 at 12:57

    Hello,

    Please provide us with wp-admin panel credentials in private content.
    Where did you add that code?
    Also show us a product page where the attributes are added.

    Thank you.
    Regards,
    Eva Kemp.

    Avatar: jagadeesh
    jagadeesh
    Participant
    May 5, 2015 at 13:07

    Hello,

    Here you can find the details pls find the attached image. i add the code in themes/mavango-one/woocommerce/content-product.php

    <?php
    $sizes = get_the_terms( $product->id, ‘pa_size’);
    foreach ( $sizes as $size ) {
    echo $size->name. ”   “;
    }
    ?>
    http://www.awesomescreenshot.com/image/181395/bc8c04c02a2a9dac79eaf7d173c31ec3 in product page
    this is the line i added exactly. but the front end its displayed in alphabetic order.

    thanks in advance

    Please, contact administrator
    for this information.
    Avatar: Eva
    Eva Kemp
    Support staff
    May 5, 2015 at 14:14

    Hello,

    I’ve dragged attributes in alphabetical order http://storage4.static.itmages.com/i/15/0505/h_1430831557_6000509_965491a642.png
    Please check the product “Checkered Casual Shirt” and clear browser cache before.
    Now size attributes are ordered alphabetically for this product.

    Thank you.
    Regards,
    Eva Kemp.

    Avatar: Brian Johnson
    Brian Johnson
    Member
    May 5, 2015 at 14:24

    Hello

    Please navigate Products -> Attributes change the Default sort order to “Custom Ordering”. Go back to the Attributes page & click on “Configure items” for Size attribute. Then go to the table of values. You will be able to drag and drop the items in any order.

    With best regards
    Brian Johnson

    Avatar: jagadeesh
    jagadeesh
    Participant
    May 6, 2015 at 07:38

    Hello i want to display like this XS, S, M , L, XL, XXL as per shirt sizes.

    But its displaying L,M,S,XS.

    Avatar: jagadeesh
    jagadeesh
    Participant
    May 6, 2015 at 12:00

    1. Some breadcrumbs on top are not active and clickable. see the attached url and i need to keep active and clickable they can go from there.

    http://www.awesomescreenshot.com/image/186567/79d35bf8c20861b1d31676d79d95f66c

    2. Instead of keeping return to previous page link i just want to add their next product link, is it possible to do if yes how?

    Avatar: Eva
    Eva Kemp
    Support staff
    May 6, 2015 at 12:29

    Hello,

    I’ve dragged size attributes in order you wished. Please clear browser cache and check if it’s fine now.
    1. The reason is your side gallery on single product pages.
    Try to use this code in custom.css file:

    .thumbnails {
        margin-top: -80px !important;
    }

    2. Unfortunately there is no such option. Sorry.

    Regards,
    Eva Kemp.

    Avatar: jagadeesh
    jagadeesh
    Participant
    May 6, 2015 at 12:56

    How to rename the reviews tab title in the products page of woo commerce. I changed the additional information tab using woocommerce customizer.

    So where should i change the reviews tab titile can u provide the file path

    thanks in advance

    Avatar: jagadeesh
    jagadeesh
    Participant
    May 6, 2015 at 12:57

    1. Some breadcrumbs on top are not active and clickable. see the attached url and i need to keep active and clickable they can go from there.

    Avatar: Eva
    Eva Kemp
    Support staff
    May 6, 2015 at 15:21

    Hello,

    To rename tabs refer to Woocommerce documentation:
    http://docs.woothemes.com/document/editing-product-data-tabs/ (add code to functions.php file).
    As I told you in the previous post:

    The reason is your side gallery on single product pages.
    Try to use this code in custom.css file:

    .thumbnails {
        margin-top: -80px !important;
    }

    Or revert back standard thumbnails under main image instead of vertical gallery.

    Regards,
    Eva Kemp.

  • Viewing 11 results - 1 through 11 (of 11 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.