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

Bootstrap 3 in 2.3.4 - Responsive from the Get Go

Recommended Posts

@frankl

that's just the Chrome browser, right? I use their development tools console, but I've never seen a place to test for different mobile devices.

 


osCommerce: made for programmers, ...because store owners do not want to be programmers.

https://trends.google.com/trends/explore?date=all&geo=US&q=oscommerce

Share this post


Link to post
Share on other sites

Just click the 'Device' icon in the developer console. You can also add other devices by clicking 'Edit' in the device selection dropdown.

 

chrome_device.PNG


Let's make things easier for new osCommerce users http://forums.oscommerce.com/topic/402638-discussion-about-hard-coded-database-tables/?p=1718900  Getting there with osCommerce 2.4! :thumbsup:

Share this post


Link to post
Share on other sites

@frankl see https://github.com/gburton/Responsive-osCommerce/pull/538

If I remember right there were some quite big differences between actual device behaviour and what the emulations show. Of course it's a moving feast anyway and you pretty much have to decide where to draw the line.

 

Maybe you need an equal widths module for the iphone!

Edited by BrockleyJohn

For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (2.3.4.1 CE) here: https://github.com/gburton/Responsive-osCommerce/archive/2341-Frozen.zip

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Share this post


Link to post
Share on other sites

@BrockleyJohn

I know emulators aren't quite "real", so my workflow is to do all the dev using emulators and then for final tweaks check on the actual devices themselves. The emulators come quite close but you need the real device with the actual browser and OS to do a final check. Even the responsive design mode on Safari doesn't always match up to what you get on various iPads and iPhones.


Let's make things easier for new osCommerce users http://forums.oscommerce.com/topic/402638-discussion-about-hard-coded-database-tables/?p=1718900  Getting there with osCommerce 2.4! :thumbsup:

Share this post


Link to post
Share on other sites

is there a simple way to nest a module inside another?

I installed the Horizontal Categories Menu and want to use the header buttons module inside of it, but nothing seems to work. I tried including the template, and then added the code inside that menu module template, but this is just kicking back errors.

 


osCommerce: made for programmers, ...because store owners do not want to be programmers.

https://trends.google.com/trends/explore?date=all&geo=US&q=oscommerce

Share this post


Link to post
Share on other sites


Ok, so I solved the issue of placing the header buttons module in the Horizontal Categories Menu module (for tablet screen size) ..by setting the sort-order higher for the header buttons module and then setting its margin-bottom to -34px (height of the button group) and bottom to -10px. See attached screenshot.

I did not nest the modules, but just applied a CSS fix. However, I’d still like to hear from one of the experts, if there is a simple way to nest a module inside another?  

My new challenge is with including some of the sub-modules from the navigation bar in the Horizontal Categories Menu module as part of the menu.

 

header-menu-screenshot.png


osCommerce: made for programmers, ...because store owners do not want to be programmers.

https://trends.google.com/trends/explore?date=all&geo=US&q=oscommerce

Share this post


Link to post
Share on other sites

I am no expert but I think it depends on the module contents some might work together others might not.
I personally think your css fix is good and should cause no problems. As long it looks and works as you like keep it as is now with the css fix. Just make sure you cover all viewports XS, SM and so on...

Share this post


Link to post
Share on other sites
Hi, This is a slight divergence to the “Emails in 2.4” question raised by  @frankl - 
I am currently trying to make changes to 2.3.4bs without tampering with core code - using jQuery (until pages are fully modularised) in new footer content scripts it is possible to make significant changes to page content/layout (is this OK or unwise?). Is it also possible using a header_tag script to add code that would otherwise be in application_top (is there a better way?).
 
However, I have not yet found a suitable way to externally change functions. I would like to make minor changes to tep_href_link, tep_address_format, and tep_mail without meddling with core. Apparently there is no PHP facility to delete/replace (system/user) functions.
 
Is there a suitable solution?

Share this post


Link to post
Share on other sites

There is nothing wrong with changing core code so long as you know what you are doing and you remember what you have done.


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
58 minutes ago, trier said:
Hi, This is a slight divergence to the “Emails in 2.4” question raised by  @frankl - 
I am currently trying to make changes to 2.3.4bs without tampering with core code - using jQuery (until pages are fully modularised) in new footer content scripts it is possible to make significant changes to page content/layout (is this OK or unwise?). Is it also possible using a header_tag script to add code that would otherwise be in application_top (is there a better way?).
 
