Jump to content

Can I display "from price"


swood

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

Link to comment
Share on other sites

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.

Link to comment
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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...