Post by gilles0181 » Fri Nov 24, 2017 7:19 pm

I've successfully built my own store which has been running for a couple of years now. I am a PHP developer by nature, so i added some stuff in my own store which i would like to know if it is possible using OC. These are the deeper integration questions that never get answered in any review, so i hope a few of you can answer if this would be possible using OC.

1. CMS pages
My site currently has a lot of background information (e.g. static pages) but also some 'calculators' to calculate how much products you would need in your situation. These calculators are 'wizards' which basically calculate and give you an advice in a few steps. From the last page you can add the calculated products to your shopping cart, based on yet another question (e.g. for how many months would you need to have products). If the CMS page is possible, and it can 'host' custom PHP code, i think i am halfway there. Then all i need is a hook/API to add products to the current user session (via AJAX preferably) and show them a message once the products have been added. Is that possible and where could i get more information on this?

2. Order processing "Hooks"
I would like to hook into the event once an order has been placed (and paid). I offer in general currently 2 ways of paying, e.g. pay offline (transfer money via bank) or online (e.g. paypal etc). There is some deeper logic involved here;
2.1; For the offline payment processing; this would mean that (in the admin dashboard) i would need to have a button where i would be able to mark an order as paid.
2.2; Once an order is paid, i would also need to be able to 'hook into' that event to automatically generate the shipping label (code is available) and send that to my own label printer at home. If there is a 'order paid' event that would also fire on manual payment this would be enough.
2.3; I should also be able to download the PDF of the invoice (using an API preferably) to send the PDF to my laser printer automatically.
2.4; If i would be able to get the order country, name and total price using the API i would be able to send myself a push notification.

3. Offline payments / reminder emails.
For people who choose to pay offline, i should be able to send reminder emails. These reminders should not be sent out automatically, since i might skip a day in checking the bank account, so preferably using a button in the dashboard. Is it possible to configure the contents of these emails so i can have a link in them where they can pay the order online? E.g. that they land on a order payment page?

Newbie

Posts

Joined
Fri Nov 24, 2017 7:00 pm

Post by straightlight » Sat Nov 25, 2017 12:20 am

gilles0181 wrote:
Fri Nov 24, 2017 7:19 pm
I've successfully built my own store which has been running for a couple of years now. I am a PHP developer by nature, so i added some stuff in my own store which i would like to know if it is possible using OC. These are the deeper integration questions that never get answered in any review, so i hope a few of you can answer if this would be possible using OC.

1. CMS pages
My site currently has a lot of background information (e.g. static pages) but also some 'calculators' to calculate how much products you would need in your situation. These calculators are 'wizards' which basically calculate and give you an advice in a few steps. From the last page you can add the calculated products to your shopping cart, based on yet another question (e.g. for how many months would you need to have products). If the CMS page is possible, and it can 'host' custom PHP code, i think i am halfway there. Then all i need is a hook/API to add products to the current user session (via AJAX preferably) and show them a message once the products have been added. Is that possible and where could i get more information on this?
Yes, it is definitely possible. You'd just need to ensure not to confront any CSS / class keys with your custom theme when using the calculator feature that you already have. As for Ajax, there are countless examples that are already provided from the TWIG files in your catalog/view/theme/default/template folder which numerous TWIG files contains JS scripts that begins with Ajax . Another core location to gather an example would be from the catalog/view/theme/javascript/common.js file.
2. Order processing "Hooks"
I would like to hook into the event once an order has been placed (and paid). I offer in general currently 2 ways of paying, e.g. pay offline (transfer money via bank) or online (e.g. paypal etc). There is some deeper logic involved here;
Opencart v3.x releases already uses email events from the core including and especially for the orders.
2.1; For the offline payment processing; this would mean that (in the admin dashboard) i would need to have a button where i would be able to mark an order as paid.
From the admin - > sales - > orders , each orders can be assigned with different order statuses. However, if you need it to be done from the admin dashboard, you might need an extension in order to do that.
2.2; Once an order is paid, i would also need to be able to 'hook into' that event to automatically generate the shipping label (code is available) and send that to my own label printer at home. If there is a 'order paid' event that would also fire on manual payment this would be enough.
If the code is available but not integrated into the Opencart core nor as an extension, it can always and easily be developed as a new Opencart shipping extension module.
2.3; I should also be able to download the PDF of the invoice (using an API preferably) to send the PDF to my laser printer automatically.
2.4; If i would be able to get the order country, name and total price using the API i would be able to send myself a push notification.
With an extension, this process could be done.
3. Offline payments / reminder emails.
For people who choose to pay offline, i should be able to send reminder emails. These reminders should not be sent out automatically, since i might skip a day in checking the bank account, so preferably using a button in the dashboard. Is it possible to configure the contents of these emails so i can have a link in them where they can pay the order online? E.g. that they land on a order payment page?
For contacting customers regarding reminded events, the admin marketing section can already handle those events manually by using the contact page. As for the orders online, an extension would be needed for those specifications.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: nonnedelectari and 407 guests