Post by straightlight » Sat Oct 14, 2017 7:22 pm

Followed are all the list of files containing the date_added without the date_modified fields:

Code: Select all

install/cli_install.php
admin/model/catalog/category.php
admin/model/catalog/download.php
admin/model/customer/customer.php
admin/model/design/theme.php
admin/model/localisation/geo_zone.php
admin/model/localisation/tax_class.php
admin/model/marketing/coupon.php
admin/model/marketing/marketing.php
admin/model/sale/return.php
admin/model/sale/voucher.php
admin/model/user/user.php
catalog/model/account/customer.php
catalog/model/account/wishlist.php
catalog/model/catalog/review.php
catalog/model/checkout/order.php
install/model/install/install.php
system/library/cart/cart.php
system/library/cart/customer.php
admin/model/extension/fraud/ip.php
catalog/controller/extension/openbay/amazon.php
catalog/controller/extension/openbay/amazonus.php
catalog/model/extension/fraud/maxmind.php
catalog/model/extension/openbay/ebay_order.php
catalog/model/extension/payment/amazon_login_pay.php
catalog/model/extension/payment/firstdata.php
catalog/model/extension/payment/globalpay.php
catalog/model/extension/payment/globalpay_remote.php
catalog/model/extension/payment/realex.php
catalog/model/extension/payment/realex_remote.php
catalog/model/extension/total/coupon.php
catalog/model/extension/total/credit.php
catalog/model/extension/total/reward.php
catalog/model/extension/total/voucher.php
Note: There are models that may only need the date_added without the date_modified field. At least, all the files containing the date_added criteria are included on the list above in order to make the corrections for the future release of Opencart.

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

Post by oclcas » Sun Oct 15, 2017 1:34 am

I've been working on a fork of the project - much narrower in scope that OC. But wanted to offer a suggestion for future versions:

Use date_added and date_modified columns in ALL tables, and rely on MySQL to update them (in the table definition), rather than having PHP do the same work. It's much simpler. This might require increasing the minimum MySQL version supported, as older versions only allowed for one column timestamp column with a default value of CURRENT_TIMESTAMP. Later versions allow two columns.

You then won't need to even think about these columns in the models unless you're selecting them, rather than also needing to do so during inserts and updates.

New member

Posts

Joined
Wed Sep 14, 2016 11:22 pm

Post by straightlight » Sun Oct 15, 2017 1:37 am

I could not completely agree on this analogy since Opencart does use features to strictly add new rows in the database. For instance, the order history table; it does not require to have a date_modified field since each events and actions occurred by the merchant creates a wider report transactions of each order activities.

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

Post by tslack » Fri Nov 10, 2017 8:55 am

+1 on date_added/date_modified fields

I don't care if it's MySQL, Doctrine, Propel (or other db/orm) controlling it- but across the board automatically, yes please!

Got Slackware!?


Newbie

Posts

Joined
Tue Nov 07, 2017 9:14 am
Location - Kansas

Post by straightlight » Mon Dec 04, 2017 10:29 pm

Followed is the reply we got, unfortunately, even though all solutions were provided from the platform in order to add the date_modified fields in those mentioned files (at least for most of them): https://github.com/opencart/opencart/issues/6090 .

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: Amazon [Bot] and 12 guests