DragonflyCMS Projects > Storez > [done] Checkout templated > Community Forums > Phoenix Netology
Forum Index > eCommerce > Storez

[done] Checkout templated Reply to topic


Hello,

I modified the checkout dialog so that it now uses templates and want to share this.

I've made no changes to the database.
I extracted the html code from checkout.php.
I created some functions near the end of checkout.php to save some redundant code parts.
I created a file functions.js that holds the form validation javascripts.
And finlaly created the various template files.

I've done some quick checks over most functionalities, hope i forgot nothing since i do not use all functionalities. The things i'm generaly using are working for me. Please make your own testings befor putting in production.

I'm motivated to do some more templating for storez and will post it here. But there is no timeline for this.

Movix
Attachment: checkouttemplated.zip
Description Copy the content of the zip file into the root of your dragonfly folder. Only checkout.php should appear for overwritting.
Filename checkouttemplated.zip
Filesize 21.70 KiB
Downloaded 1 Time(s)
You are not allowed to view/download this attachment

Please enter your server specs in your user profile! 😢


I noticed some errors in the work i submited. I'll fix them and post a new zip file in a few days.

Please enter your server specs in your user profile! 😢


I shall review before the next release.

Donations & Audit for DragonflyCMS

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


Reviewed - given the issues that I encountered, and knowing how difficult it is to resolve templating issues in such a complex scenario, I started from scratch and have now completed it.

After years of templating, for the first time I got caught by a simple extra space in an IF statement that had me frustrated for a few hours, grrr.
  • eliminated the deprecated ereg useage throughout Storez.
  • adopted your idea of templating common variables - thanks for that.
  • templated shipping methods that feed into checkout and order display
  • templated payment methods that feed into checkout and order display
  • templated the customer and admin email advices
Successfully tested many of the possible scenarios.

Donations & Audit for DragonflyCMS

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


Hi,

thanks for your work that i'll check out.
I'd like to learn, so could you please make some comments about the issues you encountered ?

Thanks Movix

Please enter your server specs in your user profile! 😢


I didn't exactly take notes but issues like undefined variables and arrays, plus shipping (or was it payment?) was broken - easier to start from scratch than try to debug.

In any event, the result is now more complete since I have now templated code from other files that are included in the checkout process.

That required standardization of all the payment and shipping files (long overdue) and I templated the email advices as a final touch.

File compare will illustrate what I mean.

Donations & Audit for DragonflyCMS

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):

All times are Australia/Adelaide


Jump to: