Hide the price for the features valu = 0

  • Home
  • Topics
  • Hide the price for the features valu = 0
  • Support OnlineSat-Thu / 9:30am - 5:30pm (GMT +6)
  • Your Time Our Time

Support Home Support Home FoodBook Hide the price for the features valu = 0

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #10308
    Fyzex
    Blocked

    Hello,

    I did not provide the solution found on the other topic! Sorry ^^ ‘

    For those who wish to withdraw the value +0 (currency)
    Here is the code to add in the foodbook / view / template-modal-product-content.php line 230 to 258 plugins replace with the code below 🙂

                        <# _.each( item.group_feature, function( item, i ) {
                        var p = item.price,
                            dataPrice = p.replace(',', '.'),
                            formatType = 'en-IN';
    
                            if( foodbookobj.wc_decimal_separator == ',' ) {
                              formatType = 'de-DE';
                            }
                        var y = new Intl.NumberFormat(formatType).format(dataPrice);
                        var classCustom = dataPrice == 0 ? 'hidden' : '';
                        #>
                        <li>
                          <span class="fb_custom_checkbox extra_item_checkbox fb_w_100">
                            <label>
                          
                              <input
                                class="product-extra-options"
                                type="{{listType}}"
                                data-price="{{dataPrice}}"                          
                                data-formatted-price ="{{item.title}} : <?php echo foodbook_currency_symbol_position( "{{y}}", false ); ?>";
                                value="{{dataPrice}}"
                                name="{{inputName}}[]"
                              />
                              <span
                                class="fb_input_text fb_d_flex fb_align_items_center fb_justify_content_between fb_w_100"
                                >{{item.title}}
    
                                <span {{classCustom}} >+ <?php echo foodbook_currency_symbol_position( "{{y}}" , false ); ?></span>
                              </span>

    So it’s possible in 1 line of code …

    #10309
    Fyzex
    Blocked

    Now I will try to remove the “0 €” in the checkout part.

    I think you can add this to your future update 🙂

    #10318

    Dear Guillaume,

    Thanks for your suggestion.

    Best Regards,
    ThemeLooks Support Team

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Hide the price for the features valu = 0’ is closed to new replies.