♥Tsimi Posted October 16, 2015 Share Posted October 16, 2015 I was looking at the account.php file and see this code<?php echo $oscTemplate->getContent('account');?>Then looking at the catalog/includes/modules/content/account/ i see these modules;cm_account_braintree_cards.phpcm_account_sage_pay_cards.phpcm_account_set_password.phpcm_account_stripe_cards.phpthose modules have nothing to do with what is showing on the account.php page.Further digging revealed this file here; catalog/includes/modules/pages/tp_account.php is responsible for the account.php page contents.It is some sort of modular I guess but it is not same like all the other modules.So I thought it might be a good idea to create 3 modules for each block My Account, My Orders and Email Notifications.I have no github setup at the moment to ask for a pull request so I just post the package here and hope that @@burt or someone with a github fork can merge it then.Install is easy just drop in the files and then rename the tp_account.php file to tp_account.php_BAK. DONE! PACKAGE: My Account Modular.zip Link to comment Share on other sites More sharing options...
burt Posted October 16, 2015 Share Posted October 16, 2015 Not sure about it @@Tsimi The account page is already modular, no ? Drop in a new module, turn it on in admin ... done Link to comment Share on other sites More sharing options...
♥Tsimi Posted October 16, 2015 Author Share Posted October 16, 2015 Yeah it is some sort of modular. But you cannot turn things on or off or change sort order. Or if you want to change the layout as i did in the other topic then it won't work as it is right now without amending core code in that particular case the tp_account.php file. Also i would like to have same consistant module build up or style for all the modules. Link to comment Share on other sites More sharing options...
burt Posted October 16, 2015 Share Posted October 16, 2015 You might want to check it again... You can add more modules to account page and set sort order on them without doing anything other than uploading and turning on in admin. The very first mod I did in that loaded build example was to add a "Log Off" link into the account page. You are correct that it is hard(er) to give the page some style, but as it is a bunch of ul and li links, that should not be super-difficult to achieve. Link to comment Share on other sites More sharing options...
♥Tsimi Posted October 17, 2015 Author Share Posted October 17, 2015 You are right you can "add" new modules to the page. Example, i don't need the product notification part and i would like to have the My Orders block first at the top. How do you achive that in its current state without touching core code? Right now you can't even deactivate the contents of that page. Then design wise or layout wouldn't it be more convenient to simply uninstall/deactivate the stock files then just drop a new fileset inside and activate it. I don't try to convince you to add it to the core just try to show that there are other ways, newer ways to code that page. The package is here available for anyone to take if they like to. Link to comment Share on other sites More sharing options...
burt Posted October 17, 2015 Share Posted October 17, 2015 Make a CM module that removes the contents you want to remove? Should be doable, why not ? Throughout osCommerce there are examples of things where if one looks deeper than face-value, one would maybe think "wow cool". This example of a page that is modular without modules is an example of such. Imagine applying this concept to the info pages (shipping, conditions etc) ... 1 page, multi pages: info.php?page=shipping There are other areas in osCommerce where things have been done in the hope that developers (and shopowners) might look deeper ... Anyway, if people want to use your system: :thumbsup: Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.