logo
down
shadow

How can I hide the price of a product in Bigcartel?


How can I hide the price of a product in Bigcartel?

By : S10xtremenlow
Date : November 17 2020, 11:58 AM
With these it helps Instead of having a ton of conditional statements to check against product names, you may just want to have your portfolio products added to a "Portfolio" category and only hide the price for products in that category.
Add this to the top of Customize Design > Advanced > Product:
code :
{% for category in product.categories %}
  {% if category.name == 'Portfolio' %}
    {% assign hide_price = 1 %}
  {% endif %}
{% endfor %}
{% if hide_price != 1 %}<h3>{{ product.default_price | money_with_sign }}</h3>{% endif %}


Share : facebook icon twitter icon
Magento: Display custom product price in product listing, view page and also set same price after adding product to cart

Magento: Display custom product price in product listing, view page and also set same price after adding product to cart


By : user2278085
Date : March 29 2020, 07:55 AM
This might help you I need to display custom price for each product where the admin will set different price for each product. and this product price only should be displayed in product listing and product view page, without changing the product actual price. And also the same price should apply to the cart. I tried with catalog_product_get_final_price observer, but It shows the price as special price but it will not change the display of product price. Please give me an idea, how can I do this? in advance:)
code :
on list page and view page just check whether your custom price is null nor not if it is null show original price and if it not null show custom price.

create a event in config file **checkout_cart_product_add_after** as given below

<events>
    <checkout_cart_product_add_after>
          <observers>
                <unique_event_name>
                  <class>modulename/observer</class>
                  <method>modifyPrice</method>
                  </unique_event_name>
            </observers>
      </checkout_cart_product_add_after>
</events>


create new file **Observer.php**


    class namespace_modulename_Model_Observer

      {

          public function modifyPrice(Varien_Event_Observer $obs)
             {
                 // Get the quote item

                 $item = $obs->getQuoteItem();

                 // Ensure we have the parent item, if it has one

                 $item = ( $item->getParentItem() ? $item->getParentItem() : $item );

                 // Load the custom price

                 $price = $this->_getPriceByItem($item);

                 // Set the custom price

                 $item->setCustomPrice($price);

                 $item->setOriginalCustomPrice($price);

                 // Enable super mode on the product.

                 $item->getProduct()->setIsSuperMode(true);

             }


             protected function _getPriceByItem(Mage_Sales_Model_Quote_Item $item)
             {
                 $price;

                 //use $item to determine your custom price.

                 return $price;
             }
                }
Can we hide the woocommerce product with price 0 or no price?

Can we hide the woocommerce product with price 0 or no price?


By : jcyovera
Date : March 29 2020, 07:55 AM
I hope this helps . Everyone: I wanted to ask, if there is a way (custom coding or plugin) to hide the product which have no price or the price is 0?
code :
//Put this code in functions.php file

add_action( 'woocommerce_product_query', 'themelocation_product_query' );
function themelocation_product_query( $q ){
$meta_query = $q->get( 'meta_query' );
    $meta_query[] = array(
                'key'       => '_price',
                'value'     => 0,
                'compare'   => '>'
            );
$q->set( 'meta_query', $meta_query );
}
Hide striked(and then discounted) Price in woocommerce single product variation product

Hide striked(and then discounted) Price in woocommerce single product variation product


By : user3292434
Date : March 29 2020, 07:55 AM
Any of those help I am failing to get the correct hook to get rid of this kind of prices → , Try below code snippet.
code :
add_filter('woocommerce_get_price_html', "wt_hide_regular_price", 99, 2);

function wt_hide_regular_price($price, $product)
{
    if(!is_cart() && !is_checkout() && !is_ajax()){
        if ($product->is_type('simple') || $product->is_type('variation')) {
            return wt_regular_price_for_product($price, $product);
        } 
    }
        return $price;            

}

function wt_regular_price_for_product($price, $product){
    return wc_price($product->get_price());
}
Hide price of specific product in PrestaShop product display page

Hide price of specific product in PrestaShop product display page


By : Phanakran Promsalee
Date : March 29 2020, 07:55 AM
I hope this helps . The easiest way to get an admin panel for your module is to create an AdminController for your module and use the basic form helper use by prestashop. Here is how to do it :
Hide product price and disable add to cart for specific product categories in Woocommerce

Hide product price and disable add to cart for specific product categories in Woocommerce


By : MaDn
Date : October 13 2020, 08:00 AM
it helps some times Your existing code is complicated, uncompleted and not really convenient. Try the following instead that will work for single product pages and archives pages too (as shop page).
It handles any kind of product, including variable products and their variations.
code :
// Custom conditional function that check for specific product categories
function check_for_defined_product_categories( $product_id ) {
    // HERE your Product Categories where the product price need to be hidden.
    $targeted_terms = array( '27419','27421' ); // Can be term names, slugs or Ids

    return has_term( $targeted_terms, 'product_cat', $product_id );
}

