- Posts: 110
- Thank you received: 4
Display Price Ranges and "Price starting at"
11 years 2 weeks ago #214523
by mike
Display Price Ranges and "Price starting at" was created by mike
-- 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
-- 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.
11 years 2 weeks ago #214532
by nicolas
Replied by nicolas on topic Display Price Ranges and "Price starting at"
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.
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.
11 years 2 weeks ago #214857
by mike
Replied by mike on topic Display Price Ranges and "Price starting at"
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
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
Please Log in or Create an account to join the conversation.
11 years 2 weeks ago #214864
by nicolas
Replied by nicolas on topic Display Price Ranges and "Price starting at"
HI,
Instead of $this->element you should use $this->row
That should work both on the listing and on the product page.
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.196 seconds