Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

OSC-CSS Conversion


Guest

Recommended Posts

Hi. Am hoping someone with a lot more experience than me can maybe tell me what I did wrong. I just downloaded and installed this contribution (osc - css) http://addons.oscommerce.com/info/7263. The instructions were simple enough, and I've followed those (twice!) but still get this: http://www.simplyscent.co.uk.

I have a new install of oscommerce 2.2rc2a, with only one add-on (infoboxadmin).

Did I miss something?

Thanks in advance

:)

Link to comment
Share on other sites

Hi. Am hoping someone with a lot more experience than me can maybe tell me what I did wrong. I just downloaded and installed this contribution (osc - css) http://addons.oscommerce.com/info/7263. The instructions were simple enough, and I've followed those (twice!) but still get this: http://www.simplyscent.co.uk.

I have a new install of oscommerce 2.2rc2a, with only one add-on (infoboxadmin).

Did I miss something?

Thanks in advance

:)

Look in the <head> section of the code:

 

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Simply Scent</title>
<base href="http://www.simplyscent.co.uk/">

</head>

No link to a stylesheet.

 

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Simply Scent</title>
<base href="http://www.simplyscent.co.uk/">

<link rel="stylesheet" type="text/css" href="stylesheet.css">

</head>

Add the link to the stylesheet as show above.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

If you have problems the support thread for that contribution is here

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Look in the <head> section of the code:

 

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Simply Scent</title>
<base href="http://www.simplyscent.co.uk/">

</head>

No link to a stylesheet.

 

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Simply Scent</title>
<base href="http://www.simplyscent.co.uk/">

<link rel="stylesheet" type="text/css" href="stylesheet.css">

</head>

Add the link to the stylesheet as show above.

 

Thanks for that Jim. Now, and pardon my ignorance here, I changed that in index.php, and the main page was fine. Clicked on 'my account' and got the same thing so changed the same line in 'login.php' and thats now ok, ditto for shopping cart - so do I have to go through all the files and change this? These files were all copied over from the osc-css download, would have thought they'd have been ready to go :(

But, hey-ho, I'll get there......

:)

Link to comment
Share on other sites

If you have problems the support thread for that contribution is here

 

Hi again - I did trawl through that thread before posting, but couldn't see anything that looked similar to my query :)

Link to comment
Share on other sites

Thanks for that Jim. Now, and pardon my ignorance here, I changed that in index.php, and the main page was fine. Clicked on 'my account' and got the same thing so changed the same line in 'login.php' and thats now ok, ditto for shopping cart - so do I have to go through all the files and change this? These files were all copied over from the osc-css download, would have thought they'd have been ready to go :(

But, hey-ho, I'll get there......

:)

Yes you have to add the link to the stylesheet to all the main PHP files.

 

The site looks screwed up viewing it in IE7, but looks good in Firefox (3.0)

 

And you won't like the results when you click the "Checkout" link:

 

Parse error: syntax error, unexpected T_REQUIRE in /home/simplysc/public_html/checkout_shipping.php on line 1

:'(

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Yes you have to add the link to the stylesheet to all the main PHP files.

 

The site looks screwed up viewing it in IE7, but looks good in Firefox (3.0)

 

And you won't like the results when you click the "Checkout" link:

 

 

:'(

 

Hi again. I searched through that support thread again for

$stylesheet='<link rel="stylesheet" type="text/css" href="stylesheet.css">'; and saw where someone said that this code needed to be in 'application top'. I pasted it in, and everything seems to be working ok.

And, yes, regarding that checkout page - I'd already seen it - do you know whats going on there?

Thanks

:)

Link to comment
Share on other sites

Hi again. I searched through that support thread again for

$stylesheet='<link rel="stylesheet" type="text/css" href="stylesheet.css">'; and saw where someone said that this code needed to be in 'application top'. I pasted it in, and everything seems to be working ok.

And, yes, regarding that checkout page - I'd already seen it - do you know whats going on there?

Thanks

:)

I can probably help with the PHP error.

 

Post the first 20 lines from the file with the error.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

I can probably help with the PHP error.

 

Post the first 20 lines from the file with the error.

 

Thank you :)

This file looks a bit weird to me - its got only one line number!(?) so I've just selected the first few lines........

 

