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

Writing new field in SQL regarding specific order

Started by artoulis, December 12, 2019, 10:01:23 AM

Previous topic - Next topic

artoulis

Hello,

i have developed a php script inside views/orders/tmpl/order.php
When a user press the button inside an order in the backend it "sends" a few fields from the objects $this->orderbt and $this->orderbt to an external software.

What i would like to do is "check" if it has been sent in the past or not, so i was thinking to write a new field into the object class $this->orderbt->newfield

do you know of any way to do this?
thank you in advance,

GJC Web Design

why not make a new status  and set the order to this status when the info is sent?
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

artoulis


artoulis

never mind, i figured how to do it.
however when the status of the order will be changed to shipped for example i'm still loosing this functionality.
do you have any other suggestions?

Studio 42

Use own table and add record.
If record exist, do not send again.
You can use own plugin for this and show a button if no record exist only and you can do this using ajax to not reload the whole view.

artoulis


Milbo

Quote from: artoulis on December 12, 2019, 10:01:23 AM
Hello,

i have developed a php script inside views/orders/tmpl/order.php
When a user press the button inside an order in the backend it "sends" a few fields from the objects $this->orderbt and $this->orderbt to an external software.

What i would like to do is "check" if it has been sent in the past or not, so i was thinking to write a new field into the object class $this->orderbt->newfield

do you know of any way to do this?
thank you in advance,


Super simpel, just create a new userfield. It will create the column(s). You can directly create a one for plugins and write a plugin for the job.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

AH

No doubt you will want  to know when, not just if, it was pressed

So suggest use a date field
Regards
A

Joomla 3.10.11
php 8.0