Add "From" in the category listing

  • Posts: 103
  • Thank you received: 1
  • Hikashop Essential
11 years 2 months ago #160650

-- url of the page with the problem -- : mywebsite.com/mypage
-- HikaShop version -- : 2.3.1
-- Joomla version -- : 3.3.1
-- PHP version -- : 5.3.28
-- Browser(s) name and version -- : Safari 7.0.4
-- Error-message(debug-mod must be tuned on) -- : Error_message

I would like to add the word "From" before the price on each item in the category listings.
This is because my variants are different prices, and only the first price is shown on the listing.
I have attached a screen shot, to show where I want to add "From" (in the area circled in red).
Which view and which file do I edit to add this?
Thank you for your help.

Attachments:

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

  • Posts: 2143
  • Thank you received: 747
11 years 2 months ago #160721

Simply add this line to your language override:

PRICE_BEGINNING="from "

(In case it's needed, you'll find info on how to do language overrides in documentations for both Joomla and HikaShop.)


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )

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

  • Posts: 84298
  • Thank you received: 13697
  • MODERATOR
11 years 2 months ago #160657

Hi,

You need to edit the file "listing_img_title" of the view "product" via the menu Display>Views and add your text just before the price display block of code.

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

  • Posts: 103
  • Thank you received: 1
  • Hikashop Essential
11 years 2 months ago #160797

OK thank you!

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

  • Posts: 103
  • Thank you received: 1
  • Hikashop Essential
11 years 2 months ago #160800

lousyfool wrote: Simply add this line to your language override:

PRICE_BEGINNING="from "

(In case it's needed, you'll find info on how to do language overrides in documentations for both Joomla and HikaShop.)


I tried that and it works, unfortunately, it also adds the "from " to the price on the product's page and to the shipping prices. I want the "from " to appear only on the category listings page.

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

  • Posts: 103
  • Thank you received: 1
  • Hikashop Essential
11 years 2 months ago #160802

nicolas wrote: Hi,

You need to edit the file "listing_img_title" of the view "product" via the menu Display>Views and add your text just before the price display block of code.


Thanks for the tip. I added the text "from " right here in that file:

</div>
</div>
<!-- EO PRODUCT IMG -->
from
<!-- PRODUCT PRICE -->
<?php
}
if($this->params->get('show_price','-1')=='-1'){
$config =& hikashop_config();
$this->params->set('show_price',$config->get('show_price'));
}
if($this->params->get('show_price')){
$this->setLayout('listing_price');
echo $this->loadTemplate();
}


And it works, but the "from " is on a line by itself. (See the attached screen shot.) Which is OK if that is the only way it will work, but I would really like it to be on the same line as the price, for example, "from $8.95 plus shipping"
Is there any other place in the view file I could insert that text?
Thank you

Attachments:

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

  • Posts: 2143
  • Thank you received: 747
11 years 2 months ago #160816

Of course, both Nicolas and you are right, it doesn't make sense to have it on product pages and elsewhere. Sorry for misleading you. Maybe I can make up for it:

bw92116 wrote: ... I would really like it to be on the same line as the price ...


Wrap the 'from' into a span. If that alone doesn't help, add a class, so you can put it inline with the price per CSS.


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )

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

  • Posts: 103
  • Thank you received: 1
  • Hikashop Essential
11 years 2 months ago #160825

Thanks but <span>from </span> didn't change anything. I guess it's OK as it is.

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

  • Posts: 2334
  • Thank you received: 403
11 years 2 months ago #160808

Hi there,

Could you send a link to your page?
I guess the fact that it makes a new line probably come from the css so I would like to see it.

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

  • Posts: 103
  • Thank you received: 1
  • Hikashop Essential
11 years 2 months ago #160870

Sure. It's not on a public menu yet, but you can see it by going to:

fireworksland.com/hikashop-menu-for-categories-listing/

I could not get "from " to be on the same line as the price, so I just made it "Prices starting at" instead.

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

  • Posts: 84298
  • Thank you received: 13697
  • MODERATOR
11 years 2 months ago #160878

Hi,

You would simply need to add that CSS:
.hikashop_products_listing span.hikashop_product_price_full{ display: inline !important; }

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

  • Posts: 103
  • Thank you received: 1
  • Hikashop Essential
11 years 2 months ago #161013

Worked. Thanks!

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

Time to create page: 0.086 seconds
Powered by Kunena Forum