Jump to content
Sign in to follow this  
ecartz

Basic Template Structure 1.7

Recommended Posts

When I upload it, BTS 1.7 will be updated to the 2.2 RC2a standards. From the changelog:

Changes in BTS v1.7 from v1.6

 

Modified all files to use the new RC2a behavior rather than the MS2 behavior. I.e. where BTS 1.6 was the same as 2.2 MS2 and 2.2 MS2 and 2.2 RC2a differed, changed to match 2.2 RC2a. In particular, changed the store logo from oscommerce.gif to store_logo.png.

 

Changed the reviews box to match the RC2a naming scheme. It had previously been changed to avoid a conflict between the review page content and the review box (both had a variable with the same name). RC2a fixed the naming conflict, so changed to that naming scheme for maintainability.

 

Removed catalog/redirect.php, catalog/checkout_process.php, and admin/categories.php. All three files were unchanged from 2.2 MS2 except for changes to match 2.2 RC2a. I.e. BTS did not change them at all. It would be better to use the distribution defaults of these three files for easier maintainability.

 

Changed the layout to match the MS2 and RC2a handling of textareas. This makes it easier to compare to what the current distribution has. I left the added h1 tags, which have search engine implications.

 

Edited BTS.sql to remove the table ALTERs: these are unneeded for RC2a.

The Basic Template Structure location in the contributions area remains the same.

 

There is no functional improvement in this release. The only changes are to increase compatibility with RC2a. Therefore, no upgrade instructions have been provided. If you are using an older version, you can continue to do so. If you launch a new RC2a store, you can use this version.


Always back up before making changes.

Share this post


Link to post
Share on other sites

You didnot have an instruction to install it with other addons. I already installed head tag SEO and some other addons, and find your addons.

 

I cannot upload your index files and categories files to replace my old one. Could you please give me a step by step instruction how to install your addons if I have installed some other addons

 

Thanks

Share this post


Link to post
Share on other sites

Given the way that the BTS works, it is not really something you can install after installing other contributions. Specific instructions won't work, because they will be heavily dependent on what you have done already.

 

Notionally, what you would do is to create a new store, install the BTS there and then port your contributions and data to the new store. Then replace the existing store with the new store.

 

I find the BTS convenient for the specific problem of creating a brand new store with a non-standard template. Or creating a demo store with multiple templates. If you just want to modify the template of a running store, you might find the Simple Template System (STS) easier to install. Or just modify the templates of each file manually -- that's probably easier than installing the BTS in that case.

 

Sorry I can't be of more help.


Always back up before making changes.

Share this post


Link to post
Share on other sites

Hi.. I followed the install directions on a vanilla version of osCommerce. osCommerce was up and working before I installed BTS. Now when I try to bring up the website I get nothing but "Illegal template directory!".

 

Any hints?

Share this post


Link to post
Share on other sites
Hi.. I followed the install directions on a vanilla version of osCommerce. osCommerce was up and working before I installed BTS. Now when I try to bring up the website I get nothing but "Illegal template directory!".

 

Any hints?

 

Got it fixed. Unfortunately, due to lack of support and difficulty in location BTS templates I have decided to go with STS.

Share this post


Link to post
Share on other sites

For others who might encounter the same problem, it looks like illegal template directory is caused by

  if ((ereg('^[[:alnum:]|_|-]+$', $tplDir)) && (is_dir (DIR_WS_TEMPLATES_BASE . $tplDir))){
// 'Input Validated' only allow alfanumeric characters and underscores in template name
define('DIR_WS_TEMPLATES', DIR_WS_TEMPLATES_BASE . $tplDir . '/' ); 
 } else {
if($bts_debug === TRUE) echo strip_tags($tplDir) . '<br>';
exit('Illegal template directory!');
 }

And then at the top of the includes/configure_bts.php there is

  $bts_debug = FALSE;

If you change that to

  $bts_debug = TRUE;

then it should show you what the bad value is.

 

The most likely explanation for this that I can see would be failing to run the BTS.sql file in phpMyAdmin or similar utility, as that sets the default template directory. A way to check this is to go to admin >> Configuration >> My Store and see if the three BTS configuration options appear. The default template directory should start as help.

 

A second possibility is that the templates/help folder did not get uploaded to the shop.

 

A third possibility is that it is looking in the wrong place for the templates directory, e.g. in the site root rather than the shop folder. This might be verified by changing the original code that I posted to

  if ((ereg('^[[:alnum:]|_|-]+$', $tplDir)) && (is_dir (DIR_FS_CATALOG . DIR_WS_TEMPLATES_BASE . $tplDir))){
// 'Input Validated' only allow alfanumeric characters and underscores in template name
define('DIR_WS_TEMPLATES', DIR_WS_TEMPLATES_BASE . $tplDir . '/' ); 
 } else {
if($bts_debug === TRUE) echo strip_tags($tplDir) . '<br>';
exit('Illegal template directory!');
 }

Only the first line changed, with DIR_FS_CATALOG . added. Note that I haven't tried this code, because I haven't encountered this situation. This change might get you past this error only to get a different error or erroneous behavior (rather than an error message).


Always back up before making changes.

Share this post


Link to post
Share on other sites

hi , i have installed on RC2 W3C nad actually in customer make a buy i recive notification email , confir order

 

but I do not receive the order within the admin in the client account. again I receives this error message in account.php

 

1054 - Unknown column 's.public_flag' in 'where clause'

 

