Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

BTSv1.2 Support


paulm2003

Recommended Posts

Sorry to be thick but how do i use it?
good question, allthough it probably has been answered before :) , but since the search can be a real pain I'll try to help:

 

The idea is that i.s.o. having to edit all files in the directory catalogue and more to change the layout, you now only edit main_page.tpl.php (file in your template dir) for global changes. And box.tpl.php to change the layout of the boxes. Or, if you like, you can easyly create individual templates for each box you like. Just copy box.tpl.php and rename it to the box you want a separate template for and save it back to the boxes templates directory. There's also a directory content where the middle content templates reside.

 

Most of the the layout code is separated from the logic, so the templates are easyer to edit.

 

Another feature is that you will be able to have more than one template and switch between those templates very easyly, read the manual if you need to know how.

Link to comment
Share on other sites

  • Replies 377
  • Created
  • Last Reply

Top Posters In This Topic

hi drs101, login to the admin page under the "configuration" section select the "Maximum Values" then change the "Categories to list per row" to 6 instead of 3. Hope this help.

Link to comment
Share on other sites

Hi Guys,

 

I am trying to install the sitemap contrib with bts v1.3, but I keep getting this error

 

Warning: main(templates/32-final/content/CONTENT_SITEMAP.tpl.php): failed to open stream: No such file or directory in /home/mobiacc/public_html/teststore/templates/32-final/main_page.tpl.php on line 121

 

Fatal error: main(): Failed opening required 'templates/32-final/content/CONTENT_SITEMAP.tpl.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/mobiacc/public_html/teststore/templates/32-final/main_page.tpl.php on line 121

 

Obviously I have modded the site map files to suit bts 1.3 but now I am a bit stuck, if someone could have a look at both the files below and let me know what I am missing?

 

catalog/sitemap.php

 

