Discount depend on amount

  • Posts: 152
  • Thank you received: 11
11 years 10 months ago #85993

In our company, we sell oil, and will now forward build another page in hikashop to the sale of this. On our current side there is an automatic calculation of the discount.
There is for example a minimum order of 700 liters and giving discounts, from 1000 liter price.
Can the shop in any way be made, so depending on how many liters of customer orders, calculate the price compared to the price and discount.
I am considering making a CSV file that we can put in every day, because the price is fair prices, here I can do the calculation in liter. But would rather make a 1000 liter price.

Can discount system in any way manage this and provide a converted discount depending on the amount, and also show what discount rate is?


I'm using firebug, forumsearch, dokumentation and then I ask.. It's so easy ;)

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

  • Posts: 13201
  • Thank you received: 2322
11 years 10 months ago #86081

There is no default options for that in HikaShop, but you can do a plugin.
Based on the functions " onBeforeOrderCreate(&$order,&$do)" and "onBeforeOrderUpdate(&$order,&$do)".

You can find documentation here:
www.hikashop.com/fr/support/documentatio...r-documentation.html

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

  • Posts: 152
  • Thank you received: 11
11 years 10 months ago #86130

Thx for the answer..

I'm not so hard in coding, but I have found another way to do a little like this..

At my products I have made a lot of Characteristics, and there I have put 2 prices in, the before and the now price.. But where can I set some text in before the prices, just like the add. image?


I'm using firebug, forumsearch, dokumentation and then I ask.. It's so easy ;)
Attachments:

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

  • Posts: 82868
  • Thank you received: 13375
  • MODERATOR
11 years 10 months ago #86178

You can simply add a translation override like that:
PRICE_BEGINNING_0="Before "
PRICE_BEGINNING_1="Now "

www.hikashop.com/en/download/languages.html#modify

The following user(s) said Thank You: holm76

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

  • Posts: 152
  • Thank you received: 11
11 years 10 months ago #86329

This working well. But when I am adding a product to the cart, it take the first line (Before) and put into the cart also.. The price is correctly the "now" price..


I'm using firebug, forumsearch, dokumentation and then I ask.. It's so easy ;)

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

  • Posts: 82868
  • Thank you received: 13375
  • MODERATOR
11 years 10 months ago #86533

That's indeed the case.

If you don't want that, you need to edit the file "listing_price" of the view "product" for your frontend template via the menu Display->Views and replace the code:
echo $start;

by:
if(empty($this->cart_product_price)) echo $start;

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

  • Posts: 152
  • Thank you received: 11
11 years 10 months ago #86642

Thanks again..

It helped me..


I'm using firebug, forumsearch, dokumentation and then I ask.. It's so easy ;)

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

  • Posts: 152
  • Thank you received: 11
11 years 10 months ago #86656

As I wrote up side, it working, but now I see the line in the "total" in the cart also.


I'm using firebug, forumsearch, dokumentation and then I ask.. It's so easy ;)

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

  • Posts: 82868
  • Thank you received: 13375
  • MODERATOR
11 years 10 months ago #86862

Can you do a screenshot please ?

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

  • Posts: 152
  • Thank you received: 11
11 years 10 months ago #86906

Here you are.. It's where there is standing "Listepris"


I'm using firebug, forumsearch, dokumentation and then I ask.. It's so easy ;)
Attachments:

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

  • Posts: 82868
  • Thank you received: 13375
  • MODERATOR
11 years 10 months ago #87244

Ok, for that you should add the line:
<?php $this->cart_product_price = true; ?>

at the beginning of the file "cart" of the view "product".

The following user(s) said Thank You: holm76

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

  • Posts: 152
  • Thank you received: 11
11 years 9 months ago #90002

Just one more, where mu "Listepris" is showing.. I have created a module, where I would have showing the price that the costumer have to pay. But the text is the before price.
Sometime when its showing I just have to refresh the site, and then its gone. But it's not working all the time..

Where to edit that?



I'm using firebug, forumsearch, dokumentation and then I ask.. It's so easy ;)
Attachments:

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

  • Posts: 82868
  • Thank you received: 13375
  • MODERATOR
11 years 9 months ago #90120

I don't know.

Would you give a link where that is displayed so that we can see that issue ?

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

  • Posts: 152
  • Thank you received: 11
11 years 9 months ago #90137

it's bedoil.newzite.dk, if you can see it. As i wrote it come sometimes, and then I refresh it and then it's not showing, what is the correct


I'm using firebug, forumsearch, dokumentation and then I ask.. It's so easy ;)
Last edit: 11 years 9 months ago by holm76.

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

  • Posts: 82868
  • Thank you received: 13375
  • MODERATOR
11 years 9 months ago #90259

I'm always seeing it.
I cannot reproduce the problem.
Could you try to find a step by step which would allow us to reproduce the problem please ?

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

  • Posts: 152
  • Thank you received: 11
11 years 9 months ago #90548

It is not possible for me to reproduce the error.
The only thing I want is to make sure that the word "listepris" does not appear, just further up in the thread.
Sometimes what happens is that the word is displayed and if I update my browser it disappears again.
But how can I remove the text? It is a module that is made ​​in.

I have now tried to force the fail, and if I put an item in the cart and enter next on the cart, the module is showing the word. And here I can't remove it by refresh


I'm using firebug, forumsearch, dokumentation and then I ask.. It's so easy ;)
Last edit: 11 years 9 months ago by holm76.

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
11 years 9 months ago #90936

Hi,

You should have a text override for your "listepris" in your language file.

Regards,


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

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 152
  • Thank you received: 11
11 years 9 months ago #91047

Yes I have a override, made earlier because I want that text to be showed at the product.
That I don't want is to let it show up in the module.
Just as you can see in the tread, I want it to be showed one place


I'm using firebug, forumsearch, dokumentation and then I ask.. It's so easy ;)

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

  • Posts: 82868
  • Thank you received: 13375
  • MODERATOR
11 years 9 months ago #91215

In that case, instead of :
if(empty($this->cart_product_price)) echo $start;

try to use:
if(empty($this->cart_product_price) && !empty($this->element)) echo $start;

and that should not display your text on product listings.

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

  • Posts: 152
  • Thank you received: 11
11 years 9 months ago #91733

I have tried it now in: view > viewing > product - listing_price.

But it still showing when I add a product to cart, so have edit the file back. Is it the right place to edit?


I'm using firebug, forumsearch, dokumentation and then I ask.. It's so easy ;)

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

Time to create page: 0.106 seconds
Powered by Kunena Forum