Negative price value

  • Posts: 7
  • Thank you received: 0
11 years 8 months ago #122285

I have been searching and trying for quite some time, now, but there seems to be no possibility to enter negative price values.

I need this with a product that has several options, but a customer can choose an option that is cheaper than the standard option, so the price of the product must decrease.

Why can't HikaShop handle negative prices ? I have seen this in other shopping systems.

Kind regards,

Jan

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

  • Posts: 12953
  • Thank you received: 1778
11 years 8 months ago #122300

Hi Jan,
If you want a product with a negative price value, the solution will probably be to use a discount associated to your product, then your product price will be negative.

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

  • Posts: 306
  • Thank you received: 42
  • Hikamarket Multivendor Hikashop Business
11 years 6 months ago #131753

I would like to have options with a negative price, could this be considered for a future release please?

Trevor

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

  • Posts: 83799
  • Thank you received: 13571
  • MODERATOR
11 years 6 months ago #131783

You can now support negative pricing by simply changing the line:
if(preg_match_all('#[0-9]+#',$val,$parts) && count($parts[0])>1){
to:
if(preg_match_all('#[0-9]+-#',$val,$parts) && count($parts[0])>1){
in the file administrator/components/com_hikashop/helpers/helper.php
That modification will be available in next version of HikaShop as a standard feature.

The following user(s) said Thank You: trevsmiff

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

  • Posts: 306
  • Thank you received: 42
  • Hikamarket Multivendor Hikashop Business
11 years 6 months ago #131787

Thanks Nicolas.

Trevor

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

  • Posts: 7
  • Thank you received: 0
11 years 6 months ago #131789

Thanks very much :woohoo:

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

  • Posts: 329
  • Thank you received: 94
7 years 9 months ago #275014

Hello,

I've looked in HikaShop 3.1.1 and I've tried to search finding that line and there are no exact matches.. I'm assuming it is the preg_match_all in "hikashop_toFloat" function that I need to change. If that is the correct place, it doesn't have the change similar to the one listed in the post.

Here is the end goal. We've built an admin checkout so an admin can dynamically create/assign orders to users so the admin can take phone orders as if they are the customer. We want to dynamically create an order discount with explanation that an admin can apply as they are on the phone. One solution we came up with would be to create a couple of order custom fields then dynamically add an admin only product to the cart during checkout with the explanation as one custom field on the item and using the custom price plugin to add a negative product price (or positive if they want to charge extra for something like extra fast processing, etc). They can't use coupons for this as they want to have this ability on top of coupons.

Thanks in advance,
Donald


~ Deb Cinkus, CEO

Polished Geek: more with monday․com
eCommerce Business Process Automation Experts

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

  • Posts: 26233
  • Thank you received: 4036
  • MODERATOR
7 years 9 months ago #275022

Hello,

I'm afraid that a 3 year old thread is not the right place for your question regarding HikaShop 3.1.1

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.

Time to create page: 0.101 seconds
Powered by Kunena Forum