However, I have not yet found a suitable way to externally change functions. I would like to make minor changes to tep_href_link, tep_address_format, and tep_mail without meddling with core. Apparently there is no PHP facility to delete/replace (system/user) functions.
 
Is there a suitable solution?

Avoid changing core code when there's a sensible alternative, but if the most straightforward way of doing something is to change the core, do it that way and make sure you keep track of what you have done.

It's only really going to matter in the future if and when you're working on a live shop that can be updated automatically. Then core updates will be dangerous. For now, they're not a sin if they're the best way of doing it. In my view it's more important for addon developers than for capable people working on their own store not to change core code.


For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (2.3.4.1 CE) here: https://github.com/gburton/Responsive-osCommerce/archive/2341-Frozen.zip

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Share this post


Link to post
Share on other sites

Afterthought: when changing content using jquery you need to bear in mind that it might affect how it's analysed by search engines. I'm guessing you're just moving stuff around which might not matter but make sure to check how the page appears on webmaster tools and so on.


For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (2.3.4.1 CE) here: https://github.com/gburton/Responsive-osCommerce/archive/2341-Frozen.zip

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Share this post


Link to post
Share on other sites

@burt @BrockleyJohn

Hi, Thank you for your comments. Because of the significant number of changes to my website, keeping it up-to-date is always a headache (particularly given my total lack of organising/documentation skills). Although there is obviously a bit of a processing overhead, I figured changes would be easier to identify/understand if kept outside core scripts.
 
Regarding search engine view of pages where elements have been moved/replaced/deleted by jQuery, the product_listing & product_info page titles/headings are quite heavily changed, I may need to check that it doesn’t have a negative impact.
 
Thank you for your help

Share this post


Link to post
Share on other sites

ok, so I noticed something that I think needs to be addressed. While working on my site I am seeing that my own customer test-account session never ends. The one for my admin session seems to end sporadically and only after a few days. Today I searched for a fix and found one, though I have not implemented it yet.

Possibly for a future release, this should be something the store owner could control and it should not be set to last forever as default.

So, my question is,.. is the solution in the link above the best one or is there a different fix for this issue? Thanks.

 

 


osCommerce: made for programmers, ...because store owners do not want to be programmers.

https://trends.google.com/trends/explore?date=all&geo=US&q=oscommerce

Share this post


Link to post
Share on other sites
3 hours ago, Demitry said:

 this should be something the store owner could control and it should not be set to last forever as default.

It isn't and it doesn't.

This would be a problem at your end...perhaps at your configuration or perhaps at your server.


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

Hi, @Demitry and @burt

it is the same here on my BSEdge playground, running on german 1und1 shared hosting, PHP Version 5.6.31, sessions stored in file, the above mentioned fix works, I have to hope it is not harmful in anyway.

Best regards

Christoph

 

Share this post


Link to post
Share on other sites
6 minutes ago, beerbee said:

Hi, @Demitry and @burt

it is the same here on my BSEdge playground, running on german 1und1 shared hosting, PHP Version 5.6.31, sessions stored in file, the above mentioned fix works, I have to hope it is not harmful in anyway.

Best regards

Christoph

 

Same here, i had to learn early that the sessions don't run out. i am on my own server and using the same solution @Demitry mentioned earlier.


 

 

Share this post


Link to post
Share on other sites

You are all on 1und1 ?


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

@burt

The  (oldeee) live store  is also running on 1und1 shared hosting with  php 5.5.38  sessions also stored in file, its a kind of v2.3.3.2 oscommerce, there are no problems with sessions expiring, i could post the code of that old sessions.php if you think that it is useful regarding diffferencies.

Best regards

Christoph

 

Share this post


Link to post
Share on other sites

@burt

My hosting company right now is webhostinghub.com and I have the latest PHP version for this BS Edge install. I did however, look in the php.ini file after you said it is a configuration issue on my end. And I did find the following code in it. Though, if this is a configuration piece that can be controlled from the application admin area, then it probably should be, right?

[Session]
; Handler used to store/retrieve data.
session.save_handler = files

; Argument passed to save_handler.  In the case of files, this is the path
; where data files are stored. Note: Windows users have to change this 
; variable in order to use PHP's session functions.
; As of PHP 4.0.1, you can define the path as:
;     session.save_path = "N;/path"
; where N is an integer.  Instead of storing all the session files in 
; /path, what this will do is use subdirectories N-levels deep, and 
; store the session data in those directories.  This is useful if you 
; or your OS have problems with lots of files in one directory, and is 
; a more efficient layout for servers that handle lots of sessions.
; NOTE 1: PHP will not create this directory structure automatically.
;         You can use the script in the ext/session dir for that purpose.
; NOTE 2: See the section on garbage collection below if you choose to
;         use subdirectories for session storage
session.save_path = /tmp

