Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

  • Replies 213
  • Created
  • Last Reply
Link to comment
Share on other sites

@burt, @Dan Cole, @piernas,

checkout shipping_address.php (and checkout_payment_address.php, checkout_confirmation.php):

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

<?php
  if ($messageStack->size('checkout_address') > 0) {
    echo $messageStack->output('checkout_address');
  }
?>

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

<div class="contentContainer">

  <div class="row">
    <?php echo $oscTemplate->getContent('checkout_shipping_address'); ?>
  </div>

Message stack module or leave in main file? If module, should this be styled like the following in checkout_payment.php?

for checkout_payment.php it seems clear that it should be moved into module:

<?php echo tep_draw_form('checkout_payment', tep_href_link('checkout_confirmation.php', '', 'SSL'), 'post', 'class="form-horizontal" onsubmit="return check_form();"', true); ?>

<div class="contentContainer">

<?php
  if (isset($_GET['payment_error']) && is_object(${$_GET['payment_error']}) && ($error = ${$_GET['payment_error']}->get_error())) {
?>

  <div class="contentText">
    <?php echo '<strong>' . tep_output_string_protected($error['title']) . '</strong>'; ?>

    <p class="messageStackError"><?php echo tep_output_string_protected($error['error']); ?></p>
  </div>

<?php
  }
?>

  <div class="row">
    <?php echo $oscTemplate->getContent('checkout_payment'); ?>
  </div>

 

Link to comment
Share on other sites

There are certain scenarios where a clearfix div is required, but it is based on how the shopowner lays out the content of the page, take this;

<div class="row">
    <div class="col-sm-4" style="background-color:#aaa;">Product Description<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br></div>
    <div class="col-sm-8" style="background-color:#eee;">Product Images<br><br><br><br><br><br><br><br><br></div>    
    <div class="col-sm-6" style="background-color:#ddd;">Review Button</div>
    <div class="col-sm-6" style="background-color:#ccc;">Buy Button</div>
  </div>

which approximates a product_info layout [description - images <br> review button - buy button].

You would expect (it being a gridded layout) to looking like this:

11111.gif.9ab0388c607487b34d24c328a2db0fcb.gif

Whereas, in fact, because the shopowner is laying out it a bit strange...it actually ends up looking like this:

22222.gif.55a8c982923b712f01abc9904e5e71f4.gif

To solve it, needs a clearfix div at one of two points;

1.  after the images div
or
2. before the review button div

With a clearfix in place, everything lays out as per the first mockup.

So, how to make sure that shopowners can lay things out as they want?

We could add in a "true/false" selector [default: false] on every module to say add in a clearfix div.
Then add <div class="clearfix"></div> into each template if set to true.

Or

We could just tell shopowners to manually amend template file if their desired layout looks weird

 

Link to comment
Share on other sites

@burt Gary...is this something that is likely to happen with some frequency or one of those once in a blue moon type things?  I guess I'm wondering how big of an issue it is likely to be.  

Dan

Link to comment
Share on other sites

I believe if somenone modifies a module in this way:

<div class="col-sm-4" style="background-color:#aaa;">Product Description<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br></div>

then he should add himself whatever is needed to show the page as he pretends.

Link to comment
Share on other sites

@raiwa this is just an example, imagine the br's is instead a product description.

@Dan Cole it can happen...imagine;

product description module set to "6" width
image gallery set to "6" width

If these two end up being different height, the next module ****if it is set to "6" width or smaller**** would end up being place directly underneath the shortest of the description or image div.  Have a play, and you will see what I mean.

As a quick fix while I was coding the modular product page, I threw this into the reviews button template;
https://github.com/gburton/Responsive-osCommerce/blob/master/includes/modules/content/product_info/templates/tpl_cm_pi_review_button.php#L1
that really is a quick and dirty hack, and does not work if (eg) the shopowner wants the BUY button (6 wide, left) and the REVIEW button (6 wide, right).  In this case the shopowner would need to amend those two template files.  That needs to be chnged, but ... to what...is the question.

So, we do need to be at least aware that clearfix's have a job to do and should be sometimes used.  Is it easier to add this into each module as a true/false, or is it easier to simply let shopowners know to amend template manually (when they ask why their grid is misaligned).

From the start of the porject, I've expected shopowners to manually amend template files - to add in breakpoints for (eg) MD LG XS etc.  Throughout the code we concentrate 99% on SM size and ignore the rest.  I have not yet seen any indepth questions from shopowners about MD,LG,XL etc.

Link to comment
Share on other sites

OK, I think there are many cases where changing sort order and/or module width breaks a nice layout.

Other examples:

  • moving step wizard up on another place, sticks the continue buttons to the footer => no separation
  • moving modules which have a <hr> on top beside another which has no <hr> looks ugly.
  • moving modules which have a header title beside another which has no header title misalignes the top borders.
  • .......

it's impossible to address all cases;

ergo: store owners have to do something to fiddle modules together for their own design

Link to comment
Share on other sites

Make them work out of the box, which most people downloading osCommerce will leave as is.

Have some instructions somewhere (in the documentation?) explaining cleardivs.

osCommerce user since 2003! :thumbsup:

Link to comment
Share on other sites

@burt, @Dan Cole, @piernas,

