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

Bootstrap 3 in 2.3.4 - Responsive from the Get Go

Recommended Posts

directed to my Original site, but if he is browsing from a phone he will be directed to the responsive site?

 

Obviously the database would be the same database as would be the admin.

 

Just asking............

 

You could probably rip the mobile recognition out of the osc mobile build that has been around for a while now, and use that to redirect to your other folder, or just find another mobile detection script that is available, Ive seen lots of them in the past before responsive frameworks became popular.

 

But you already know you'll need to make any contribution changes to the bootstrap version as you did your main site, especially if its a mod that involves certain keys being present in the database.

 

Why not use a compare program and merge your current work into the bootstrap version? Theres nothing changed in the admin, so you'll be in good shape with your old one.


Follow the community build:

BS3 to osCommerce Responsive from the Get Go!

Check out the new construction:

Admin Gone to Total BS!

Share this post


Link to post
Share on other sites

Addendum to post of @ - there are a couple of very tiny changes in the admin area, specifically to do with name/address/phone of the store.

 

@@Mort-lemur - you've put a lot of work into your shop, and as much again would need to go into ensuring the mobile users have the same experience, so the advice would be; why bother doing that just for mobile users - do it once, do it for all. Go bootstrap.

 

Of course you have to look at your stats to determine how many people visiting the site would benefit from changing the shop to responsive. Is that a tiny % ? Is that a larger % already ?? Bear in mind that usage of mobile/tablet will only increase over the coming months and years..so that while the work might not be worthwhile right now, it might be very worthwhile in 6 months or a year. Take a think about your target market ? Some shops might have a very low % of tech savvy users, others might have a very high %. I know what your target market is, but I cannot determine if those people are tech savvy - I suspect that most of them are...


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

If you think that is a bug - fix it, commit it.

 

I don't think that is a bug...the correct options are only picked up from the URL string if (and only if) that product is already in the shopping_cart.

 

 


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

Did you maybe (in FF) have the product in the cart ?

 

When I open the links (in FF, IE, Chrome) with nothing in the cart in any of them, I get no selected options.


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

I found these free BS themes and would like to know if they can be used without causing any problems to the osC function.

I t hink its similar to the ThemeRoller where you could change only the "basic" color layout.

 

I hope it is ok to post the link in here. (if not, my apologies and please remove the link)

 

http://bootswatch.com/

Share this post


Link to post
Share on other sites

@@burt there is a javascript TypeError on products that only have one image. It is caused because the colorbox script is looking for the image id attribute and it doesn't exist on products with only image.

 

Simple fix:

 

In includes/modules/header_tags/ht_product_colorbox.php

 

Change this (~approx line 49):

 

$oscTemplate->addBlock('<script>var ImgCount = $("#piGal").data("imgcount"); $(function() {$("#piGal").hide();$(\'#piGal\').photosetGrid({layout: ""+ ImgCount +"",width: \'250px\',highresLinks: true,rel: \'pigallery\',onComplete: function() {$(\'#piGal\').css({ \'visibility\': \'visible\'});$(\'#piGal a\').colorbox({maxHeight: \'90%\',maxWidth: \'90%\',rel: \'pigallery\'});$(\'#piGal img\').each(function() {var imgid = $(this).attr(\'id\').substring(9);if ( $(\'#piGalDiv_\' + imgid).length ) {$(this).parent().colorbox({ inline: true, href: "#piGalDiv_" + imgid });}});}});$("#piGal").show();});</script>', $this->group);

 

To this:

 

$oscTemplate->addBlock('<script>var ImgCount = $("#piGal").data("imgcount"); $(function() {$("#piGal").hide();$(\'#piGal\').photosetGrid({layout: ""+ ImgCount +"",width: \'250px\',highresLinks: true,rel: \'pigallery\',onComplete: function() {$(\'#piGal\').css({ \'visibility\': \'visible\'});$(\'#piGal a\').colorbox({maxHeight: \'90%\',maxWidth: \'90%\',rel: \'pigallery\'});$(\'#piGal img[id]\').each(function() {var imgid = $(this).attr(\'id\').substring(9);if ( $(\'#piGalDiv_\' + imgid).length ) {$(this).parent().colorbox({ inline: true, href: "#piGalDiv_" + imgid });}});}});$("#piGal").show();});</script>', $this->group);


Matt

Share this post


Link to post
Share on other sites

@@Tsimi

Should be fine and is the exact reason why the main bootstrap css files were left untouched during the whole of the 2334BS build. Be aware that custom.css and user.css (if you have anything in that one) will over-ride bootstrap css files. You may need to amend custom and user therefore to allow a bootswatch theme to work properly.

 

@ All

No questions about bootswatch themes and how to do this and that and the other in this thread please.


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

