UPD. I resolved the issue with removing zero prices, using donation code. Just inserted a needed code into donation block. Now, when activate- it shows Price Request.
Now there is the only question with the sliders: help me to hide zero prices in the bestseller and also bought sliders 🙂
How to remove zero price? - by Petuhoff - on WordPress WooCommerce support
Solved8 replies2 participantsUpdated by Jack Richardson
-
8 Answers
#72137 Copied Theme version: 3.0Hello,
You can refer to this article http://emc2innovation.com/removing-zero-prices-from-wp-ecommerce/ for the solution. Please try the code mentioned there.
Best regards,
Jack Richardson.#72156 CopiedAs I wrote before, I solved the issue with single product and grid view, this article is about this.
The only problem to solve is to remove zero prices from the sliders. Exactly from products.php from “code” folder. That’s the question! 🙂 And as it’s your code, I’m waiting for advice 🙂#72173 Copied Theme version: 3.0Hello,
I’ve replaced the code in wp-content/themes/blanco/wpsc-products_page.php in line 176:
<p class="pricedisplay product_<?php echo wpsc_the_product_id(); ?>"><span id='product_price_<?php echo wpsc_the_product_id(); ?>' class="<?php if(wpsc_product_on_special()) echo 'currentprice'; ?> pricedisplay"><?php echo wpsc_the_product_price(); ?></span></p>
with
<?php if (wpsc_the_product_price() !== "0.00 Руб") : ?><p class="pricedisplay product_<?php echo wpsc_the_product_id(); ?>"><span id='product_price_<?php echo wpsc_the_product_id(); ?>' class="<?php if(wpsc_product_on_special()) echo 'currentprice'; ?> pricedisplay"><?php echo wpsc_the_product_price(); ?></span></p><?php endif; ?>Also the code has been replaced in the file wp-content/themes/blanco/code/products.php in lines 431 and 435:
echo '<p class="pricedisplay"><span class="currentprice pricedisplay">'.$post_price.'</span></p>';
with
if (wpsc_the_product_price() !== '0.00 Руб'): echo '<p class="pricedisplay"><span class="currentprice pricedisplay">'.$post_price.'</span></p>';endif;
and
echo '<span>'.$post_price.'</span>';
with
if (wpsc_the_product_price() !== '0.00 Руб'): echo '<span>'.$post_price.'</span>';endif;Please check your site now.
Best regards,
Jack Richardson.#72261 CopiedGood day! I’ve checked it and it works fine. Thank you so much!
There is one another carousel “Related products”, which is still with zeroes. It’s in the wpsc-single_product.php. Hope, it’s the last.#72321 Copied Theme version: 3.0Hello,
The following code has been replaced in the wp-content/themes/blanco/wpsc-single_product.php file in line 433:
<span><?php echo $product['price'] ?></span>
with
<?php if ($product['price'] !== "<span class='pricedisplay'>0.00 Руб</span>"): ?> <span><?php echo $product['price'] ?></span> <?php endif; ?>Please check Related products carousel in single product pages.
Best regards,
Jack Richardson.#72461 CopiedHi! I’ve checked it. Everything works fine! I’ll recommend you to all!
#72482 Copied Theme version: 3.0Hello,
You are welcome! We are always glad to help you.
Best regards,
Jack Richardson.#72486 Copied -
The issue related to '‘How to remove zero price?’' has been successfully resolved, and the topic is now closed for further responses















