Jump to content
Sign in to follow this  
swood

Can I display "from price"

Recommended Posts

Hi everyone,

I am fairly new to cubecart and so far I think it is brilliant and flexible!

The only task I am struggling with at the moment is displaying from price, e.g. "From £x.xx"

I am selling clothing and for the larger sizes and personalisation there is a small price increment, and I want to be upfront about it, so on the category and possibly initial product page load if the price was £10 but an extra £2 for additional feature, i want the price to read "from £10.00". The prices work currently on the product page updating when you select the product options.

Is this possible, i cannot find anything in the forums? Is there a price range in the product table i can access?

Thank you very much in advance for any help!

Sam

Share this post


Link to post
Share on other sites

Posted (edited)

This can be done, and it will probably involve edits to the key skin templates.

Keep in mind that the later versions of CubeCart allow for product options to increase the price or decrease the price by some difference, as well as establish a new fixed price as well.

So, should you ever find yourself adding an option that actually decreases the price, saying "From #.##" might be a bit strange, but still semantically correct.

To experiment, edit the skin template content.homepage.php.

Find:

            {if $product.ctrl_sale}
            <span class="old_price">{$product.price}</span> <span class="sale_price">{$product.sale_price}</span>
            {else}
            {$product.price}
            {/if}

Change to:

            From: {if $product.ctrl_sale}
            <span class="old_price">{$product.price}</span> <span class="sale_price">{$product.sale_price}</span>
            {else}
            {$product.price}
            {/if}

If you don't see the change immediately, you may need to have CubeCart clear its internal cache.

However, since the price is updated when an option is selected, we will need to get creative and use a different data item to show the base price if different than the price to pay.

Edited by bsmither
  • Like 1

Share this post


Link to post
Share on other sites

Hi @bsmither,

 

Thank you very much for your assistance. However, I have realised I didn't explain it very well.

I don't want to put 'from' against all my prices, just if they have options that increase the price. Is it possible to know this on the category page? or is all this information surfaced only on the product page?

Thank you again, I really appreciate the support!

Sam

Share this post


Link to post
Share on other sites
Posted (edited)

There is no existing, simple way to make a test for whether a product has options when shown in the Latest Products. (Probably also not available for Featured Product, Best Sellers, and On Sale boxes.)

However, a simple test can be made on the View Category page (content.category.php, two places).

{if $product.options}From {/if}

This test can also be implemented on the View Product page (element.product.call_to_action.php).

{if $PRODUCT.options}From {/if}

As I may have mentioned, on the View Product page, the price does get updated when an option is chosen. So, a solution to show the base price would be best here.

Edited by bsmither

Share this post


Link to post
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.

Sign in to follow this  

×
×
  • Create New...