@@Tsimi

 

Those should work, just be sure the bootstrap version used matches what you are using. There have been some incremental changes in bootstrap 3 that really alter certain elements


Matt

Share this post


Link to post
Share on other sites

@@mattjt83 - thanks for the code, testing now.


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

@@Tsimi

 

Those should work, just be sure the bootstrap version used matches what you are using. There have been some incremental changes in bootstrap 3 that really alter certain elements

 

roger that. thanks for the heads up.

Share this post


Link to post
Share on other sites

We definitely need to look at the two functions;

 

tep_draw_button

tep_image

 

both of these are useable, but not quite right - they need recoding. General idea is to pass individual arguments into the params (parameters) argument of these two functions. This allows the developer to do exactly as you want.


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

I'm not sure what are Henry's plans for it. Please note that I am also updating 1 file later on today to solve an insignificant issue of display of buttons.


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

Yeah that's correct.

 

Users now have to explicitly pass the css to the button, if nothing is passed it "defaults" to btn-default (which is white with a grey hover effect).


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

I liked them in Green

 

So it now needs to be

 

tep_draw_button(IMAGE_BUTTON_IN_CART, 'glyphicon-shopping-cart', null, 'primary', null, 'btn-success');

 

Regards

 

Ken

Share this post


Link to post
Share on other sites

Correct. Or any of the button styles as found http://getbootstrap.com/css/#buttons


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

Note that the previous commit was reverted and re-committed. Thanks to @@wHiTeHaT for spotting the extra unneeded line of code


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

I have recently installed KissER on my test site, and am receiving the following error:

E_NOTICE Error Count: 1

Error: Undefined variable: prod_list_contents

File: includes/modules/product_listing.php

Line: 105

 

 

This happens then I display a category that does *not* have any sub-categories, but does not happen when I display a category that *does* have a sub-category.

 

Malcolm

 

(2334bs3, with SEO Header Tags - Reloaded, and Better Checkout)


If you are running the "official" osC 2.3.4 or 2.3.4.1 download, your installation is obsolete! Get the latest community-supported responsive "Frozen" release here

Share this post


Link to post
Share on other sites

I have recently installed KissER on my test site, and am receiving the following error:

 

E_NOTICE Error Count: 1

Error: Undefined variable: prod_list_contents

File: includes/modules/product_listing.php

Line: 105

 

 

This happens then I display a category that does *not* have any sub-categories, but does not happen when I display a category that *does* have a sub-category.

 

Malcolm

 

(2334bs3, with SEO Header Tags - Reloaded, and Better Checkout)

 

To corect this error on line 105 add

   $prod_list_contents = false;

or

   $prod_list_contents = null;

 

It's best for variables to be set with a default setting. I found this very helpful also in understanding comparisons.

http://docs.php.net/manual/en/types.comparisons.php


I'm not really a dog.

Share this post


Link to post
Share on other sites

To correct this error on line 105 add

$prod_list_contents = false;

or

$prod_list_contents = null;

 

It's best for variables to be set with a default setting. I found this very helpful also in understanding comparisons.

http://docs.php.net/manual/en/types.comparisons.php

 

That line currently is:

 

$prod_list_contents .= '<div id="product-listing">';

 

And, as I mentioned, if there is a sub-category, there is no error.

 

Malcolm


If you are running the "official" osC 2.3.4 or 2.3.4.1 download, your installation is obsolete! Get the latest community-supported responsive "Frozen" release here

Share this post


Link to post
Share on other sites

Sorry, put it on line 104, not 105. Basically, the variable needs to be set and the reason you don't have that error when there is a sub category is the variable is then set. So, your lines will look like this

  $prod_list_contents = false;
  $prod_list_contents .= '<div id="product-listing">';
  $prod_list_contents .= '  <ul class="inline-span">';


I'm not really a dog.

Share this post


Link to post
Share on other sites

Sorry, put it on line 104, not 105. Basically, the variable needs to be set and the reason you don't have that error when there is a sub category is the variable is then set. So, your lines will look like this

 $prod_list_contents = false;
 $prod_list_contents .= '<div id="product-listing">';
 $prod_list_contents .= ' <ul class="inline-span">';

 

Thanks!

 

Malcolm


If you are running the "official" osC 2.3.4 or 2.3.4.1 download, your installation is obsolete! Get the latest community-supported responsive "Frozen" release here

Share this post


Link to post
Share on other sites

@@ArtcoInc @@John W

Thanks for spotting this and providing the fix. Master updated.


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

Again: for debate about this and that, that have nothing to do with 2334BS, start a new thread.

 

Here is your discussion:

http://forums.oscommerce.com/topic/396834-commercial-aspect-of-gpl-open-source/

 

 

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
Guest
This topic is now closed to further replies.

×