Jump to content
Latest News: (loading..)
greasemonkey

2.3.4 BS GOLD Sticky Add To Cart Content Module

Recommended Posts

@@greasemonkey - it's a really good idea...

Problems to think about;

1. products with options/attribs
Viewer might be way down the page, having not selected the options/attribs he wants to buy. If he presses buy button, default attribs are added to cart.
Possible Solution: enforce "please select" and "required" on the attribute dropdowns. I think that would be cool anyway for all shops.

2. quantity box
I'm guessing you have a mechanism in your site to pass through quantity to the add to cart functionality.
Core doesn't have it...

3. It doesn't seem to want to responsively resize
I cant' see why, I will do some more experimenting. Then again I don't suppose this really matters as users will not be resizing windows like we do to test things.

 

4.  When the module overlays the Footer, it goes weird.

Solution:  Add z-index: 100; to the css change..
 

Cool  :pray:

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 current code (community-supported responsive 2.3.4.1BS Edge) here

 

Share this post


Link to post
Share on other sites

Just a thought... You can add the .css rules via javascript to the .affix element, which would then allow you to not have to make any core changes.


Matt

Share this post


Link to post
Share on other sites

I didn't test this  but it seems like it would work

<script>
$(function() {
    var $affixElement = $('div[data-spy="affix"]');
    $affixElement.width($affixElement.parent().width());
    
    var styles = {
      position : "fixed",
      bottom: "10px"
    };
    $( '.affix' ).css( styles );
});
</script>

Matt

Share this post


Link to post
Share on other sites

I found the same as Gary where the footer is concerned. I added a z-index: and now it appears correctly in front of my back to top button.


REMEMBER BACKUP, BACKUP AND BACKUP

Before installing the official version of oscommerce first look at a responsive version here

It's very easy to over complicate what are simple things in life

Share this post


Link to post
Share on other sites

@@mattjt83 thank you.... I'll test and update.....

 

@@burt yes the add to cart qty was from an addon.... I'll fix and update.

 

Question, I believe the add to cart button changed from GOLD to EDGE.... I guess I should include instructions to change to Edge?

Share this post


Link to post
Share on other sites

@@burt

 

 

3. It doesn't seem to want to responsively resize
I cant' see why, I will do some more experimenting. Then again I don't suppose this really matters as users will not be resizing windows like we do to test things.

 

I forgot to mention.... Apparently .affix does not size well to its parent div (because it's floating in and out of the div maybe???? Its a little beyond my pay grade.... lol.... I'm not sure I understand why).... so JS is the popular solution.

 

There is lots of info out there on the BS forums.

 

And yes, except when a viewport is changed (example... horizontal to vertical) it typically would not require resizing.

Share this post


Link to post
Share on other sites

@@mattjt83 @@burt ok I have changed to;

<script>
$(document).ready(function(){

    var styles = {
      position : "fixed",
      bottom: "10px"
    };
    $( '.myAffix' ).css( styles );

    var $affixElement = $('div[data-spy="affix"]');
    $affixElement.width($affixElement.parent().width());    
});
</script>

But it fires immediately.... not at 400 px set here;

<div class="myAffix" data-spy="affix" data-offset-top="400">

Also if I add the

 

z-index : "100", to the var styles it fails.....

 

Any help would be appreciated.....

Share this post


Link to post
Share on other sites

After having installed this I had someone check the site and they commented on it looking silly having this on a large screen as it shows before the add to cart has gone off the screen. So I changed

 

<div class="col-xs-12">

 

to

 

<div class="col-xs-12 hidden-lg">

 

Now on large screens it does not show, but does on all others. Hopefully this small changes will be of help to others.


REMEMBER BACKUP, BACKUP AND BACKUP

Before installing the official version of oscommerce first look at a responsive version here

It's very easy to over complicate what are simple things in life

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

×