Working on the back button module for checkout shipping address, I found that this button shows in core under the step wizard:

(back button shows only on submit validation error)

image.thumb.png.a356d7b7457dbad863c718aa74150822.png

I guess it's better to reorder the modules and show it nice in the same line together with the continue button.

And to make things easier, I'll just add this button to the continue button module :wink::sleep:

Link to comment
Share on other sites

All Modules DONE :smile:

To do:

  1. doubts/to decide:
  • address block in checkout_shipping/payment: 1 or 3 modules (my vote 1, leave as is)
  • shipping/payment address block in checkout_confirmation: 1 or 4 modules (my vote 1, leave as is)

5. Final tests:

 

  1. fork complete branch from Gary's master or Modularity3? branch:
  • add install/configuration sql for all modules to install/oscommerce.sql

 

7.   pull request to Gary's master or Modularity3? branch 

Link to comment
Share on other sites

6 hours ago, frankl said:

Have some instructions somewhere (in the documentation?) explaining cleardivs.

Smart $#$ alert.   :biggrin:

We could use the forums for this.

Dan

 

Link to comment
Share on other sites

2 hours ago, raiwa said:

I guess it's better to reorder the modules and show it nice in the same line together with the continue button.

And to make things easier, I'll just add this button to the continue button module :wink::sleep:

FWIW, I agree.

Dan

Link to comment
Share on other sites

1 hour ago, raiwa said:
  1. doubts/to decide:
  • address block in checkout_shipping/payment: 1 or 3 modules (my vote 1, leave as is)
  • shipping/payment address block in checkout_confirmation: 1 or 4 modules (my vote 1, leave as is)

I'm of the opposite view but I think we agreed to leave it as is, as far as our project was concerned.

Dan

Link to comment
Share on other sites

@raiwa

(First impressions after only a very brief testing ...)

1) Is there some way to install all of the modules all at once (assuming, of course, that one accepts the default settings)? Installing 31 modules takes a while :unsure:

2) I seem to remember you all discussing if the Page Heading should be modularized. I'll ask the same thing about the Step Wizard. Where would someone want it on in some pages, but not in others? Likewise, where would someone like it with a different sort order on different pages? Just asking ...

3) Maybe I did something wrong, but the Step Wizard does not seem to advance in the Checkout_Payment page. It is fine in both the Checkout_Shipping page and the Checkout_Confirmation page.

4) Again, I may be missing something, but didn't you say you were going to add a Back button? Is this supposed to be on ALL of the pages?

Link to comment
Share on other sites

2 hours ago, ArtcoInc said:

3) Maybe I did something wrong, but the Step Wizard does not seem to advance in the Checkout_Payment page. It is fine in both the Checkout_Shipping page and the Checkout_Confirmation page.

I'll take a peek at this...I might have taken it from the wrong file.

Dan

Link to comment
Share on other sites

@ArtcoInc

30 minutes ago, Dan Cole said:

I might have taken it from the wrong file.

Malcolm that is exactly what I did....try this fix.  Thanks for the report. :thumbsup:

checkout_payment stepwizard update

Dan

Link to comment
Share on other sites

3 hours ago, ArtcoInc said:

1) Is there some way to install all of the modules all at once (assuming, of course, that one accepts the default settings)? Installing 31 modules takes a while :unsure:

If you think that takes awhile you should try creating them. :laugh: Rainer did a yeomen's job.  :thumbsup:

If I understand the plan correctly, these modules should end up as part of the core and be installed by default.

Dan

Link to comment
Share on other sites

3 hours ago, ArtcoInc said:

2) I seem to remember you all discussing if the Page Heading should be modularized. I'll ask the same thing about the Step Wizard. Where would someone want it on in some pages, but not in others? Likewise, where would someone like it with a different sort order on different pages? Just asking ...

You're right Malcolm, you probably wouldn't want it on some pages and not others, or indeed, in a different sort order on some pages and not others but you might want to move it to the top of the page instead of the bottom, or perhaps you might want to add a whole different stepwizard style.  The beauty of having a modular design.

Dan 

Link to comment
Share on other sites

@Dan Cole

2 minutes ago, Dan Cole said:

You're right Malcolm, you probably wouldn't want it on some pages and not others, or indeed, in a different sort order on some pages and not others but you might want to move it to the top of the page instead of the bottom, or perhaps you might want to add a whole different stepwizard style.  The beauty of having a modular design.

I agree completely ... top or bottom of the page (I've moved it to the top of the page in one of my stores), or being able to substitute an entirely different one. This type of modularity is important. I just think that it just seems nit-picky to have to set it in five different places (then again, one could also argue the same about the Page Heading. Set it and forget it <g>).

Malcolm

(off to enjoy an adult beverage and his evening)

Link to comment
Share on other sites

15 minutes ago, ArtcoInc said:

@Dan Cole

I agree completely ... top or bottom of the page (I've moved it to the top of the page in one of my stores), or being able to substitute an entirely different one. This type of modularity is important. I just think that it just seems nit-picky to have to set it in five different places (then again, one could also argue the same about the Page Heading. Set it and forget it <g>).

Step Wizard - maybe should be allowed to show on BOTH top and bottom of the page like the pagnation numbers?

Eddy

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...