Jump to content
Latest News: (loading..)

Recommended Posts

@Dan Cole,

https://forums.oscommerce.com/topic/412708-path-to-final/?do=findComment&comment=1768294

and following posts by @burt,

then lets do this:

 include('includes/modules/content/' . $this->group . 'templates/tpl_' . basename(__FILE__));

 

Share this post


Link to post
Share on other sites

@raiwa forum didn't notify me about this topic for any reason. Will take a look and see what you're after :thumbsup:

Share this post


Link to post
Share on other sites
Posted (edited)

Hello Juanma @piernas,

great that you decided to guve a help.

I added you to the collaborators list, so you can edit the readme file and self assign modules.

You can also push and merge your modules.

Please take in consideration the following:

  • sort order like already defined in the readme file
  • unique css selectors in template files, see examples
  • new filenames for template files, see examples "comments" and "button" modules
  • new code to call the template files, see examples "comments" and "button" modules

Thanks a lot :smile::thumbsup:

Edited by raiwa

Share this post


Link to post
Share on other sites

Great, thank you. Will guarantee this goes into Core when you guys are ready to push it.

We can also revisit the modular Cart (I will open a new discussion for that one in the next days).


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 current code (community-supported responsive 2.3.4.1BS Edge) here

 

Share this post


Link to post
Share on other sites
Posted (edited)

@Dan Cole, @burt, @piernas,

I began to work on the shipping address modules.

There should be 3 modules to be flexible: title, text with change address button and the address block itself.

On the other side I saw that in checkout success and modular shopping cart the page header was left in the main page file.

So I see these possibilities:

  • leave the page header in main page file yes/no

 

  • do 3 shipping address modules
    or
  • leave the shipping address parts together in one module.

 

your opinion

(same for checkout payment address)

Edited by raiwa

Share this post


Link to post
Share on other sites
10 minutes ago, raiwa said:
  • leave the page header in main page file yes/no

Make it modular.  I'll be doing that next for the already modular pages (where the title is still hardcoded).

10 minutes ago, raiwa said:
  • leave the shipping address parts together in one module.

This.

Remember that when a page is gone modular...
if the shopowner want to do something different...he can ... by just turning off, coding up a module to better fit his needs, turning on again.


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 current code (community-supported responsive 2.3.4.1BS Edge) here

 

Share this post


Link to post
Share on other sites

I don't have a strong opinion on this, one way or the another, but I would lean towards having the flexibility to control the different components....I can see shop owners not wanting to use all three shipping address, as an example, or wanting to add something before the page header.   

Dan  

Share this post


Link to post
Share on other sites
57 minutes ago, raiwa said:

I agree and go for Gary's suggestion. Split off the shipping address into 3 modules would be too "granular". Anway, template files can be edited.

I'm not sure Gary was saying that and if I had to pick between the two I would favour making the shipping address modular as opposed to the page header but as I stated in my response I can live with either. 

Dan

Share this post


Link to post
Share on other sites

Ahhh....I see....I thought he was simply quoting your message.  In any case I would still lean towards separating it but in any case that can always be done later.

Dan

Share this post


Link to post
Share on other sites
39 minutes ago, raiwa said:

Page header:

  • create a second content group for the page header
    or
  • move the content container div into each module (would be repeated, is this clean?)
    and
  • accept that the page header is inside the form.

Inside the Form.  Does not matter...
Have a look at: https://github.com/gburton/Responsive-osCommerce/commit/6cc52e33a327de6dae3ac00c42afb9d28822b8d6

Keep it simple...


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 current code (community-supported responsive 2.3.4.1BS Edge) here

 

Share this post


Link to post
Share on other sites
Posted (edited)
11 minutes ago, raiwa said:

This is also ok then?

I'm not sure what your plan is on that...

IMO, there should be just one contentContainer div per getContent call (usually one getContent per page)
eg 

https://github.com/gburton/Responsive-osCommerce/blob/master/product_info.php#L29-L35

 

 

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 current code (community-supported responsive 2.3.4.1BS Edge) here

 

Share this post


Link to post
Share on other sites
Posted (edited)

If we use only one content call, and there should be only one contentContainer div, the page header would be inside the contentContainer div:

  require('includes/template_top.php');
?>

<?php echo tep_draw_form('checkout_address', tep_href_link('checkout_shipping.php', '', 'SSL'), 'post', 'class="form-horizontal"', true) . tep_draw_hidden_field('action', 'process'); ?>

<div class="contentContainer">

  <div class="row">
    <?php echo $oscTemplate->getContent......and inside:
    
    				- page header module
    				- shipping address module
						....
    				- step wizard module
    
  </div>
  
</div>

</form>

<?php
  require('includes/template_bottom.php');
  require('includes/application_bottom.php');
?>

 

Edited by raiwa

Share this post


Link to post
Share on other sites
2 hours ago, raiwa said:

If we use only one content call, and there should be only one contentContainer div, the page header would be inside the contentContainer div

That is correct.  The "title" module with the <h1 would be inside contentContainer...

Do you foresee any problems having it like this?


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 current code (community-supported responsive 2.3.4.1BS Edge) here

 

Share this post


Link to post
Share on other sites
Posted (edited)

I don't know why the title was left outside of the modular stuff (prior to Community Version), eg at checkout_success or account. 

Probably just because HPDL considered it unimportant, I guess.
And I just followed suit in the Community Version.

If we go with this;

<div class="contentContainer">
  <div class="row">
    getContent
  </div>
</div>

And have all the pages modules controlled by that getContent...I think we are on the right track.  I need to investigate if it is better to call the getContent directly (as is done in (eg) product_info.php) or to call it as a variable (as is done in (eg) checkout_success.php).  What is your thought on that ?

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 current code (community-supported responsive 2.3.4.1BS Edge) here

 

Share this post


Link to post
Share on other sites
Posted (edited)
27 minutes ago, burt said:

  I need to investigate if it is better to call the getContent directly (as is done in (eg) product_info.php) or to call it as a variable (as is done in (eg) checkout_success.php).  What is your thought on that ?

I do not see any difference. I can't imagine any need to manipulate the variable between the definition and the content call.

I just checked in 2.3.4 standard:

- checkout success: variable

- account: directly

- login: variable

directly maybe easier to read and follow up the naming

Edited by raiwa

Share this post


Link to post
Share on other sites
Posted (edited)

@raiwa sorry for the delay; it's been a hard week and couldn't find free time until now. As far as I can see you've done almost all the work already. Will take a deeper look at what you've done and what's still not.

About the questions asked:

I agree I would put the title with the content. This allows to format or change it easily (if needed) in the module template (for example you could make a template for the title that uses only half of the row and fill the rest of it with an image,  use a different style, place an icon before title...).

I don't think the variable/direct echo matters. If the philosophy is not to touch the page at all and just place modules on it, can't imagine a way to modify the variable from PHP once it's generated; anyway would be good to use a standard and for some reason it looks more elegant to me using the variable and then output its content.

 

 

 

Edited by piernas

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

×