product sizes

  • Unknown's avatar

    I am having a heck of a time finding how to change the packaging size next to price in my WordPress products page. I have recently taken this site back from my previous designer and have no idea where to change this value.

    When I create a new product it defaults to displaying the product like this: $Price / 2 lb bag. I set the price in the Product/General tab, but cannot find where to change the package size. For the past year, I have only had one product, which was fine displaying 2 lb bag. Now I am expanding into different package sizes and need to modify it. I have tried everything, duplicating a product and just modifying it. Starting from scratch and manual inputing everything. No matter what, when I publish and dsiplay the page, it says 2 lb bag. If someone can help me out with finding where to change that value I would be very appreciative.

    My site, in case you need to see what I am referring to is here: https://inlandempireraw.com/product/performance-dog/

  • Unknown's avatar

    In an effort to continue looking for a solution to this issue, I am thinking that it may have been hard coded into the CSS or PHP somewhere. Can anyone tell me which file I should be looking at?

  • Unknown's avatar

    so, it’s very depressing to know that immediate help cannot be found on wordpress.com. not only has nobody offered suggestions, but absolutely nobody has offered a single word.

    I have; however, found the solution after hours of sifting through crap on my site. The solution was found in the functions.php file. Apparently, my previous designer had hardcoded the / 2 lb bag into this file. I found the culprit on line 62 as follows:

    `}

    // =================== suffix on pricing =====================================

    add_filter( ‘woocommerce_get_price_html’, ‘bbloomer_price_prefix_suffix’, 100, 2 );

    function bbloomer_price_prefix_suffix( $price, $product ){
    $price = $price . ‘ / 2 lb bag’;
    return apply_filters( ‘woocommerce_get_price’, $price );
    }’

    for those of you looking to accomplish something similar… the CORRECT way to do this would be to call a variable named $packaging (or something similar) so that it could be inserted into the product template as well as displayed in the live site. What I have found is sloppy and lazy. Don’t be sloppy and lazy.

  • Unknown's avatar

    Hi there,

    I’m sorry you weren’t able to get the help you needed right away, but I’m glad you were able to resolve the issue.

    If you’d like a more immediate response in the future, I’d suggest trying out Live Chat:
    https://en.support.wordpress.com/live-chat

    Cheers!

  • Unknown's avatar

    Thank you for this.. I did not know that there was a chat section!!

  • The topic ‘product sizes’ is closed to new replies.