Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Remove un-planned icons (WordPress)

  • This topic is empty.
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #190539
    misscosmic
    Participant

    http://www.lestentesdavalon.com/wp/product/tente-arthur/
    A web shop. To the right “à partir: ” which I wanted there and which I got there via a PHP snippet someone handed me.
    I hope to remember it was this:
    [code]
    // Price from

    // Use WC 2.0 variable price format
    add_filter( ‘woocommerce_variable_sale_price_html’, ‘wc_wc20_variation_price_format’, 10, 2 );
    add_filter( ‘woocommerce_variable_price_html’, ‘wc_wc20_variation_price_format’, 10, 2 );
    function wc_wc20_variation_price_format( $price, $product ) {
    $min_price = $product->get_variation_price( ‘min’, true );
    $price = sprintf( __( ‘From: %1$s’, ‘woocommerce’ ), wc_price( $min_price ) );
    return $price;
    }[/code]
    But now to the left in the menu is also “à partir:” but there it is not suppost to go. How to get rid, that is my question ..

    #190540
    Paulie_D
    Member

    If you mean the product list on the left side, I don’t think that’s the PHP which generates the list.

    The phrase a partir is hard coded after the link and before the price span. That being the case, it should (I think) show up in your PHP.

    #190595
    misscosmic
    Participant

    No it is not the list that is generated but the images next to the list are.
    It sounds (and is .. stupid) but I don’t know anymore where I put this snippet .. Could you advice me how I can find the file which contains “a partir:” .. ?

    #190597
    Paulie_D
    Member

    This is the structure of one of those list items which is in a ul with a class of product_list_widget.

    
    <li>
    <a href="http://www.lestentesdavalon.com/wp/product/tente-arthur/" title=" Arthur">
    
    <img width="157" height="157" src="http://www.lestentesdavalon.com/wp/wp-content/uploads/2014/10/artus-157x157.jpg" class="attachment-shop_thumbnail wp-post-image" alt="artus">
    
    Arthur  </a>
    
    a partir: /* see here */
    <span class="amount">1.700,00&nbsp;€</span>
    </li>
    

    So whatever PHP generates that list is also including the text.

    #190598
    misscosmic
    Participant

    luckaly I found the snippet now .. Would it be possible to generate “a partir” only before the price, with css .. ?

    #190602
    Paulie_D
    Member

    The price (span class="amount")is hidden with display:none at the moment. Is there a reason for that?

    #190604
    misscosmic
    Participant

    I gave this a try but it did not work ..

    #190605
    misscosmic
    Participant

    This is the snippet btw:
    [code]
    // Price from

    // Use WC 2.0 variable price format
    add_filter( ‘woocommerce_variable_sale_price_html’, ‘wc_wc20_variation_price_format’, 10, 2 );
    add_filter( ‘woocommerce_variable_price_html’, ‘wc_wc20_variation_price_format’, 10, 2 );
    function wc_wc20_variation_price_format( $price, $product ) {
    $min_price = $product->get_variation_price( ‘min’, true );
    $price = sprintf( __( ‘à partir: %1$s’, ‘woocommerce’ ), wc_price( $min_price ) );
    return $price;
    }
    [/code]

    #190606
    Paulie_D
    Member

    That doesn’t look like the whole PHP…I think (from my limited knowledge) you’re looking for the include statement.

Viewing 9 posts - 1 through 9 (of 9 total)
  • The forum ‘Back End’ is closed to new topics and replies.