Skip to main content

Price on request

10 years 3 weeks ago #253998 by featha
Price on request was created by featha
-- HikaShop version -- : 2.6.4
-- Joomla version -- : 3.6.4
-- PHP version -- : 5.5.3
-- Browser(s) name and version -- : Chrome

All my products are currently set to 'login to view price'. You log in and you see the price.

We would like only one category to display 'price on request' below each product in this category.

You therefore need to email the client to obtain the price for these items.

How would I set this category different from the others?

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

10 years 3 weeks ago #254009 by nicolas
Replied by nicolas on topic Price on request
Hi,

Set the "Display a contact button on the product page" setting of the HikaShop configuration to "on a per product basis" and then, in the products you'll be able to activate or not the display of the contact button in order to do that.

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

10 years 3 weeks ago #254104 by featha
Replied by featha on topic Price on request
Thank you for the feedback. I go to: Hikashop > Configuration > System

I do not find exactly what you are talking about. The only settings I could find are the following:

Display 'Add to cart' button
Quantity field on 'Add to cart' button
Display 'Add to wishlist' button
Display product code
Price display method
Display custom item fields
Display the cost per unit weight
Display out of stock products
Display filters on product listing
Only display categories with products

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

10 years 3 weeks ago #254105 by featha
Replied by featha on topic Price on request
Apologies. I did find it eventually under the MAIN tab, and not DISPLAY tab where I was originally looking.

My next question.

Once I am on the PRODUCT page, where I can I change the button to display "PRICE ON REQUEST"

It currently still shows "LOGIN TO VIEW PRICE" and I do not want it for this particular Category.

All the other categories can still show 'Login to view price'.

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

10 years 3 weeks ago #254106 by nicolas
Replied by nicolas on topic Price on request
Hi,

There is no "LOGIN TO VIEW PRICE" text in HikaShop by default. So since I don't know how to have that on your product page, I can't say how to change that.
Could you provide more information on that and give a link for each type of products so that we can see what you have now in order to be able to guide you ?

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

10 years 3 weeks ago #254211 by featha
Replied by featha on topic Price on request
I do an override in the Languages section. (Hikashop > Configuration > Languages )

Override:
FREE_PRICE="<a class="modal" href="/index.php#login_panel">Login to view price</a>"

I want all Main Category prices to still display 'Login to view price'.

Except the one Category, Machinery - this should display 'Price on request'.
So even when a client has logged in, he still cannot see a price, but only a button with "Price on request'

This should also probably be set in Languages, but I have no idea how to do it for one Category only.

I have an attachment to show the two screenshots and how it should display.

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

10 years 3 weeks ago #254219 by nicolas
Replied by nicolas on topic Price on request
Hi,

Then you need to edit the file "listing_price" of the view "product" via the menu Display>Views and change the code:
Code:
echo JText::_('FREE_PRICE');
to:
Code:
if(empty($this->element->product_contact)) echo JText::_('FREE_PRICE');
That way, it will only display the "free" translation when the contact option in the product is turned off.

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

10 years 2 weeks ago #254684 by featha
Replied by featha on topic Price on request
I have five categories with products under each.
With all these categories the user needs to 'login to view price'.

With only ONE of these five categories I need the button to display 'price on request'.
All the other categories still need the button 'login to view price'

I am not sure if I change the language setting as below, that the 'login to view price' will still display for the other categories?

I need to change this button setting only for one Category.
How would I do that?

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

10 years 2 weeks ago #254706 by nicolas
Replied by nicolas on topic Price on request
Hi,

The procedure I explained should do that since I took that into consideration when replying to you.
So please try it out. If it doesn't work, it means that you're missing something on what I told you to do and we would need screenshots and links of what you did so that we could tell you what you're missing.

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

10 years 2 weeks ago #254805 by featha
Replied by featha on topic Price on request
Okay thank you. Then will definitely try it out and see.

One more thing. You mentioned "it will only display the "free" translation when the contact option in the product is turned off"

The only place I can see this, is at the bottom of the Product settings under the block 'Display'.

You can either select the Contact button 'yes or no'

Is this the setting you are talking about?

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

10 years 2 weeks ago #254825 by nicolas
Replied by nicolas on topic Price on request
Hi,

Yes, precisely.

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

10 years 1 week ago #255254 by featha
Replied by featha on topic Price on request
Hi
I have done the change in the code as suggested.

It does not seem that anything has changed.
All my category products still display the button "login to view price" like before.

When I go to each product setting, under 'Display', the Contact button is set to 'NO' for all the products.

What else do I need to change?

Four of my 5 categories need to display 'login to view price'
One of the 5 categories need to display 'price on request'

--

I have also set the "Display a contact button on the product page" to "On a per product basis"

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

10 years 1 week ago #255308 by nicolas
Replied by nicolas on topic Price on request
Hi,

The code modification I proposed was so that you would have the "login to view price" text witth the contact setting of the product turned off and the button with the text "price on request" with the contact setting of the product turned on.
I understood that it was what you wanted no ?
If you didn't turn on that option in any product, then it's normal that all the products get the "login to view price".

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

10 years 1 week ago #255333 by featha
Replied by featha on topic Price on request
Ah okay, I get you and understand it now.
I will change all the product settings in this specific category to have the contact button turned on.

Will let you know how it works.

Thank you.

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

9 years 11 months ago #257119 by featha
Replied by featha on topic Price on request
Hi, I made changes to all the relevant products and there are some changes required.

When I select the product category the button 'Login to view price" is still visible.

Once I click on a relevant product, then the new button is displayed below the 'Login to view price'
The button text is 'contact us for more information' - this should read 'price on request'

The button 'Login to view price' should not be visible on these category products at all.

We have 5 categories. 'Login to view price' should be displayed for products of the other 4 categories.
But the category 'Machinery' should only have the button 'contact us for more information'.

What do I need to change on the settings?

Attach find a screenshot. Or you can view it here: pasteboard.co/6TjAB2EvG.jpg

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

9 years 11 months ago #257130 by Jerome
Replied by Jerome on topic Price on request
Hi,

Please try instead :
Code:
if(empty($this->row->product_contact)) echo JText::_('FREE_PRICE')
I think that "row" will be more appropriate than "element" in the view "listing_price".

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

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

9 years 11 months ago - 9 years 11 months ago #257190 by featha
Replied by featha on topic Price on request
No sorry, there was no change. The products still display both buttons 'Login to view price' and below this 'Contact us for more information' - as per my screenshots.

I changed the Display > Views > File 'listing_price'

It now looks like this:
Code:
if(empty($this->row->prices)) { if(empty($this->row->product_contact)) echo JText::_('FREE_PRICE'); } else { $first = true; echo JText::_('PRICE_BEGINNING'); foreach($this->row->prices as $price) { if($first) $first=false; else echo JText::_('PRICE_SEPARATOR');
Last edit: 9 years 11 months ago by Jerome. Reason: code indent

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

9 years 11 months ago #257523 by Jerome
Replied by Jerome on topic Price on request
Hi,

Are you sure that you're overriding the view for the right template ?
Can you a fixed modification (display of a string) to be sure that you're in the right place ?
Does your products right configured for the "product_contact" field ?

www.hikashop.com/support/documentation/1...-display.html#layout

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

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

Time to create page: 0.137 seconds
Powered by Kunena Forum