Jump to content

Recommended Posts

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.php
cm_account_sage_pay_cards.php
cm_account_set_password.php
cm_account_stripe_cards.php

those 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
 

Share this post


Link to post
Share on other sites

Not sure about it @@Tsimi 

 

The account page is already modular, no ?

Drop in a new module, turn it on in admin ... done


This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest Responsive osCommerce CE (community edition) here

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.


This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest Responsive osCommerce CE (community edition) here

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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:

Edited by burt

This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest Responsive osCommerce CE (community edition) here

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×