; Whether to use cookies.
session.use_cookies = 1

; This option enables administrators to make their users invulnerable to
; attacks which involve passing session ids in URLs; defaults to 0.
; session.use_only_cookies = 1

; Name of the session (used as cookie name).
session.name = PHPSESSID

; Initialize session on request startup.
session.auto_start = 0

; Lifetime in seconds of cookie or, if 0, until browser is restarted.
session.cookie_lifetime = 0

; The path for which the cookie is valid.
session.cookie_path = /

; The domain for which the cookie is valid.
session.cookie_domain =

; Handler used to serialize data.  php is the standard serializer of PHP.
session.serialize_handler = php

; Define the probability that the 'garbage collection' process is started
; on every session initialization.
; The probability is calculated by using gc_probability/gc_divisor,
; e.g. 1/100 means there is a 1% chance that the GC process starts
; on each request.

session.gc_probability = 1
session.gc_divisor     = 100

; After this number of seconds, stored data will be seen as 'garbage' and
; cleaned up by the garbage collection process.
session.gc_maxlifetime = 1440

; NOTE: If you are using the subdirectory option for storing session files
;       (see session.save_path above), then garbage collection does *not*
;       happen automatically.  You will need to do your own garbage 
;       collection through a shell script, cron entry, or some other method. 
;       For example, the following script would is the equivalent of
;       setting session.gc_maxlifetime to 1440 (1440 seconds = 24 minutes):
;          cd /path/to/sessions; find -cmin +24 | xargs rm

; PHP 4.2 and less have an undocumented feature/bug that allows you to
; to initialize a session variable in the global scope, albeit register_globals
; is disabled.  PHP 4.3 and later will warn you, if this feature is used.
; You can disable the feature and the warning separately. At this time,
; the warning is only displayed, if bug_compat_42 is enabled.

session.bug_compat_42 = 1
session.bug_compat_warn = 1

; Check HTTP Referer to invalidate externally stored URLs containing ids.
; HTTP_REFERER has to contain this substring for the session to be
; considered as valid.
session.referer_check =

; How many bytes to read from the file.
session.entropy_length = 0

; Specified here to create the session id.
session.entropy_file =

;session.entropy_length = 16

;session.entropy_file = /dev/urandom

; Set to {nocache,private,public,} to determine HTTP caching aspects
; or leave this empty to avoid sending anti-caching headers.
session.cache_limiter = nocache

; Document expires after n minutes.
session.cache_expire = 180

; trans sid support is disabled by default.
; Use of trans sid may risk your users security. 
; Use this option with caution.
; - User may send URL contains active session ID
;   to other person via. email/irc/etc.
; - URL that contains active session ID may be stored
;   in publically accessible computer.
; - User may access your site with the same session ID
;   always using URL stored in browser's history or bookmarks.
session.use_trans_sid = 0

 


osCommerce: made for programmers, ...because store owners do not want to be programmers.

https://trends.google.com/trends/explore?date=all&geo=US&q=oscommerce

Share this post


Link to post
Share on other sites

OK all.

When you guys get to the bottom of it...post back.  I am clearly stating that the problem is not at the osCommerce code, but I am happy to be proven wrong.


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

@Demitry  OsCommerce does not use the PHP session handler, so the session settings in your php.ini should have no effect. There may be a setting somewhere in there that affects the osC internal session code, but I'm not aware of any.

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

@kymation

hey Jim,

Thanks, ..I didn't know that. I actually thought that the following setting was responsible for the session not expiring. However, I did not move to test it because it would have to be the same setting for both the admin panel and the catalog sessions,.. and that was not the case.

session.cookie_lifetime = 0

Instead, I took what Carl Nordstrom did improved on it, and made it into an addon that can controlled from Admin>Configuration>Sessions. I tested it and it works great. The screenshot is below. Please take a look and see if it can be improved.

https://apps.oscommerce.com/Apps&2MAEV&session-expiration-control

@burt

hey Burt,

You're probably right and this is not a bug with osC, but the point here is that if this problem occurs over various hosting set-ups, then shouldn't the store owner have control over it from the application side?

 

session-expiration-control-screenshot.png

Edited by Demitry

osCommerce: made for programmers, ...because store owners do not want to be programmers.

https://trends.google.com/trends/explore?date=all&geo=US&q=oscommerce

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×