Jump to content

Recommended Posts

(this *should* be simple ... )

 

In shopping_cart.php, I have several buttons:

 

 

 

I would like to move the 'Continue Shopping' button to the left side. I've tried:

 float: left

 text-align: left

 pull-left

 

but nothing is working for me. Here's the unaltered code:

  <div class="buttonSet">
    <span class="buttonAction">
        <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#quotesModal">
          <?php echo GET_QUOTES; ?>
        </button>
    </span>
  </div>

  <div class="buttonSet">
    <span class="buttonAction">

<?php
          $back = sizeof($navigation->path)-2;
          if (isset($navigation->path[$back])) {
            echo tep_draw_button(IMAGE_BUTTON_CONTINUE_SHOPPING, 'glyphicon-chevron-left', tep_href_link($navigation->path[$back]['page'], tep_array_to_string($navigation->path[$back]['get'], array('action')), $navigation->path[$back]['mode']), 'primary', NULL, 'btn-success') . " " ;
          }
?>

          <?php echo tep_draw_right_button(IMAGE_BUTTON_CHECKOUT, 'glyphicon-chevron-right', tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'), 'primary', NULL, 'btn-success'); ?>

    </span>
  </div>

Thanks!

 

Malcolm

 


Get the latest Responsive osCommerce CE (community edition) here .

Share this post


Link to post
Share on other sites

Hi

 

If you want your buttons in one line put them into ONE div not into two.

<div class="buttonSet">
    <span class="pull-right">
        <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#quotesModal">
          <?php echo GET_QUOTES; ?>
        </button>
    </span>


    <span class="pull-left">

<?php
          $back = sizeof($navigation->path)-2;
          if (isset($navigation->path[$back])) {
            echo tep_draw_button(IMAGE_BUTTON_CONTINUE_SHOPPING, 'glyphicon-chevron-left', tep_href_link($navigation->path[$back]['page'], tep_array_to_string($navigation->path[$back]['get'], array('action')), $navigation->path[$back]['mode']), 'primary', NULL, 'btn-success') . " " ;
          }
?>

          <?php echo tep_draw_button(IMAGE_BUTTON_CHECKOUT, 'glyphicon-chevron-right', tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'), 'primary', NULL, 'btn-success'); ?>

    </span>
  </div>

You can align the buttons as you want by adding <span class= "pull-right"(pull-left")> instead of <span class="buttonAction"> which has - if I remember well - no more definitions in BS (as well as buttonSet). It seems to be nothing but a relict from standard osc. :-

 

J.J.

 

PS. I don't know what your "tep_draw_right_button" means!? :unsure:

Edited by De Dokta

Share this post


Link to post
Share on other sites

Thank you. I obviously was not clear with my question.

 

When compared to the screen shot shown above, I want the "Get your shipping costs" button to stay where it is, on it's own line. Below that, I want the 'Continue Shopping" button slid to the left, and the "Checkout" button slid to the right, like this:

 

 

 

 

PS. I don't know what your "tep_draw_right_button" means!? :unsure:

 

tep_draw_button puts the icon to the left of the text within the button. In the 'Checkout' button, I wanted the icon to be to the right of the text, so I copied tep_draw_button, renamed it to tep_draw_right_button, and revised the display order to put the icon on the right.

 

Malcolm


Get the latest Responsive osCommerce CE (community edition) here .

Share this post


Link to post
Share on other sites

@@ArtcoInc
 
In two lines it should be something like that:
 

<div class="buttonSet">
    <span class="buttonAction">
        <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#quotesModal">
          <?php echo GET_QUOTES; ?>
        </button>
    </span>
  </div>

<div class="buttonSet">
 
<?php
          $back = sizeof($navigation->path)-2;
          if (isset($navigation->path[$back])) {
            echo '<span class="pull-left">' . tep_draw_button(IMAGE_BUTTON_CONTINUE_SHOPPING, 'glyphicon-chevron-left', tep_href_link($navigation->path[$back]['page'], tep_array_to_string($navigation->path[$back]['get'], array('action')), $navigation->path[$back]['mode']), 'primary', NULL, 'btn-success') . '</span>';
          }
?>
          <span class="pull-right"><?php echo tep_draw_right_button(IMAGE_BUTTON_CHECKOUT, 'glyphicon-chevron-right', tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'), 'primary', NULL, 'btn-success'); ?>
    </span>
  </div>  

J.J.

 

Share this post


Link to post
Share on other sites

Almost exactly the same scenario was covered yesterday in @@grandpaj post.

 

Use the grid system.

 

<div class="row">
  <div class="col-sm-6">continue button</div>
  <div class="col-sm-6 pull-right">checkout button</div>
</div>

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

Yes, I block my buttons so it didn't show for me :(

 

for those who dont btn-block, this looks good:

 

<div class="row">
  <div class="col-sm-6">button</div>
  <div class="col-sm-6 text-right-not-xs">button</div>
</div>
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

It's something not in core bootstrap - as I recall I got really annoyed at not being able to do something in LG and something else in (say) SM. So I went on the hunt and found that from https://github.com/twbs/bootstrap/issues/11292

 

It really should be included in core BS in my opinion


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

Yes, I block my buttons so it didn't show for me :(

 

for those who dont btn-block, this looks good:

 

<div class="row">
  <div class="col-sm-6">button</div>
  <div class="col-sm-6 text-right-not-xs">button</div>
</div>

 

 

 

Hi 

 

i tried this and on computer it looks okay.

 

on iphone it doest as shown in the  image

 

http://pasteboard.co/KCdWf1.jpg

 

 

any idea how i can fix this

 

regards

 

nafri

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

×