BV Commerce Forum
»
BV Commerce Support
»
General Support
»
384: OPEN - Feature request: Hide shipping on all pages.
Rank: Member
Joined: 10/17/2006(UTC) Posts: 66
|
It would be cool if there were an option to hide shipping on checkout pages. I currently do this via THEME style sheet, but the code is not well designed for this, because the shipping info is not in a DIV. Currently, there is this in the one page checkout: Code: <h2>Shipping</h2> <uc7:Shipping ID="Shipping" runat="server" TabIndex="2200" /> <uc6:GiftCertificates ID="GiftCertificates1" runat="server" TabIndex="2600" ShowTitle="true" />
See that <h2> tag? Why isn't it in the UC7? Like the GiftCertificate header, so that the header is hidden if there is no shipping on the store? Every time I get a patch, I have to add the following, so that my theme hides the SHIPPING: Code: <div class="shipping"> <h2>Shipping</h2> <uc7:Shipping ID="Shipping" runat="server" TabIndex="2200" /> </div>
It is a pain the but when I get the Service pack, because I have to fix all my minor changes to the ASPX files. If the HTML is improved to have DIVs with unique classes around sections of the HTML, I'll be able to do more via CSS. :) It'd be great if i NEVER had to change the ASPX files (I know this is probably your goal).
|
|
|
|
Rank: Member
Joined: 3/1/2006(UTC) Posts: 1,142
|
Well, this is certainly a change we can make, but it will have to be in a future service pack or point release. |
Justin Etheredge Senior Software Engineer BVSoftware |
|
|
|
Rank: Member
Joined: 4/4/2004(UTC) Posts: 670
|
i think the answer is not to add extra and unneccesary <div> tags. I think it would be better to change <h2 class="hide"> and .hide {display:none} to your stylesheet.
Look at Araxis Merge or similar utilities for merging updates into your project and for comparing changes between sets of files.
Scott Mech
|
|
|
|
Rank: Member
Joined: 10/17/2006(UTC) Posts: 66
|
Quote: i think the answer is not to add extra and unneccesary <div> tags. I think it would be better to change <h2 class="hide"> and .hide {display:none} to your stylesheet.
I disagree. There are lots of H2 tags on that page that I do want. I just want to hide the section for for shipping. So, I need a named DIV (or something unique). It would be good if all the pages used the same DIVs. That said, there are lots of ways to skin this cat. The goal should be, however, to make changes only to the the THEME and the database configuration -- not lots of changes to the ASPX files. This will make future upgrades and SP's easier. -- Jorge.
|
|
|
|
Rank: Member
Joined: 3/1/2006(UTC) Posts: 1,142
|
if we fixed it we would most likely move the <h2> inside of the shipping control and then add a class name to the user control. Since when the user control renders it has a container tag, we might as well just add the class to this. I will have to do some checking though to make sure that there isn't a reason that we had the <h2> tag outside of that user control.
And also, I'm going to have to agree that while adding unnecessary divs is not good, this is an instance where a div is warranted since we are using it to group the header with the user control, which is the point of a div, to create a division (or section) of the page. In this instance though the user control is already wrapped in a div when it is rendered, so the class will probably just be added to that. |
Justin Etheredge Senior Software Engineer BVSoftware |
|
|
|
Rank: Member
Joined: 5/24/2004(UTC) Posts: 4,147
|
Scott, appropriately classed DIVs are necessary due to the cascading nature of CSS, and don't hurt a thing if they aren't used. What you are suggesting is more of a hack than a usable feature, in this case, and wouldn't be a semantically correct solution.
In this case I would recommend using FIELDSETs and LEGENDs instead of DIVs and H2s, however.
A lot of BVC5 modules don't contain the correct tags for their layout, so it's difficult to do much to them without customizing the code, at this point. |
|
|
|
|
Rank: Member
Joined: 4/4/2004(UTC) Posts: 670
|
Cliff, I haven't reviewed the pagesource in question. I haven't seen the page or its layout. with that being said one could argue that a wrapper div is not semantically correct. if the <div> is necessary, then it should be there. if it is not necessary, then it shouldn't be there.
>> A lot of BVC5 modules don't contain the correct tags for their layout, so it's difficult to do much to them without customizing the code, at this point. until what point? is this a hint of something to come?
> > I just want to hide the section for for shipping.
Jorge, the idea I proposed would do just that for you. It would not hide the remaining H2s or alter their formatting.
Scott Mech
|
|
|
|
Rank: Member
Joined: 5/24/2004(UTC) Posts: 4,147
|
For the sake of building themes in BVC5, they are usually necessary. Perhaps semantic wasn't the most appropriate word, but using divisions to separate sections or objects, even if not seen on the page, is semantic in my opinion.
>> until what point? is this a hint of something to come? Until the point when BV updates them. :) I can't start a Fresh Start theme, or other publicly available themes, until they are updated unless I include my own versions of corrected modules with the theme. I'm working on a list.
Your solution would only hide the H2 title, not the shipping section. If you do just want to hide the H2, then .shipping h2 { display: none; } is more appropriate than using the hide class on the page.
The idea is to make a page work without styles, then add additional tags, such as DIVs, necessary to control the page under the majority of theme scenarios. This way you can create print, screen, handheld and other stylesheets that are effective.
Jorge, keep a backup of your BVModules modifications, just as if you were backing up a theme, since themes are technically part of the modules system. I'm going to try to pull off some updated modules soon, and will make them available if I can. |
|
|
|
|
Rank: Member
Joined: 11/5/2003(UTC) Posts: 2,136
Was thanked: 1 time(s) in 1 post(s)
|
Cliff,
When fields are related like this, should they be in a fieldset instead of a div? It seems like screen readers would be able to make more sense of it.
<fieldset class="shipping"> <legend title="Please select your preferred shipping service">Shipping</legend> <uc7:Shipping ID="Shipping" runat="server" TabIndex="2200" /> </fieldset>
I could still hide it with .shipping {display: none}. |
|
|
|
|
Rank: Member
Joined: 4/4/2004(UTC) Posts: 670
|
Cliff,
oops.... I read the post to mean literally "shipping" like the word "shipping". reinforced by >>See that <h2> tag?
silly me. your correct.
Scott
|
|
|
|
Rank: Member
Joined: 5/24/2004(UTC) Posts: 4,147
|
Originally Posted by: "Andy Miller" Cliff,
When fields are related like this, should they be in a fieldset instead of a div? It seems like screen readers would be able to make more sense of it.
<fieldset class="shipping"> <legend title="Please select your preferred shipping service">Shipping</legend> <uc7:Shipping ID="Shipping" runat="server" TabIndex="2200" /> </fieldset>
I could still hide it with .shipping {display: none}. Yeah, that's exactly what I'm suggesting. Using the title is even better. I would think that'd be the way to go. Originally Posted by: "Cliff" In this case I would recommend using FIELDSETs and LEGENDs instead of DIVs and H2s, however. Scott, I can't count the times I've done that here. :) |
|
|
|
|
Rank: Member
Joined: 4/4/2004(UTC) Posts: 670
|
Cliff, you cant count the times you've been correct here? or that you've misinterpeted what was posted?
;)
Scott Mech
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.