8

The majority of our customers not very tech savvy and have trouble with basic website functions and they need to order same or similar items every week or quickly.

What is best way for me to assign certain products to specific customers so they can quickly purchase them? Like a favorites list. shall I just rename the wish-list and use it? Or is there a better way to achieve this? Ideally I'd like them to be able to go one page where all their regular items are listed and at that page they will be able to enter that how many of each they want and then they can directly go to the checkout page.

1
  • You can make use of google analytics and display the list of the products which are frequently preferred by the customers.
    – tru.d
    Nov 13 '19 at 6:28
1

It's very old question, but sadly noone answered it. I bet the author has more knowledge now, so he could answer it himself now :)

Nevertheless, your question was theoretical, so I won't provide the code with working functionality, but rather use my experience with Magento 2 backend developer to put you in the right direction.

Why core functionality extending is a "no no"?

I've just need to rename it!

That's a rabbit hole you can dive into quickly and painless - but be aware! It's short-term only... The core functionality name is "Wishlist" - The customer wish to buy that product and not The product seller want you to buy that product. That's the first problem - programming is not a business, you can't sell same product with changed box only, especially if you were not the original manufacturer of that product. In business it's called reselling or rebranding, there is no such thing in programming. Sadly business and programming disagreements are common and it's often hardly to compromise.

What will happened to your changed wishlist when Magento will change the code? Will it still be functional? Probably. Will you test your old module after the upgrade? It's such an old module, it only changes naming..., but is it? You've created small module just to rewrite that naming 3 years ago, then 2 years ago you've added some special promotion that will occur only for that specific customer and for those products only. Few months after - he wanted to automatically change products once a week. That's what good programmer need to understand, you don't write it to work just today, it should work till the end of the project and be easy manageable and extendable. Bad design decisions could lead product owner to pay the bill twice in the end.

Being a programmer I had to compromise a lot in the past. Some tasks I resolved faster, some I resolved slower. Some tasks were stupid in my eyes, but as a Junior you don't need to ask, you just need to write and test, right? Few months, years passed and you have your project on the pan, looking like spaghetti, that is not manageable in any ways. That's because you agreed with your client without any doubts and go with the cheaper, faster solution... and you did that 100 times. Now the client is not happy - he need to pay you more, because the whole project is no longer that open source project you've started with - that's the whisper of the past - now it's basically your own project with your own "renamed" functions.

The harder and "expensive" solution

It will meet your needs, but that's sadly not a rename task

It might cost your client 10x much than the rename, but in the long run it will pay both of you back with interest. Just use your project knowledge, add custom functionality. Don't use Magento single responsibilty code from it's core, but use the whole Magento as a framework instead. Let the core functionality inspire you to write your code and you can even copy it (redundant right? It won't be redundant, it will be stacked into it's functionality module - you won't copy framework features, you will only copy business logic classes!). You will have to write few (or dozen classes in Magento) more to get it right, but well - in the end - you will have your completely own, manageable, expandable and isolated functionality that will work not only on that one project, but in the others too!

The Magento upgrade time? No problem - your code is isolated, you can turn it off, stick to the upgrade itself and go back to it later, maybe add some tests, if it's still needed by the business side! If your module is mature enough - share it - let the community extend it, or maybe better - make money from it (if your licensing will let you do that :)) - charge 50 bucks for one module installation on Magento's marketplace, that will give you some small money boost, but maybe you have dozens of those izolated modules?

That's why you don't want to change something that is already working, has differen name than sometihing you need and is final. That's why I would rather add my module next to it and not onto it. :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.