New Quote Classes - Plugin or Core?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
10 years ago
I'm interested in creating a new Quote and QuoteItem class. These classes would be very similar to the Order and OrderItem classes.

We're in the process of creating a Quote Cart for our website. This Quote Cart was created by copying most of the Wishlist functionality. Although instead of "emailing a friend" we would like to submit a quote in a very similar way as an order is submitted. I.e. - take the user through a customized quote checkout process. They would enter shipping address and shipping method. No payment info.

We would then like to store the quote into a Quote and QuoteItems table. (Similar to the Order and OrderItems tables). Our thought is to create two new core classes similar to the Order and Order Item classes. Our reasoning for this is we want to provide Customers the ability to view and convert quotes to orders within their My Account section. We would also like to provide admins to ability to edit quotes (basically add the pricing).

Again our thought is to create two new core classes. My question is, should we edit the Nop.Core source and add these new classes there or should we create a new Plugin?

Thank you for any advice in advance.
10 years ago
We have a similar issue and were creating this too. Any suggestions from the community would be great.
10 years ago
Sounds like a lot of works, I would extend the core classes, but that's just me. I only use plugins if there already exist an interface or doing widgets.
10 years ago
kelticband wrote:
I'm interested in creating a new Quote and QuoteItem class. These classes would be very similar to the Order and OrderItem classes.


I would start by adding an enumeration to the OrderStatus which represents Quote, or pre-order, or whatever. This would enable easy conversion to actual order by simply changing the status flag, and you wouldn't have to rewrite much code from the ground up.

Just a special checkout function which sets the flag correctly and gathers some info (billing address, which stores an email,  could be used as a contact address).

If NopCommerce were to incorporate this feature, I suspect that would be the way to do it.
10 years ago
Thank you for your reply. That sounds perfect. Would you recommend that I add this addition functionality within the source code or create a plugin that extends the source classes? My concern is not being able to update nop versions if I edit the source code. Would it be better as a plugin?

Thanks again. Appreciate your insight.
10 years ago
Personally, I am using a hybrid approach:

1. A separate MVC project which Nop.Web references. I place my custom controllers here, along with test and default views. From here I can also override/add routes and dependencies just fine by implementing DependecyRegistrar or RouteProvider. I can expose my views to Nop.Web by compiling them using RazorGenerator tool, so no issues there.

2. Custom and overridden views are stored in my themes folder in Nop.Web core project. Some people may not like this approach because themes aren't meant to change the functionality of the store, but I don't care. It works.

3. When I need to access Nop.Web in code (for example, catch a controller action), then I go for a plugin.

I haven't gone through an upgrade yet (need to finish some things before pulling 3.2), but I'm hopeful the above approach allows me to quarantine core issues (MVC project) from presentation issues (views/plugins)
8 years ago
Hi,

I would like to have this feature.
I was also thinking of creating two new classes (Quote and QuoteItem)...
But mattsoundworld idea with OrderStatus is simple and brilliant!!

Have anyone one succeed implementing such a feature.

I'm a developper and interested in creating this feature as my company would need it for a B2B solution.

I would be happy to help build it.

Hope to hear from you soon.

Regards
8 years ago
I've just submitted this feature to Andrei for the 3.70 roadmap.
He've kindly created a work item for it.
Please vote for this work item here
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.