News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Product preorder with custom price

Started by sandomatyas, May 21, 2019, 07:45:28 AM

Previous topic - Next topic

sandomatyas

Could you please suggest a solution for this topic:
There is a shop where some products have release date. The shop owner wants to put these products to the shop and give the possibility to place a preorder for them.
The preorder process could be similar like whitelist or flag the product somehow, at this point we don't need to collect the userinfo, or the money.
But the twist is: there is a custom preorder price for the product.
Like the regular price is $15 but the preorder price is $12. When the customers preorder/flag/whitelist the product before the release date, they should be pay the lower price after the release date as well, when the normal price is active.
Any guess for this?

Studio 42

#1
I think that a custom field or a Joomla system plugin can do it.
When the product is added to cart, you can set a date for eg. in this field.
When the user come back, the plugin check for the saved value and apply the discount if the product was not already ordered.
I dont know another safe solution.

sandomatyas

hm. Sounds like a plan :)
Could you help me how should I set a custom price/discount for the selected product? Which method should I use for that?

Studio 42

Quote from: sandomatyas on May 21, 2019, 16:59:49 PM
hm. Sounds like a plan :)
Could you help me how should I set a custom price/discount for the selected product? Which method should I use for that?
Quote from: Studio 42 on May 21, 2019, 11:01:36 AM
I think that a custom field or a Joomla system plugin can do it.
If you are not a programmer, it's to long to explain. If you are, then you should understand what i wrote ;)

Jörgen

I have solved it a bit different. With some overrides in productdetails and back en invoice creation i check if the avail date is passed if not, it is preorderable as any product. They can checkout and pay for the product. It will be sent when it is available. You can also create a "preorder" payment option from standard payment that doesn' t require payment until in stock. But it all depends on the fact that they are booked by the customer to make it work.
Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

sandomatyas

Quote from: Studio 42 on May 21, 2019, 17:38:42 PM
Quote from: sandomatyas on May 21, 2019, 16:59:49 PM
hm. Sounds like a plan :)
Could you help me how should I set a custom price/discount for the selected product? Which method should I use for that?
Quote from: Studio 42 on May 21, 2019, 11:01:36 AM
I think that a custom field or a Joomla system plugin can do it.
If you are not a programmer, it's to long to explain. If you are, then you should understand what i wrote ;)

Hm you wrote "When the user come back, the plugin check for the saved value and apply the discount if the product was not already ordered."
If I'm right I need to set a discount somehow.
There is a setCouponCode in the VirtueMartCart class but this is not a coupon.
I created a special vmcustom plugin before to solve an other task, and there I used plgVmPrepareCartProduct's $modificatorSum to set the price.
I was wondering if you suggest another solution or should I use this plugin method for this topic too?

Studio 42

You can check for the date and apply the custom field price.
If you need to get price after. You should save the date in a table for eg.
Else you can use the saved cart and check the product preorder date
In all case your user have to be registred.