// Custom function that replace the price by a text
function product_price_replacement(){
    return '<span style="color:red; font-size:12px;">' . sprintf( __( "Call our office %s for prices."), '<strong>516.695.3110</strong>' ) . '</span>';
}

// Replace price by a text (conditionally)
add_filter( 'woocommerce_get_price_html', 'filter_get_price_html_callback', 10, 2 );
function filter_get_price_html_callback( $price, $product ){
    if( check_for_defined_product_categories( $product->get_id() ) ) {
        $price = product_price_replacement();
    }
    return $price;

}

// Hide prices and availiability on product variations (conditionally)
add_filter( 'woocommerce_available_variation', 'filter_available_variation_callback', 10, 3 ); // for Variations
function filter_available_variation_callback( $args, $product, $variation ) {
    if( check_for_defined_product_categories( $product->get_id() ) ) {
        $args['price_html'] = '';
        $args['availability_html'] = '';
    }
    return $args;
}

// Disable add to cart button (conditionally)
add_filter( 'woocommerce_variation_is_purchasable', 'woocommerce_is_purchasable_filter_callback', 10, 2 );
add_filter('woocommerce_is_purchasable', 'woocommerce_is_purchasable_filter_callback', 10, 2 );
function woocommerce_is_purchasable_filter_callback( $purchasable, $product ) {
    $product_id = $product->get_parent_id() > 0 ? $product->get_parent_id() : $product->get_id();

    if( check_for_defined_product_categories( $product_id ) ) {
        $purchasable = false;
    }
    return $purchasable;
}
Related Posts Related Posts :
  • How to put div over another
  • How to use glyphicons in bootstrap 3.0
  • Wordpress page links not working
  • How Do I Use CSS to Set the Color of An ALink?
  • Webpage doesn't scroll smoothly on screen
  • YouTube iframe, browser looks for file locally
  • html displaying inline image
  • Font acting differently on IE and Firefox
  • Encoding and decoding of the character references
  • An Image Button navigate to another site html/css
  • IE8 "Save Target as ..." won't display for block elements
  • Image hover transition for span - CSS
  • How to apply min and max on textarea?
  • How to draw multiple horizontal lines (Notebook Paper effect) using css?
  • Table Printing Issue: Gaps in top and Bottom Border of th Elements
  • grouping elements with div and applying stylesheet for that group
  • Click <div> to expand, then click again to shrink - Its expanding, just not shrinking
  • CSS - How can I center a <script>'s output?
  • Django's template variable gets interpreted as HTML
  • ngx datatable vertical scroll with rowheight set to auto
  • How to make input text border with CSS when it's OnFocus
  • Anyone know of a calendar web widget for my website I could use?
  • How does Bootstrap manage to use fixed positioning for navbar on iOS?
  • Centered text in fully clickable table cell
  • Compare HTML and HTML5
  • steps of creating webpage in bangla
  • css root element margin
  • What is the point of using absolute positioning in CSS?
  • Responsive solution for long URLs (that exceed the device width)
  • Divs don't collapse as they should - media queries
  • QTreeWidgetItem display html
  • Testing html/css image on local from jfiddle
  • long attribute value of HTML
  • Why my svg picture is truncated at the bottom when embedded in html
  • Display CSS: some divs fixed, some flexible (2)
  • How to append href strings with variables in html with PHP?
  • css - Why is there a big white space between text lines?
  • div image position fixed + scroll
  • Hide specific elements from html using css
  • how to align the arrow in menu item?
  • How do I create a trapezoidal button using CSS?
  • Background position seems to be inaccurate
  • CSS background color is overruled by the background image
  • Oblique or twisted border shape
  • Overflow in div tag doesn't work
  • How to show the vertical image into horizontal manner using HTML and CSS?
  • css3 animation issue move div to left and move it back
  • HTML <code> - get rid of newlines
  • Vertical Align Two Spans (Different font size)
  • Position fixed not working with video poster
  • Having issues placing html buttons side by side in a form
  • how to center text in the middle of the page
  • Sublime Autocompletion for HTML using Emmet inside .sublime-autocompletion file
  • Align bottom wrapped text at the left of an image
  • I'm trying to get :after:hover to work
  • Header and Picture won't Display Correctly
  • SVG stacking, anchor elements, and HTTP fetching
  • Positioning two elements on opposite ends of a 100% with header
  • How to overlay an image inside an image with HTML, CSS
  • Selected date isn't kept in select box
  • shadow
    Privacy Policy - Terms - Contact Us © ourworld-yourmove.org