Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

@Dan Cole,

https://www.oscommerce.com/forums/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__));

 

Link to comment
Share on other sites

  • Replies 213
  • Created
  • Last Reply

slash was missing before "templates". This one is the good one:

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

 

Link to comment
Share on other sites

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:

Link to comment
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).

Link to comment
Share on other sites

@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)

Link to comment
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.

Link to comment
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  

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

other point:

Latest template files (product info) have copyright header like all other files.

I guess we should add it too and update the copyright year in all files to 2018.

Link to comment
Share on other sites

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.
Link to comment
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

Link to comment
Share on other sites

1 hour ago, burt said:

 

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

This.

It's what I understand here

Link to comment
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

Link to comment
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...

Link to comment
Share on other sites

This is also ok then?

50 minutes ago, raiwa said:

move the content container div into each module (would be repeated, is this clean?)

 

Link to comment
Share on other sites

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');
?>

 

Link to comment
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?

Link to comment
Share on other sites

Link to comment
Share on other sites

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 ?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

@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.

 

 

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...