1 <?php/* $Id: checkout_shipping.php 1739 2007-12-20 00:52:16Z hpdl $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License Modified by Jan/2010 www..com/css-oscommerce*/ require('includes/application_top.php'); require('includes/classes/http_client.php');// if the customer is not logged on, redirect them to the login page if (!tep_session_is_registered('customer_id')) { $navigation->set_snapshot(); tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL')); }// if there is nothing in the customers cart, redirect them to the shopping cart page if ($cart->count_contents() < 1) { tep_redirect(tep_href_link(FILENAME_SHOPPING_CART)); }// if no shipping destination address was selected, use the customers own address as default if (!tep_session_is_registered('sendto')) { tep_session_register('sendto'); $sendto = $customer_default_address_id; } else {// verify the selected shipping address if ( (is_array($sendto) && empty($sendto)) || is_numeric($sendto) ) { $check_address_query = tep_db_query("select count(*) as total from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$customer_id . "' and address_book_id = '" . (int)$sendto . "'"); $check_address = tep_db_fetch_array($check_address_query); if ($check_address['total'] != '1') { $sendto = $customer_default_address_id; if (tep_session_is_registered('shipping')) tep_session_unregister('shipping'); } } } require(DIR_WS_CLASSES . 'order.php'); $order = new order;// register a random ID in the session to check throughout the checkout procedure// against alterations in the shopping cart contents if (!tep_session_is_registered('cartID')) tep_session_register('cartID'); $cartID = $cart->cartID;// if the order contains only virtual products, forward the customer to the billing page as// a shipping address is not needed if ($order->content_type == 'virtual') { if (!tep_session_is_registered('shipping')) tep_session_register('shipping'); $shipping = false; $sendto = false; tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL')); } $total_weight = $cart->show_weight(); $total_count = $cart->count_contents();// load all enabled shipping modules require(DIR_WS_CLASSES . 'shipping.php'); $shipping_modules = new shipping; if ( defined('MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING') && (MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING == 'true') )

 

any good?

Link to comment
Share on other sites

Please open the file with Wordpad (not Notepad) and try again.

:)

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Please open the file with Wordpad (not Notepad) and try again.

:)

 

Hi Jim - I use notepad++, not notepad. That's how the file's written, no lines. That's what I meant when I said it looked weird, not like all the other files

:)

Link to comment
Share on other sites

Hi Jim - I use notepad++, not notepad. That's how the file's written, no lines. That's what I meant when I said it looked weird, not like all the other files

:)

I don't use Notepad++ so I'm not sure what to tell you.

 

Without the line-breaks is just flat screwed up...

:'(

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

I don't use Notepad++ so I'm not sure what to tell you.

 

Without the line-breaks is just flat screwed up...

:'(

 

I know - but that's how it's appearing, even in wordpad

Link to comment
Share on other sites

I know - but that's how it's appearing, even in wordpad

If you want I can PM you an email addy you could send the file to (as an attachment) and maybe I can fix it for you, maybe not.

 

But I am willing to give it a shot.

:)

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

I know - but that's how it's appearing, even in wordpad

 

This is so weird - I just opened the original checkout_shipping.php (the one that came with the contribution) and it looks like this:

 

<?php

/*

$Id: checkout_shipping.php 1739 2007-12-20 00:52:16Z hpdl $

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

 

Modified by Jan/2010 www..com/css-oscommerce

*/

require('includes/application_top.php');

require('includes/classes/http_client.php');

 

// if the customer is not logged on, redirect them to the login page

if (!tep_session_is_registered('customer_id')) {

$navigation->set_snapshot();

tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));

}

 

normal, right?

I deleted the checkout_shipping.php from my website, replaced it with the one I downloaded, viewed it, and it looks like the first one I copied you.

Gremlins?

Link to comment
Share on other sites

This is so weird - I just opened the original checkout_shipping.php (the one that came with the contribution) and it looks like this:

 

<?php

/*

$Id: checkout_shipping.php 1739 2007-12-20 00:52:16Z hpdl $

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

 

Modified by Jan/2010 www..com/css-oscommerce

*/

require('includes/application_top.php');

require('includes/classes/http_client.php');

 

// if the customer is not logged on, redirect them to the login page

if (!tep_session_is_registered('customer_id')) {

$navigation->set_snapshot();

tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));

}

 

normal, right?

I deleted the checkout_shipping.php from my website, replaced it with the one I downloaded, viewed it, and it looks like the first one I copied you.

Gremlins?

Yep.. That's what is should look like.

 

If you're usung FTP to move files back and forth be sure it's using TEXT or ASCII mode on PHP files (as opposed to BINARY mode).

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Yep.. That's what is should look like.

 

