Shifting location of prices display

  • Posts: 299
  • Thank you received: 2
10 years 7 months ago #188924

-- HikaShop version -- : 2.3.5
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.5.19
-- Error-message(debug-mod must be tuned on) -- : No error

HI,
I want to shift location of the prices, see attached image.
What I want is the original per piece price including VAT to be displayed on top and then underneath I want rebated price (like if you buy 10 pcs you shall have discount).
The file to edit must be the Display => Product => listing_price
But I don't know how to set it up like I want it displayed.
Thanks for any help here.

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

  • Posts: 84304
  • Thank you received: 13698
  • MODERATOR
10 years 7 months ago #188938

Hi,

I would need more information first. How did you configure your prices ? Could you do a screenshot of the product edition page of one product ? You're talking about a rebated price. Did you setup a discount ?
Are you able to purchase products by units, or only by 10 pcs ?

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

  • Posts: 299
  • Thank you received: 2
10 years 7 months ago #189075

HI,
I have set it up like ordinary price when buying 1 piece up to 11 pieces then discount 20% when buying 12 pieces or more.
Set up like the screenshot here:
Oh by the way is it also possible to display prices with decimals only when the price has decimals to display like 11,34 kr and no decimal when price is like 12,00 kr or anything with ,00?

Last edit: 10 years 7 months ago by LAMF. Reason: More information added

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

  • Posts: 84304
  • Thank you received: 13698
  • MODERATOR
10 years 7 months ago #189103

Hi,

Ok, thank you for the information.
Then, edit your menu via the menu Display>Content menus and set the "prices display method" option there to "all" and that should do what you want.

For the decimals there is no option for that. You would have to edit the file administrator/components/com_hikashop/classes/currency.php and change the line:
return $format;

to:
return str_replace(',00','',$format);

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

  • Posts: 299
  • Thank you received: 2
10 years 7 months ago #189176

HI,
Ok tried that but that make ti display all prices for the products listed..Not quite as I wanted.
I would have liked it to display on top the original per piece price and under that the price per piece when buying 10 or 12 or whatever options there are.
It is a css styling thing but I don't seem to be able tp get it working...
There are two css classes:
.hikashop_product_price_with_min_qty .hikashop_product_price_for_at_least_12 and I have tried to set those up so there should be a line break between the price for 1 item and the price for buying for i mthis example 12 ut it does't seem to work.
I applied it in the css file style_red.css under System => Display
Any help please...

The decimal issue was greatly solved! Thanks for that!

Last edit: 10 years 7 months ago by LAMF. Reason: more info added

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

  • Posts: 84304
  • Thank you received: 13698
  • MODERATOR
10 years 7 months ago #189183

Hi,

I would love to help but before that I would need to understand what you want, because I thought that your question was about displaying all the prices of the product on the listing.
If that's not what you want, then I still don't know what you want and I can't answer to a question I don't know.
If you have two prices (1 for the quantity for 1 to 11 and 1 for the quantity above 12) then setting the option like I explained will display both prices, which is what you said you wanted:

I would have liked it to display on top the original per piece price and under that the price per piece when buying 10 or 12 or whatever options there are.

So if that's not what you want, please explain what you want.

Last edit: 10 years 7 months ago by nicolas.

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

  • Posts: 299
  • Thank you received: 2
10 years 7 months ago #189254

Hi,
You're totally right and it is exactly ehat I want. So now it has turned into a styling issue I can't solve.
I would like the Price for 1 pc to 11 (in this example) to display above the price for 12 pcs anmd more.
Like the picture I have in my first post. Is that possible?
Like it is displaying now they are all in one line but they ar estill defined as different elements so I would need some styl,ing help, i.e. some css to make it displaying as I want.
Like this:

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

  • Posts: 12953
  • Thank you received: 1778
10 years 7 months ago #189277

Hello,
Can you give us a link to the page where you are having that issue so that we can directly test it ?
Thanks.

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

  • Posts: 299
  • Thank you received: 2
10 years 7 months ago #189345

Hello,
I set it to only display price for one product but on this specific page I have set it up to display all prices so you can test:
http://www.dsgbutiken.com/index.php/tillbehor-bil-lastbil/olja-filter

Last edit: 10 years 7 months ago by LAMF.

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

  • Posts: 13201
  • Thank you received: 2322
10 years 7 months ago #189352

Hi,

You will have to edit the view "product / listing_price" and replace the line:

echo '<span class="hikashop_product_price_per_unit">'.JText::_('PER_UNIT').'</span>';
By:
$maxQuantity = $price->price_min_quantity - 1;
echo '<span class="hikashop_product_price_per_unit">'.JText::_('PER_UNIT_UNTIL_X_BOUGHT',$maxQuantity).'</span>';
And add a translation override like:
PER_UNIT_UNTIL_X_BOUGHT="Price for 1 - %s"

And you can override the translation:
PER_UNIT_AT_LEAST_X_BOUGHT="Price for %s and more"

www.hikashop.com/support/support/documen...ize-the-display.html
www.hikashop.com/support/faq.html#tran

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

  • Posts: 299
  • Thank you received: 2
10 years 7 months ago #189491

HI,
Thanks for giving me the code, it works!
Now it's the styling to get the price for at least x on the row under the price for one.
I want that price in smaller size as well so the regular price is displayed on top like my example.
I don't get it working when trying to style it in the css file style_red.css
Any help appreciated.
Thanks!

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

  • Posts: 13201
  • Thank you received: 2322
10 years 7 months ago #189503

Hi,

Please try to apply the properties on the class:

.hikashop_product_price_with_min_qty{
  display: block !important;
  font-size: 12px !important;
}
.hikashop_product_price_with_min_qty span .hikashop_product_price{
  font-size: 12px !important;
}

These properties needs to be added at the end of the style_red.css file.

The following user(s) said Thank You: LAMF

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

  • Posts: 299
  • Thank you received: 2
10 years 7 months ago #189599

Hi,
Thanks that was the key!
I wanted the second price a bit smaller so I added a new style to that so now it'sworking perfect.

.hikashop_product_price_with_min_qty{
  display: block !important;
  font-size: 12px !important;
}
.hikashop_product_price_with_min_qty span .hikashop_product_price{
  font-size: 16px !important;
}

span.hikashop_product_price.hikashop_product_price_1 {
	font-size: 12px !important;
	color: #D00;
}

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

Time to create page: 0.110 seconds
Powered by Kunena Forum