This topic has 9 replies, 2 voices, and was last updated 9 years, 4 months ago ago by Jack Richardson
Good day!
Everything works fine!
I just wanted to get some advice.
I wanna hide zero prices in the wpsc theme files: single product, grid view and sliders.
Some coders adviced me this <?php if (wpsc_the_product_price() == “0.00”) : ?>
Unfortunately, it doesnt work.
What can you advice me?
I understand, that it’s more e-commerce plugin question than yours, but they’re gone… And do not chat. I’ll be glad if you’ll advice me some solution. Thanks!
Your theme is great!
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 🙂
Hello,
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.
As 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 🙂
Hello,
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.
Good 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.
Hello,
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.
Hi! I’ve checked it. Everything works fine! I’ll recommend you to all!
Hello,
You are welcome! We are always glad to help you.
Best regards,
Jack Richardson.
The issue related to '‘How to remove zero price?’' has been successfully resolved, and the topic is now closed for further responses