If you're usung FTP to move files back and forth be sure it's using TEXT or ASCII mode on PHP files (as opposed to BINARY mode).

 

Well don't know if I'll ever know what went wrong there. That's the first time I've seen that happen. Managed to fix it tho using winmerge, opened my file and the original, replaced one with the other, copied it back over and hey presto!

 

Thanks for all your help Jim - now I'll go see what more havoc I can create when I try using the One Folder Template (the reason I downloaded osc-css in the first place)

:) :)

Link to comment
Share on other sites

A couple of things that may help:

 

1) in your includes/language/english.php file you should see:

 

// categories box text in includes/boxes/categories.php
define('BOX_HEADING_CATEGORIES', '<span class="categories">Categories');

 

Note the span tag. That will add the rounded corners on the top boxes. Each infobox should have this. They should added to the other languages as well.

 

2) Note that at the bottom of your infoboxes, or between them, you have this html:

</div><tr><td><img src="images/pixel_trans.gif" class=""  border="0"  alt="" width="100%" height="4"></td></tr><!--bof currencies //-->

 

That may be what is breaking your bottom two boxes on the right side.

Oscommerce site:

 

 

OSC to CSS, http://addons.oscommerce.com/info/7263 -Mail Manager, http://addons.oscommerce.com/info/8120

Link to comment
Share on other sites

A couple of things that may help:

 

1) in your includes/language/english.php file you should see:

 

// categories box text in includes/boxes/categories.php
define('BOX_HEADING_CATEGORIES', '<span class="categories">Categories');

 

Note the span tag. That will add the rounded corners on the top boxes. Each infobox should have this. They should added to the other languages as well.

 

2) Note that at the bottom of your infoboxes, or between them, you have this html:

</div><tr><td><img src="images/pixel_trans.gif" class=""  border="0"  alt="" width="100%" height="4"></td></tr><!--bof currencies //-->

 

That may be what is breaking your bottom two boxes on the right side.

 

Thank you - I hadn't even noticed the two boxes :'(

Link to comment
Share on other sites

If you install the template module, look at this:

http://addons.oscommerce.com/info/7406

This gives you a nice horizontal menu across the top.

 

If you get menu installed, replace the superfish.css file with the original superfish.css or add superfish-navbar.css option from the superfish site referenced in the contribution, you'll get a nice clean horizontal menu that may be easier to style.

Oscommerce site:

 

 

OSC to CSS, http://addons.oscommerce.com/info/7263 -Mail Manager, http://addons.oscommerce.com/info/8120

Link to comment
Share on other sites

If you install the template module, look at this:

http://addons.oscommerce.com/info/7406

This gives you a nice horizontal menu across the top.

 

If you get menu installed, replace the superfish.css file with the original superfish.css or add superfish-navbar.css option from the superfish site referenced in the contribution, you'll get a nice clean horizontal menu that may be easier to style.

 

Thanks George - I actually did try that, but it didn't work - all the text from the categories ended up down the side of the page!! I'll go back to that some other time.

There might be something else you can help with tho - I downloaded your One Folder Template and can't get it to work. The templates are there in admin, and I can switch from one to the other ok, but they seem to be using the main stylesheet, and not the ones attached to the individual templates. I've looked on here to see if I can find where anyone else has a similar problem, but no, seems it's just me, lol, so I obviously did something daft somewhere. Can you tell me what I need to be looking for, and where?

Thanks

:)

Link to comment
Share on other sites

You are still connected to the original stylesheet but It looks like you have everything else installed correctly. Redo step 2 in the instructions and that should fix it. (Since you are getting the template buttons and images correctly, it is probably just that you missed the stylesheet part, or second part below , of step 2):

 

Step 2: Open includes/application_top.php

 

find:

// set the application parameters
$configuration_query = tep_db_query('select configuration_key as cfgKey, configuration_value as cfgValue from ' . TABLE_CONFIGURATION);
while ($configuration = tep_db_fetch_array($configuration_query)) {
define($configuration['cfgKey'], $configuration['cfgValue']);
} 

 

just beneath add:

//START TEMPLATES
$template_query = tep_db_query("select configuration_title from " . TABLE_CONFIGURATION . " where configuration_description ='template'");
$template_value = tep_db_fetch_array($template_query);
$template_name = $template_value['configuration_title'];
define('DIR_WS_TIMAGES', 'templates/'.$template_name.'/template_images/'); 
define('DIR_WS_BUTTONS', 'templates/'.$template_name.'/buttons/');
define('DIR_WS_PLUGINS', 'templates/'.$template_name.'/plugins/');
//END TEMPLATES 