<?php
/*
 $Id: sitemap.php,v 1.42 2003/06/12 12:17:07 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

 require('includes/application_top.php');

 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_SITEMAP);

 $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_SITEMAP));

 $content = CONTENT_SITEMAP;

 require(DIR_WS_TEMPLATES . TEMPLATENAME_MAIN_PAGE);

 require(DIR_WS_INCLUDES . 'application_bottom.php');
?>

 

catalog/templates/32-final/content/sitemap.php

 

                        <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
     <tr>
       <td><table border="0" width="100%" cellspacing="1" cellpadding="2">
         <tr>
           <td width="50%" class="main" valign="top"><?php require DIR_WS_CLASSES . 'category_tree.php'; $osC_CategoryTree = new osC_CategoryTree; echo $osC_CategoryTree->buildTree(); ?></td>
           <td width="50%" class="main" valign="top">
             <ul>
               <li><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . PAGE_ACCOUNT . '</a>'; ?></li>
               <ul>
                 <li><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT_EDIT, '', 'SSL') . '">' . PAGE_ACCOUNT_EDIT . '</a>'; ?></li>
                 <li><?php echo '<a href="' . tep_href_link(FILENAME_ADDRESS_BOOK, '', 'SSL') . '">' . PAGE_ADDRESS_BOOK . '</a>'; ?></li>
                 <li><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT_HISTORY, '', 'SSL') . '">' . PAGE_ACCOUNT_HISTORY . '</a>'; ?></li>
                 <li><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT_NEWSLETTERS, '', 'SSL') . '">' . PAGE_ACCOUNT_NOTIFICATIONS . '</a>'; ?></li>
               </ul>
                 <li><?php echo '<a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '">' . PAGE_SHOPPING_CART . '</a>'; ?></li>
                 <li><?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . PAGE_CHECKOUT_SHIPPING . '</a>'; ?></li>
                 <li><?php echo '<a href="' . tep_href_link(FILENAME_ADVANCED_SEARCH) . '">' . PAGE_ADVANCED_SEARCH . '</a>'; ?></li>
                 <li><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_NEW) . '">' . PAGE_PRODUCTS_NEW . '</a>'; ?></li>
                 <li><?php echo '<a href="' . tep_href_link(FILENAME_SPECIALS) . '">' . PAGE_SPECIALS . '</a>'; ?></li>
                 <li><?php echo '<a href="' . tep_href_link(FILENAME_REVIEWS) . '">' . PAGE_REVIEWS . '</a>'; ?></li>
                 <li><?php echo BOX_HEADING_INFORMATION; ?></li>
               <ul>
                 <li><?php echo '<a href="' . tep_href_link(FILENAME_SHIPPING) . '">' . BOX_INFORMATION_SHIPPING . '</a>'; ?></li>
                 <li><?php echo '<a href="' . tep_href_link(FILENAME_PRIVACY) . '">' . BOX_INFORMATION_PRIVACY . '</a>'; ?></li>
                 <li><?php echo '<a href="' . tep_href_link(FILENAME_CONDITIONS) . '">' . BOX_INFORMATION_CONDITIONS . '</a>'; ?></li>
                 <li><?php echo '<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a>'; ?></li>
               </ul>
             </ul>
           </td>
         </tr>
       </table></td>
     </tr>
   </table></td>

 

This is really starting to bug me!

 

Thanks

 

Mark

Lifes a bitch, then you marry one, then you die!

Link to comment
Share on other sites

Hi JD,

 

I have added this line to filenames.php

 

define('FILENAME_SITEMAP', CONTENT_SITEMAP . '.php');

 

I now get this error

 

Warning: main(includes/languages/english/CONTENT_SITEMAP.php): failed to open stream: No such file or directory in /home/mobiacc/public_html/teststore/sitemap.php on line 15

 

Fatal error: main(): Failed opening required 'includes/languages/english/CONTENT_SITEMAP.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/mobiacc/public_html/teststore/sitemap.php on line 15

Lifes a bitch, then you marry one, then you die!

Link to comment
Share on other sites

If you have loaded the bts.sql file in phpMyadmin there should be two new settings in admin under "Configuration :: My Store" (at the bottom):

 

1) Default Template Directory

2) Template Switching Allowed

upploading to the right database relly did the trick......

Link to comment
Share on other sites

upploading to the right database relly did the trick......

:D that one still misses from my long osC blooper list:

editted wrong files, uploaded wrong files, downloaded wrong files, saved wrong files, installed wrong contributions, posted to and or searched the wrong threads, argued with the wrong people, changed the wrong settings, asked the wrong questions, made many typo's etc.

 

But hey, finally it really worked as I wanted!

The trick is not to give up until you succeed :)

Link to comment
Share on other sites

Hi,

 

I'm trying to set up BTS on a site that's going to have completly seperate template per category. Everything works great but I'd like to have an automatic way of calling the template I want for the category. It seems to me mod_rewrite would be perfect but I'm having some trouble working out the rules.

 

I've had some luck getting specific pages to pop to the main template

 

RewriteRule ^shopping_cart\.php$ shopping_cart.php/tplDir/NVhome

 

works like a charm

 

but what I need to do now is figure out the rule that would append the tpldir to a specific cat. So

 

/index.php/cPath/1

 

would end up

 

/index.php/cPath/1/tplDir/NVcat1tmp

 

I figure in this way I can use BTS to do whatever I like template wise but the syntax of my rule won't work. Has anybody else attempted this and would you mind sharing a bit?

 

Thanks for any help!

Iggy

Everything's funny but nothing's a joke...

Link to comment
Share on other sites

I'm trying to set up BTS on a site that's going to have completly seperate template per category.
sounds interesting. Can't you just check what the current cPath value is with some easy lines of php code and load the template depending on the cPath value?

 

something like (in includes/configure_bts.php):

// bof cPath template loader
if (CPATH_TEMPLATE_SWITCHING == 'true') {
if ($cPatch == '2') {
 $tplDir = DIR_WS_TEMPLATES_BASE . CPATH_2_TEMPLATE;
 }
}

just some sample code, don't even know if someting like $cPath currently exists in osC. And probably better to use a CASE anyway.

Link to comment
Share on other sites

Hello...

 

I'm having this error:

 

Warning: main(includes/database_tables.php): failed to open stream: No such file or directory in /home/hosting/public_html/lingerie/includes/application_top.php on line 56

Warning: main(includes/database_tables.php): failed to open stream: No such file or directory in /home/hosting/public_html/lingerie/includes/application_top.php on line 56

Fatal error: main(): Failed opening required 'includes/database_tables.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/hosting/public_html/lingerie/includes/application_top.php on line 56

 

I've uploaded everything and inserted the SQL in Database, but how to solve this? ;)

Link to comment
Share on other sites

I'm having this error:

 

Warning: main(includes/database_tables.php): failed to open stream: No such file or directory in /home/hosting/public_html/lingerie/includes/application_top.php on line 56

Warning: main(includes/database_tables.php): failed to open stream: No such file or directory in /home/hosting/public_html/lingerie/includes/application_top.php on line 56

Fatal error: main(): Failed opening required 'includes/database_tables.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/hosting/public_html/lingerie/includes/application_top.php on line 56

that errror has absolutely nothing to do with the BTS, so I suppose you accidentley posted in the wrong thread,

 

But this part:

Warning: main(includes/database_tables.php): failed to open stream: No such file or directory
obviously says a certain file is missing, maybe it's best to take a close look at that? Edited by John-Doe
Link to comment
Share on other sites

I'm trying to set up BTS on a site that's going to have completly seperate template per category.
sounds interesting. Can't you just check what the current cPath value is with some easy lines of php code and load the template depending on the cPath value?

 

something like (in includes/configure_bts.php):

// bof cPath template loader
if (CPATH_TEMPLATE_SWITCHING == 'true') {
if ($cPatch == '2') {
?$tplDir = DIR_WS_TEMPLATES_BASE . CPATH_2_TEMPLATE;
?}
}

just some sample code, don't even know if someting like $cPath currently exists in osC. And probably better to use a CASE anyway.

Actually that's probably a better solution than plugging in a ton of rewrite rules and keeps it all in oscommerce. I'll give it a shot and post back my results.

 

Thanks!

Iggy

Everything's funny but nothing's a joke...

Link to comment
Share on other sites

I seem to be having a problem with my template that I got for the BTS system.

 

Could someone take a look and let me know what you think might be wrong.

 

LHSMarkets.com

 

Any input about this would be helpful.

 

I am working with my ISP to correct the problem.

 

They tell me the reason that it looks the way it does is because I have not uploaded any images., I think that is a little far fetched.

 

I am using OS Commerce 2.2 m2 Max 1.7.0 with BTS 1.3a

 

Thank you.

 

Leon

Link to comment
Share on other sites

Hy to everybody, I'm using BTS and I thing it's very good, but I have some problems to change some boxes layout.

Actually I have problems to change the layout of "new products" (like "New products for september") box that usually is in the home page.

I saw that the file is "new_products.php", that create a "boxContent" class variable. So how can I change layout? Do I have to modify standard boxes classes? Do I have to create new files (I think and I hope so)?

 

bye and thanks in advance

Link to comment
Share on other sites

Hi There,

 

I've been trying to get BTS template switching to work via mod_rewrite and got it far enough that I can swap templates for categories, products. The only problem is that the checkout seems to call a self-referencing url (written into the href field) when going to checkout maing it impossible to call a different templ dir.

 

Can anyone tell me why checkout pulls the complete url (including templ dir) into the source and why? I'm thinking I can just go ax the self reference but I don't want to bust anything.

 

Thanks!

Iggy

Everything's funny but nothing's a joke...

Link to comment
Share on other sites

Hello,

 

I have installed BTS 1.3 and Skin 32-final. I want to set this theme, but I can't do it!!!

 

It says

Remove this menu by setting template switching allowed to false in admin, or by renaming "templates/common_top_bts.php

but I can't find this feature in admin panel... and when renaming the file, the default theme is OneTable-fluid.

 

Any help?

 

Thank you <_<

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