Jump to content

surpress zero prices


peterp

Recommended Posts

Hi all,

        I have products in the inventory that will have different prices based on the customers selection for example colour, size etc, so I do not have a starting price for the products, so what I would like to do is surpress the display of zero price on the item on all screens as this looks like the product is free. Hope somebody can point me in the right direction to be able to make this change. I think it will be just a case of remarking the line that prints the price.

Link to comment
Share on other sites

That would be half the solution. The other half is to make the options show the actual price rather than the differential. (Note: the Price column in the product's Options tab, Product Options table is a price differential - not an actual price.)

 

Of course, the differential could be the final price, but then a combination of options would probably add up wrong.

 

As of CC521, there is no price column in the Options Matrix table - would be nice if there was such a thing.

 

I have seen store owners word the price area to say: Starting at: $23.99 (plus options)

Link to comment
Share on other sites

Hi bsmither,

                 Unfortunately the prices that are being used in the options tab for each product has only 1 price depending on its capablities, that is to say that the product can only be yellow in colour if its size is small, extra small, extra extra small and therefore the price is the same for all these sizes, so the price is not a differational type. its the final price. Therefore the price of the product in the product screen will always be 0.00 and it is only when the product is selected that it will have a price in the cart. What we need to happen is that the prices are not displayed until all of the selections have been made, the option size is the controlling factor. I hope this explains it better, is there any way that I can just stop it displaying the price in the previous screens before the selections are made irrespective of whether there is a price in the pricing tab for the product and just make the size option the controlling pricing factor. 

Link to comment
Share on other sites

It seems like you can make just one of the options (size?) a differential price equal to the final price. That is:

Widget: $0.00

Option Small: +$14.99

Option Green: N/A

Option "Happy Birthday!": N/A

 

Widget: $0.00

Option Large: +$17.99

Option Blue: N/A

Option "The Champ!": N/A

 

The above two widgets would have the appearance of the final price at $14.99 and $17.99 based on the one option that has price differentials.

 

We will edit the skin files to not show the base price or the phrase Price:, and also to remove the + or - seen before the option selected's price differential. That would give the appearance of the option showing the product's final price.

Link to comment
Share on other sites

In these files: content.homepage.php, content.category.php, content.product.php

 

Find the series of statements that look like:

{if $PRODUCT.ctrl_sale}
<h1><span class="price_previous">{$PRODUCT.price}</span> <span class="price_sale">{$PRODUCT.sale_price}</span></h1>
{else}
<h1>{$PRODUCT.price}</h1>
{/if}

We are going to wrap it all up as a Smarty comment.

{* {if $PRODUCT.ctrl_sale}
<h1><span class="price_previous">{$PRODUCT.price}</span> <span class="price_sale">{$PRODUCT.sale_price}</span></h1>
{else}
<h1>{$PRODUCT.price}</h1>
{/if} *}

Be sure to clear the cache.

Link to comment
Share on other sites

In content.product.php, find:

<label for="option_{$option.option_id}" class="return">{$option.option_name}{if $option.price} ({$option.symbol}{$option.price}){/if}{if $option.required} *{/if}</label>

Change the ({$option.symbol}{$option.price}) to {$option.price}

Link to comment
Share on other sites

Actually, now that I think about it, only the option that predominately determines the product's final price needs to be required, and any other options can be optional and show an actual price differential. So,

Small: $17.99 (required)

Green: N/A

Sparkly: +$2.00 (optional)

 

That would still work. (Would need some more edits to the HTML.)

Link to comment
Share on other sites

hi bsmither,

actually according to my client the only possible change will be the colour, whether the colour will cause a price differation its not clear at this stage but will be possible will I need to do all the previous changes as well as the html changes and where will I do the html changes.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...