--------------------------------------

 

find:

$stylesheet='<link rel="stylesheet" type="text/css" href="stylesheet.css">'; 

 

change to:

$stylesheet='<link rel="stylesheet" type="text/css" href="templates/'.$template_name.'/stylesheet.css">';

Oscommerce site:

 

 

OSC to CSS, http://addons.oscommerce.com/info/7263 -Mail Manager, http://addons.oscommerce.com/info/8120

Link to comment
Share on other sites

Thanks George - I actually did try that, but it didn't work - all the text from the categories ended up down the side of the page!! I'll go back to that some other time.

There might be something else you can help with tho - I downloaded your One Folder Template and can't get it to work. The templates are there in admin, and I can switch from one to the other ok, but they seem to be using the main stylesheet, and not the ones attached to the individual templates. I've looked on here to see if I can find where anyone else has a similar problem, but no, seems it's just me, lol, so I obviously did something daft somewhere. Can you tell me what I need to be looking for, and where?

Thanks

:)

 

PS, There are two reasons it is not working. 1) You are still connected to the original stylesheet, once you fix your other issue, you will be halfway to fixing this one

Getting the stylesheet call fixed in includes/application_top.php will allow you to easily install multiple stylesheets per template. (The horizontal menu uses it's own stylesheet, superfish.css)

 

2) you need to add the bit of javascript for the superfish.css menu to includes/template_top.php lke this:.

 

open includes/template_top.php

 

just above the closing </head> tag add:

 

<script type="text/javascript"> 
$(document).ready(function(){ 
$("ul.sf-menu").superfish(); 
}); 
</script>

Oscommerce site:

 

 

OSC to CSS, http://addons.oscommerce.com/info/7263 -Mail Manager, http://addons.oscommerce.com/info/8120

Link to comment
Share on other sites

You are still connected to the original stylesheet but It looks like you have everything else installed correctly. Redo step 2 in the instructions and that should fix it. (Since you are getting the template buttons and images correctly, it is probably just that you missed the stylesheet part, or second part below , of step 2):

 

Step 2: Open includes/application_top.php

 

find:

// set the application parameters
$configuration_query = tep_db_query('select configuration_key as cfgKey, configuration_value as cfgValue from ' . TABLE_CONFIGURATION);
while ($configuration = tep_db_fetch_array($configuration_query)) {
define($configuration['cfgKey'], $configuration['cfgValue']);
} 

 

just beneath add:

//START TEMPLATES
$template_query = tep_db_query("select configuration_title from " . TABLE_CONFIGURATION . " where configuration_description ='template'");
$template_value = tep_db_fetch_array($template_query);
$template_name = $template_value['configuration_title'];
define('DIR_WS_TIMAGES', 'templates/'.$template_name.'/template_images/'); 
define('DIR_WS_BUTTONS', 'templates/'.$template_name.'/buttons/');
define('DIR_WS_PLUGINS', 'templates/'.$template_name.'/plugins/');
//END TEMPLATES 

--------------------------------------

 

find:

$stylesheet='<link rel="stylesheet" type="text/css" href="stylesheet.css">'; 

 

change to:

$stylesheet='<link rel="stylesheet" type="text/css" href="templates/'.$template_name.'/stylesheet.css">';

 

I checked and I had already done both of the above. Just in case I copied and pasted them from here, same result - changes to the main stylesheet work, changes to any of the template stylesheets don't.

:(

Link to comment
Share on other sites

Hi

 

At your website, simplyscent.co.uk I see that you have this in the header:

 

<base href="http://www.simplyscent.co.uk/">
<link rel="stylesheet" type="text/css" href="stylesheet.css">

 

This is the original stylesheet. You should have this:

 

<base href="http://www.simplyscent.co.uk/">
<link rel="stylesheet" type="text/css" href="templates/apple/stylesheet.css">

where 'apple' is the name of the template chosen. If you chose in the admin 'original' you would have:

 

<base href="http://www.simplyscent.co.uk/">
<link rel="stylesheet" type="text/css" href="templates/original/stylesheet.css">

Oscommerce site:

 

 

OSC to CSS, http://addons.oscommerce.com/info/7263 -Mail Manager, http://addons.oscommerce.com/info/8120

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...