Jump to content
burt

Responsive osCommerce - Bootstrap

Recommended Posts

Hi Manfred,

I did try it that way at first, but it was not working and I kept getting the same page error. What I posted was the latest version of it... after trying everything I could to get that admin login page to load.

I changed those variables because I thought they may be causing the problem by using the mydomain instead of the test sub-domain. So, I figured I would define the direct path.

I'd love to know of a tool that could pin-point this problem.

If you're saying it is not the /admin/includes/configure.php file,.. then it has to be something else.


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

@Demitry Have you tried checking the headers and redirects with http://www.web-sniffer.net or https://httpstatus.io/?


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

Hi Frank,

Thank you for the reply and the online header sniffer tools. I created another sub-domain called "dev2" and installed 2.3.4-BS-Edge on it without changing the admin folder name. I also reinstalled or re-created the database in the C-Panel and ran the SQL file in phpMyAdmin.

I tried to go through the auto-install, but it got stuck on the first step in trying to connect to the database. So, I manually filled out the two configure.php files and uploaded them. The admin section has the same issue and when I try to install it via the auto-installer, it still gets stuck on that first step in connecting to the database.  The catalog part is also unable to connect to the database though the home page displays with all the test products.

I renamed the main htaccess file in the main/parent account to eliminate it as the cause that might affecting any & all other folders & sub-domains, and it is not the cause of this issue.

I went to web-sniffer and the site was not pulling up so I tried the suggested alternative site, http://testuri.org/sniffer and I also ran this same page on https://httpstatus.io/ the screenshots are attached, but other than seeing that there is a 302 redirect on it, I cannot figure it out from this data. Is there anything that points to a cause from this info?

Next, I will try to install a clean 2.3.4.1 version to see if I gets the same issue. This will tell me if it is a BS-Edge bug or some issue with my server configuration or database user name and password. I did think that there may be an issue with the user name and password, because I am using underscore in the user name and a couple of special characters in the password. If the new BS-Edge is coded to strip those, then it would certainly cause a connectivity issue. However, this does not explain the redirecting.

I also looked at the tep_db_connect() function in BS-Edge and in the newest osC v2.3.4.1 and there is only one line difference, which I don't think is the issue.

 

 

 

headers.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

yeah, I tried FF, Chrome, and IE. Nothing is working. I will try v2.3.4.1 now and then try the most basic user name and password and simplest database name.

I activated error logs and nothing was reporting and my hosting company tech support has no idea other than blaming it on the software.


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

@Demitry

I installed a new subdomain, created a new database, installed the latest edge. It worked perfectly for me. This is the configure.php that was created:

  define('HTTP_SERVER', 'http://subdomain.domain.com');
  define('HTTPS_SERVER', 'http://subdomain.domain.com');
  define('ENABLE_SSL', false);
  define('HTTP_COOKIE_DOMAIN', '');
  define('HTTPS_COOKIE_DOMAIN', '');
  define('HTTP_COOKIE_PATH', '/admin');
  define('HTTPS_COOKIE_PATH', '/admin');
  define('HTTP_CATALOG_SERVER', 'http://subdomain.domain.com');
  define('HTTPS_CATALOG_SERVER', 'http://subdomain.domain.com');
  define('ENABLE_SSL_CATALOG', 'false');
  define('DIR_FS_DOCUMENT_ROOT', '/home/user/public_html/subdomain/');
  define('DIR_WS_ADMIN', '/admin/');
  define('DIR_WS_HTTPS_ADMIN', '/admin/');
  define('DIR_FS_ADMIN', '/home/user/public_html/subdomain/admin/');
  define('DIR_WS_CATALOG', '/');
  define('DIR_WS_HTTPS_CATALOG', '/');
  define('DIR_FS_CATALOG', '/home/user/public_html/subdomain/');

The only difference I can see is the cookie paths. It's either that or your server settings. Check if there is a redirect on that subdomain in cpanel perhaps.


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

When you created the subdomain, did you redirect it to the directory you created for it? Sometimes Cpanel creates that redirect automatically, so if you add one it gets done twice. Result: Endless redirects.

