Display Price Ranges and "Price starting at"

  • Posts: 110
  • Thank you received: 4
  • Hikashop Business
9 years 11 months ago #214523

-- HikaShop version -- : 2.5.0
-- Joomla version -- : 2.5.28
-- PHP version -- : 5.5.59
-- Browser(s) name and version -- : Firefox 40.0.3

Hello there

I have some products on my webpage that are not for sell. For example some used products of the same brand/type/model/color. There I write:

"Some <Products>, between condition good and used, some with case, some without".
and then I would like to have a possibility to make that the price say's:
"Price between SFr. 500.- and SFr. 800.-"
or
"Price starting at SFr. 500.-"

Is this currently possible without any adaptions of the views?
I am thankful for every hint!
Best regards
Michael

Please Log in or Create an account to join the conversation.

  • Posts: 84305
  • Thank you received: 13700
  • MODERATOR
9 years 11 months ago #214532

Hi,

If you want to display the condition of the product on the product page, the best is to create a custom product field via the menu Display>Views. Then, you'll be able to select the condition in the product edition page of each product, and it will appear on the product page automatically.

For the price display, I guess the simplest would be to either have another custom product field where you would write that text.

The following user(s) said Thank You: mike

Please Log in or Create an account to join the conversation.

  • Posts: 110
  • Thank you received: 4
  • Hikashop Business
9 years 11 months ago #214857

Thank you for your Answer Nicolas!
I solved it for now like this:
I added a Custom Field on the Product that say's "Normal price, Price between and Price starting at". So to speak a "price type". Then I adapted the code of the view listing_price (Front end, product, listing_price). I added some logic that tests for my price type and according to that i take the prices of the product as "starting-at price" or "price between".

The current problem I have is that my code only works on the Product-Page itself (I mean if you view one product in detail). On an overview Page where all products of a category are listed, it won't work at the moment.

I have to fix that, but currently I have no idea how, because it seems that my custom-price-types seems to be not available in the scope. Maybe you have a hint, otherwise I have to try-and-error it out :)

Best regards
Michael

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 84305
  • Thank you received: 13700
  • MODERATOR
9 years 11 months ago #214864

HI,

Instead of $this->element you should use $this->row
That should work both on the listing and on the product page.

Please Log in or Create an account to join the conversation.

Time to create page: 0.048 seconds
Powered by Kunena Forum