- Posts: 35
- Thank you received: 0
[SOLVED]Product page-no price
- Soko?owski
-
Topic Author
- Offline
Can i display product page with no prize? I tried with Associated products listing for category listing menu XXX,
but if i display all product i can choose Display prize-NO. And this work. But if i enter product X i see prize.
I want this option to browse products without going to the store
Please Log in or Create an account to join the conversation.
For the product page, go in the Display tab of the configuration and turn off the "show price" option there and it will apply for the product page.
Please Log in or Create an account to join the conversation.
- Soko?owski
-
Topic Author
- Offline
- Posts: 35
- Thank you received: 0
But i dont want no prize for global setting but for specific page.
Please Log in or Create an account to join the conversation.
Instead of doing that, keep the show price option turned on and just change the "free" text with a translation override:
www.hikashop.com/download/languages.html#modify
Please Log in or Create an account to join the conversation.
- Soko?owski
-
Topic Author
- Offline
- Posts: 35
- Thank you received: 0
But in my case, the situation is more complicated.
For every product I have set two prices. For registered users and public users. In addition,I wants to add a page with the same products as the shop where I could display the products without a price. So I cant add "free" for public users.
Maybe, that I understood you wrong?
Please Log in or Create an account to join the conversation.
- Posts: 12953
- Thank you received: 1778
If you don't want the "free" text to be displayed you'll just have to edit your translation file through "Hikashop->System->Configuration->Language->YourTranslationFile", and change this line :For every product I have set two prices. For registered users and public users. In addition,I wants to add a page with the same products as the shop where I could display the products without a price. So I cant add "free" for public users.
Note that if your situation is more complicated than that, you'll have to give us more information.
Please Log in or Create an account to join the conversation.
- Soko?owski
-
Topic Author
- Offline
- Posts: 35
- Thank you received: 0
Menu: Home, About us, Product, Shop
Users: Register(lower prices), Public(higher prices).
Example product: "X"
If public user go to the "shop" menu and go to X product page, X cost 100$.
If register user go to the "shop" menu and go to the X product page, X cost 50$
(This work!) And my case:
If public/register user go to the "product" menu he should see exactly the same product as in the "shop" menu. So if public/register user go to the "product" meny and go to the X product page, X cost nothing(i know how set tranlation from free to nothing) and he cant add X to the bascet.
So "product" menu is only preview page for all products. I know how set no price for all product from specyfic category(Associated products listing for category listing menu). But if public/register user enter X product page in "product" menu he see still price.
I cant add new access in hikashop with free price, becouse public/register users must see diffrent prices in "shop" menu.
Please Log in or Create an account to join the conversation.
So to be sure:
- Product menu > Display products without prices and without add to cart button
- Shop menu > Display products with prices (one for public, one different and lower for registered) and add to cart button
Actually, the shop menu is fine with the two different prices, etc.
What you want is hide the price and the add to cart button when reaching the products from the product menu, right ?
If it is, it will require some custom code to check from which menu we come and display or not the price and the button.
You will have to edit the view "product / show_default" and add a code like:
Place this if condition around the quantity and listing_price parts. You can find them thanks to the comments in the view.
Please Log in or Create an account to join the conversation.
- Soko?owski
-
Topic Author
- Offline
- Posts: 35
- Thank you received: 0
Great solution! :woohoo:
I have modified some code that you entered me. I'm not fluent in PHP(beginner), so if you think you can do it better let me know.
1. First i modified: <span id="hikashop_product_price_main" class="hikashop_product_price_main"></span>
2. <div id="hikashop_product_quantity_main" class="hikashop_product_quantity_main"></div>
And this work! But if i change color of product(diffrent characteristic) then price appear. I am not sure where and how change code, but I was looking for "product / show_block_characteristic.php" close this code:
Could I get a little help?
Please Log in or Create an account to join the conversation.
You can potentially hide the characteristic display by adding the previous if condition around the code:
Please Log in or Create an account to join the conversation.
- Soko?owski
-
Topic Author
- Offline
- Posts: 35
- Thank you received: 0
Please Log in or Create an account to join the conversation.
Sorry for the late reply.
You have to put the if condition around:
And:<span id="hikashop_product_price_main" class="hikashop_product_price_main">
...
</span>
<div id="hikashop_product_quantity_main" class="hikashop_product_quantity_main">
...
</div>
Please Log in or Create an account to join the conversation.
- Soko?owski
-
Topic Author
- Offline
- Posts: 35
- Thank you received: 0
But I tested if I did it well. For example from:
I deleted:
and still if i change on characteristic i see prices. But on main product page I dont see prices(for all itemid!)
So my conclusion: Prices for characteristic are dynamically set in another place.
Please Log in or Create an account to join the conversation.
Yes you're right they are set dynamically in another place, and it replca the content in the <div< and in the <span>.
So that's why you have to put in the if condition the "div" and "span" tags.
Contrary to the previous code which include only the content of these div/span, and not the div/span tag.
Please Log in or Create an account to join the conversation.
- Soko?owski
-
Topic Author
- Offline
- Posts: 35
- Thank you received: 0
Now it works! My code:
and
Problem solved!
Please Log in or Create an account to join the conversation.