To find out, try using the directory under the main domain and installing there. That is, install in www.example.com/test and not test.example.com.

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

no, my hosting tech support said there are no redirects on that sub-domain, but I do need to try that cookie path change. I also noticed that v2.3.4.1 does not have a directive for the Header unset ETag. I'm not sure what the ETag is for but the htaccess file for the BS-Edge does have this directive. I am installing v2.3.4.1 now so I will try it with and without that htaccess mod.

Thank you so much for taking the time to install this on your own server to test this issue.


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

Jim,

Thank you for the reply. I will definitely try that as well, though hosting tech support says there are no redirects on that sub-domain.

..and I did not create a redirect in the C-Panel when I created that sub-domain. I've actually never used that redirect feature when creating a sub-domain.

 

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

ok, Finally! The Issue was resolved. I'll tell you,.. I still don't have an idea as to what was happening because I could not get the osC auto-installer to connect to the database in the first step of the installation. So, here is what I did to get this resolved.

My hosting company has an auto installer called, Softaculous Apps Installer. I used this to install osC v2.3.4.1 (because they don't have BS-Edge) on a sub-domain called "test." I did this because I wanted to know if I was going to experience the same problems and also because I wanted to pull both configuration files from it for review.

Meanwhile, I had my v2.3.4-BS-Edge installed on another sub-domain called "dev2" with that issue where the admin page was not redirecting properly and would not load.

After installing osC v2.3.4.1, I went to the site (test.mydomain.com/) and was greeted with the same osC auto-installation window. I entered the information in the first step of the install (database server, user name, password, database name) and again, the connection was stuck. So, I went and pulled both configuration files to see what was going on. To my surprise, Softaculous Apps Installer created a database, user-name, and password for this new install, while BS-Edge did not. I'm not sure if this is supposed to happen or not, but for the BS-Edge installation I created the database in the C-Panel before initiating the install.

So in those two configuration files, I changed the database information to the one I had already created for BS-Edge and changed the appropriate sub-domain name and then uploaded both configuration files to the dev2 (BS-Edge) installation. Now, everything seems to work properly.

In summary, I think if anyone else runs into a similar odd-ball issue with the auto-installer via database connectivity or cannot access the admin login page due to a redirect loop, it is a good idea to try and install the same or latest version of the software on another sub-domain. Then change the directory path in both configuration files and use those files in the original install.

I had a tough time finding how these configuration files should be set-up and most people would not need to see this information because the auto-installer automatically writes to these files.

A big thank you to everyone here for their help.

Demitry

 

 

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

Edge is now mirrored to the recent v2.3.4.1

 

 


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 Responsive osCommerce CE (community edition) here

Share this post


Link to post
Share on other sites

@burt thank you for setting 2.3.4.1


I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can.

I remember what it was like when I first started with osC. It can be overwhelming.

However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc.

There are several good pros here on osCommerce. Look around, you'll figure out who they are.

Share this post


Link to post
Share on other sites

I have, what I hope, is a simple problem.

I have uploaded my store logo and set it for 12, for full width.

However, it only extends half way across the screen.

Is there a way to correct this, or, failing that, at least center it on the screen?

I'm using 2.3.4 Gold BS-3

Thanks...

Edited by Druid6900

No Good Deed EVER Goes Unpunished

Share this post


Link to post
Share on other sites

Hi,

After getting past the installation issues, I am trying to redesign the layout of the header (first) and having some problems with it. I found a great source of information regarding how the Bootstrap CSS grid is designed:

https://getbootstrap.com/docs/3.3/css/

However, I am having a tough time finding where all the sub-modules and elements are structured within the header. If I know this piece, then I can use CSS based on the grid to position them where I need them.

The /includes/template_top.php file requires the /includes/header.php file, which calls $oscTemplate->getContent('header');

I get that all the 5 header templates for the header are located via /includes/modules/content/header/templates/... However, where are all these header sub-modules / elements / templates,.. structured into the actual header? There has to be a file where these elements are all compiled to form the header. Any help would be greatly appreciated.

 


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
4 hours ago, Demitry said:

Hi,

After getting past the installation issues, I am trying to redesign the layout of the header (first) and having some problems with it. I found a great source of information regarding how the Bootstrap CSS grid is designed:

https://getbootstrap.com/docs/3.3/css/

However, I am having a tough time finding where all the sub-modules and elements are structured within the header. If I know this piece, then I can use CSS based on the grid to position them where I need them.

The /includes/template_top.php file requires the /includes/header.php file, which calls $oscTemplate->getContent('header');

I get that all the 5 header templates for the header are located via /includes/modules/content/header/templates/... However, where are all these header sub-modules / elements / templates,.. structured into the actual header? There has to be a file where these elements are all compiled to form the header. Any help would be greatly appreciated.

 

The template function you have quoted returns what has been added to it by the execute functions of each installed/enabled content header module according to sort order. What you get is basically a sequence of divs with the column widths that you have defined, which fill up the header section of the page one after the other. There isn't a structure, just a sequence.


For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (Phoenix).

here: on the official osc download page

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
4 hours ago, Demitry said:

@BrockleyJohn

John,

so where do I alter this sequence?

 

by changing the sort order of the modules in admin / modules / content


For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (Phoenix).

here: on the official osc download page

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
On 9/4/2017 at 1:18 AM, Druid6900 said:

I have, what I hope, is a simple problem.

I have uploaded my store logo and set it for 12, for full width.

However, it only extends half way across the screen.

Is there a way to correct this, or, failing that, at least center it on the screen?

I'm using 2.3.4 Gold BS-3

Thanks...

Is the image you are using for your logo the same width as the page?


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

OK, so, basically, I have to double the size of the logo, since it only extends halfway across the screen at the moment.

That may be easier than trying to figure out how to center the current one.


No Good Deed EVER Goes Unpunished

Share this post


Link to post
Share on other sites

@BrockleyJohn

John, thank you ...that helps a little bit, though there is still the issue of how to insert an element in between other elements.

 

@Druid6900

Unless someone has a better solution, here is a simple CSS hack that will work, though you have to test it on mobile as well.

In the user.css file add the following line:

.storeLogo { top:0; left:50%; margin-left:-100px }

Then change the margin-left value to whatever the width of your logo is divided by half. I used the width of the osCommerce logo, which is 200px, and divided by half is 100px.

Though I have to add that centering your logo is not a good idea for page layout because it leaves a lot of empty white space to the left & right of the logo. And everything above-the-fold is valuable page real estate.

 

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

@Demitry

I just double the size of the image and it fits across the whole screen and resizes correctly on different devices.

Thanks guys.


No Good Deed EVER Goes Unpunished

Share this post


Link to post
Share on other sites

To center an image inside a div, eg if the div is 12 wide and the image is (eg) half...

Place a center-block class on the image.

 


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 Responsive osCommerce CE (community edition) here

Share this post


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

@BrockleyJohn

John, thank you ...that helps a little bit, though there is still the issue of how to insert an element in between other elements.

This is precisely what the sort order achieves...  

Module A = sort order 100, column width 4

Module B = sort order 150, column width 4

Module C = sort order 200, column width 4

Let us say that you want to add in another module in between B and C:

Module A = sort order 100, column width 4

Module B = sort order 150, column width 4

NEW Module = sort order 175, column width 4

Module C = sort order 200, column width 4

Now Module C drops to start a new Row.  

This is unwanted, what you want is to have these 4 modules all in one row:

Change column width of all 4 modules

Module A = sort order 100, column width 3

Module B = sort order 150, column width 3

NEW Module = sort order 175, column width 3

Module C = sort order 200, column width 3

But now you change your mind and want the NEW module BEFORE Module A

Change the sort order of the new module

NEW Module = sort order 75, column width 3

Module A = sort order 100, column width 3

Module B = sort order 150, column width 3

Module C = sort order 200, column width 3

It's so very simple...on the face of it.


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 Responsive osCommerce CE (community edition) here

Share this post


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

×