- Posts: 7
- Thank you received: 0
Negative price value
13 years 1 month ago #122285
by Acnove
Negative price value was created by Acnove
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
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.
Less
More
- Posts: 12953
- Thank you received: 1778
13 years 1 month ago #122300
by Mohamed Thelji
Replied by Mohamed Thelji on topic Negative price value
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.
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.
12 years 11 months ago #131753
by trevsmiff
Replied by trevsmiff on topic Negative price value
I would like to have options with a negative price, could this be considered for a future release please?
Trevor
Trevor
Please Log in or Create an account to join the conversation.
12 years 11 months ago #131783
by nicolas
Replied by nicolas on topic Negative price value
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.
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.
12 years 11 months ago #131787
by trevsmiff
Replied by trevsmiff on topic Negative price value
Thanks Nicolas.
Trevor
Trevor
Please Log in or Create an account to join the conversation.
12 years 11 months ago #131789
by Acnove
Replied by Acnove on topic Negative price value
Thanks very much :woohoo:
Please Log in or Create an account to join the conversation.
- PolishedGeek
-
- Offline
- Official HikaShop Development Partner
9 years 3 months ago #275014
by PolishedGeek
~ Deb Cinkus, CEO
Polished Geek: more with monday․com
eCommerce Business Process Automation Experts
Replied by PolishedGeek on topic Negative price value
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
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.
9 years 3 months ago #275022
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Negative price value
Hello,
I'm afraid that a 3 year old thread is not the right place for your question regarding HikaShop 3.1.1
Regards,
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.
Please Log in or Create an account to join the conversation.
Time to create page: 0.079 seconds