select o.orders_id, o.date_purchased, o.delivery_name, o.delivery_country, o.billing_name, o.billing_country, ot.text as order_total, s.orders_status_name from orders o, orders_total ot, orders_status s where o.customers_id = '2' and o.orders_id = ot.orders_id and ot.class = 'ot_total' and o.orders_status = s.orders_status_id and s.language_id = '4' and s.public_flag = '1' order by orders_id desc limit 3

 

[TEP STOP]

Share this post


Link to post
Share on other sites
1054 - Unknown column 's.public_flag' in 'where clause'
That's the error that you get when you are using a pre-RC2a database with RC2a code. You should either update your database to RC2a or use an older version of the contribution.

 

There is a contribution from Jan Zonjee for updating to RC2a. I haven't used it, but I would expect it to cover this issue.


Always back up before making changes.

Share this post


Link to post
Share on other sites

i installed BTS 1.7 and the admin panel shows the template options in the store menu. I however do not see any option on the site page to switch the template. how and where are you supposed to switch the template?

Share this post


Link to post
Share on other sites

In admin >> Configuration >> My Store, there should be an option for "Template Switching Allowed". Set that to true, and the template switcher should appear at the top of the page in the included templates. If you need to add it to a new template, it's the following code:

<?php
// include template switcher in every template
if ( bts_select('common', 'common_top.php') ) include (bts_select('common', 'common_top.php')); // BTSv1.5
?>


Always back up before making changes.

Share this post


Link to post
Share on other sites

I'm sorry, after installed v1.7,I confronted with this:

Fatal error: Cannot redeclare do_magic_quotes_gpc() (previously declared in C:\AppServ\www\oscomm_bs\catalog\includes\functions\compatibility.php:18) in C:\AppServ\www\oscomm_bs\catalog\includes\functions\compatibility.php on line 28

 

When I searched for "do_magic_quotes_gpc"

 

find 'do_magic_quotes_gpc' in 'C:\AppServ\www\oscomm_bs\catalog\admin\includes\functions\compatibility.php':

C:\AppServ\www\oscomm_bs\catalog\admin\includes\functions\compatibility.php(18):

function do_magic_quotes_gpc(&$ar) {

C:\AppServ\www\oscomm_bs\catalog\admin\includes\functions\compatibility.php(24): do_magic_quotes_gpc($ar[$key]);

C:\AppServ\www\oscomm_bs\catalog\admin\includes\functions\compatibility.php(47): do_magic_quotes_gpc($HTTP_GET_VARS);

C:\AppServ\www\oscomm_bs\catalog\admin\includes\functions\compatibility.php(48): do_magic_quotes_gpc($HTTP_POST_VARS);

C:\AppServ\www\oscomm_bs\catalog\admin\includes\functions\compatibility.php(49): do_magic_quotes_gpc($HTTP_COOKIE_VARS);

find 'do_magic_quotes_gpc' 5 times

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

find 'do_magic_quotes_gpc' in 'C:\AppServ\www\oscomm_bs\catalog\includes\functions\compatibility.php':

C:\AppServ\www\oscomm_bs\catalog\includes\functions\compatibility.php(18):

function do_magic_quotes_gpc(&$ar) {

C:\AppServ\www\oscomm_bs\catalog\includes\functions\compatibility.php(24): do_magic_quotes_gpc($ar[$key]);

C:\AppServ\www\oscomm_bs\catalog\includes\functions\compatibility.php(47): do_magic_quotes_gpc($HTTP_GET_VARS);

C:\AppServ\www\oscomm_bs\catalog\includes\functions\compatibility.php(48): do_magic_quotes_gpc($HTTP_POST_VARS);

C:\AppServ\www\oscomm_bs\catalog\includes\functions\compatibility.php(49): do_magic_quotes_gpc($HTTP_COOKIE_VARS);

find 'do_magic_quotes_gpc' 5 times

 

I do not think these two are conflicted, there is no other declaration for these function.So it must be some other problem.

Any ideas? Thank you in advance

Share this post


Link to post
Share on other sites

I'm sorry, after installed v1.7,I confronted with this:

Fatal error: Cannot redeclare do_magic_quotes_gpc() (previously declared in C:\AppServ\www\oscomm_bs\catalog\includes\functions\compatibility.php:18) in C:\AppServ\www\oscomm_bs\catalog\includes\functions\compatibility.php on line 28

 

 

 

ok, I think the problem was solved.

Just in an incredible way...

After the Fatal error appeared, I do these things, trying the lower BST versions:

replace the files with v1.6 failed;

replace the files with v1.5 failed;

Reinstall the osc v2.2 RC 2a, and try v1.6, failed; v1.5, failed...

Reinstall the osc v2.2 RC 2a, and try v1.7, still failed due to without import the sql file. After I import that,

God revealed!!! Succeed!

I think that maybe have something to do with the Cache, for I simultaneously test two Osc shop on my computer, or other reasons I do not know.

Share this post


Link to post
Share on other sites

Where do you add the code

 

<?php

// include template switcher in every template

if ( bts_select('common', 'common_top.php') ) include (bts_select('common', 'common_top.php')); // BTSv1.5

?>

 

Thanks

Edited by chuck6478

Share this post


Link to post
Share on other sites

Please forgive me as this must be a really basic question.

 

I have just started to learn about databases and phpMyAdmin.

Unfortunately, I really have no idea how to "run the file BTS.sql on your database"

 

Any assistance would be greatly and sincerely appreciated.

 

Thanks!

-Zack

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
Sign in to follow this  

×