beerbee Posted March 22, 2017 Share Posted March 22, 2017 Hi, for me it was a bit annoying, when I as customer wanted just to change shipping or payment address in the checkout process, I had always to scroll over the whole form for a new address so I made the form collapse. So in checkout_shipping_address.php what looked like: <h2><?php echo TABLE_HEADING_NEW_SHIPPING_ADDRESS; ?></h2> <div class="alert alert-info"><?php echo TEXT_CREATE_NEW_SHIPPING_ADDRESS; ?></div> <?php require('includes/modules/checkout_new_address.php'); ?> looks now like this <h2><?php echo TABLE_HEADING_NEW_SHIPPING_ADDRESS; ?></h2> <div class="alert alert-info" data-toggle="collapse" data-target="#newshippingadress" aria-expanded="false" aria-controls="newshippingadress"><span role="button"><i class="fa fa-address-book-o" ></i> <i class="fa fa-hand-o-down" aria-hidden="true"></i> <?php echo TEXT_CREATE_NEW_SHIPPING_ADDRESS; ?> </span></div> <div class="collapse" id="newshippingadress"> <?php require('includes/modules/checkout_new_address.php'); ?> </div> I think I'm keeping it. Best regards Christoph Link to comment Share on other sites More sharing options...
♥John W Posted March 23, 2017 Share Posted March 23, 2017 I like it and definitely see some benefit. One thought is you need to explain how to get that form to expand because some people will not understand to click on the blue box. Basically, it just needs text changed. I'm not really a dog. Link to comment Share on other sites More sharing options...
beerbee Posted March 23, 2017 Author Share Posted March 23, 2017 Hi John W., I thought the hand symbol and span button could be enough, but you are right a little bit of text would be nice too. Best regards Christoph Link to comment Share on other sites More sharing options...
♥John W Posted March 23, 2017 Share Posted March 23, 2017 I have found that when I made somelthing idiot proof, the world made better idiots. I'm not really a dog. Link to comment Share on other sites More sharing options...
Dan Cole Posted March 23, 2017 Share Posted March 23, 2017 @@beerbee Can it be done with a hook Christoph so you're not changing the core? Dan Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
beerbee Posted March 24, 2017 Author Share Posted March 24, 2017 @@Dan Cole sadly not for now, I'm just trying to understand how hooks work and would be happy to do so soon. From what I understand now one can add and extend functionalities but how to replace parts of pages? Or have I simply overlooked something? I've got the impression that in those cases modularized pages come into play, but again i might be totally wrong. Best regards Christoph Link to comment Share on other sites More sharing options...
beerbee Posted March 24, 2017 Author Share Posted March 24, 2017 @@John W I think even only underscoring the words this form to make it look linkalike could do. Another little thing I'd like to change additionally is making the selection of existing addresses easier on touchscreens by putting label there, so this is more a question than a suggestion. Are there more elegant ways (I'm pretty shure there are) to do it like this? from this: <div class="col-sm-4"> <div class="panel panel-<?php echo ($addresses['address_book_id'] == $sendto) ? 'primary' : 'default'; ?>"> <div class="panel-heading"><?php echo tep_output_string_protected($addresses['firstname'] . ' ' . $addresses['lastname']); ?></strong></div> <div class="panel-body"> <?php echo tep_address_format($format_id, $addresses, true, ' ', '<br />'); ?> </div> <div class="panel-footer text-center"><?php echo tep_draw_radio_field('address', $addresses['address_book_id'], ($addresses['address_book_id'] == $sendto)); ?></div> </div> </div> to that: <div > <label class="col-sm-4" style="font-weight:normal;" > <div class="panel panel-<?php echo ($addresses['address_book_id'] == $sendto) ? 'primary' : 'default'; ?>"></label> <div class="panel-heading"><?php echo tep_output_string_protected($addresses['firstname'] . ' ' . $addresses['lastname']); ?></strong></div> <div class="panel-body"> <?php echo tep_address_format($format_id, $addresses, true, ' ', '<br />'); ?> </div> <div class="panel-footer text-center"><?php echo tep_draw_radio_field('address', $addresses['address_book_id'], ($addresses['address_book_id'] == $sendto)); ?></div> </div> </div> font-weight:normal because label seems to make text bold. I couldn't find much info about labels used to extend selection areas. I really don't want to encourage anyone to change core, so I hope I might be able get this little things done in way without having to do so. Best regards Christoph Link to comment Share on other sites More sharing options...
♥John W Posted March 24, 2017 Share Posted March 24, 2017 I'm not sure if I understand your question. Using "style" isn't the best way to format. There's a ton of existing css classes with Bootstrap or you can add one to user.css. But, I don't think label is correctly used here either. What exactly are you trying to make bolder? Check out this section on Bootstrap http://getbootstrap.com/css/#type I'm not really a dog. Link to comment Share on other sites More sharing options...
Dan Cole Posted March 24, 2017 Share Posted March 24, 2017 @@Dan Cole sadly not for now, I'm just trying to understand how hooks work and would be happy to do so soon. From what I understand now one can add and extend functionalities but how to replace parts of pages? Or have I simply overlooked something? I've got the impression that in those cases modularized pages come into play, but again i might be totally wrong. Best regards Christoph I haven't looked at what you're doing but I'm sure if you tackle it in a manner that doesn't require core changes and get stuck, that others will pitch in and help so we're all learning and moving the project forward. IMO, we need to move in that direction in making any changes and if there are obstacles to doing so, we need to find ways to overcome them. Changing the core should be discouraged. Just my 2 cents....no for us Canadians make that, my nickels worth. Dan Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
beerbee Posted March 24, 2017 Author Share Posted March 24, 2017 @@John W I know style is not a great idea should be in user css. With it I wanted to and did achieve that it isn't bold, it became all bold because of the label I introduced here. The effect of the label is that it is enough to touch the adress field to make it selected. But maybe this could be achieved in a better way. Best regards Christoph Link to comment Share on other sites More sharing options...
♥John W Posted March 24, 2017 Share Posted March 24, 2017 I just realized there's a closing "</strong> tag that doesn't have an opening tag. On that line you could add the opening tag <div class="panel-heading"><?php echo tep_output_string_protected($addresses['firstname'] . ' ' . $addresses['lastname']); ?></strong></div> But you can add the panel title tag with a heading tag like this. <div class="panel-heading"> <h3 class="panel-title"><?php echo tep_output_string_protected($addresses['firstname'] . ' ' . $addresses['lastname']); ?></h3> </div> I'm not really a dog. Link to comment Share on other sites More sharing options...
beerbee Posted March 24, 2017 Author Share Posted March 24, 2017 This closing strong tag without opening is as found in my download of edge from January 17. So it seems to be core ;-). If I return to the original there is nothing bold in the address data, that's the way I wanted it to be again after I noticed that label was turning everything there to bold. Best regards Christoph Link to comment Share on other sites More sharing options...
♥John W Posted March 24, 2017 Share Posted March 24, 2017 Yes, I realize the closing strong is in the core, but one way or another it's a mistake in the core, which happens. I meant to post with the strong like below. <div class="panel-heading"><strong><?php echo tep_output_string_protected($addresses['firstname'] . ' ' . $addresses['lastname']); ?></strong></div> The second one above is how it seems Bootstrap recomends doing it. I hadn't really paid attention to this until you pointed it out. I'm not really a dog. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.