Jump to content
Sign in to follow this  
Brenden

[Contribution] Basic Template Structure v1.0 - For MS2

Recommended Posts

I was ready to start looking around for another shop solution that was easier to change the look and feel. I found this mod. I've not delved deepy into modifying my site layout as yes but after installing (no problems at all!) and looking over the template files i cant see there being any problems.

 

Many many thanks.


Gareth Morris

Webmaster: www.nwdnb.co.uk

Share this post


Link to post
Share on other sites

Hi

 

anyone know what this contributioin does? I really don't know what it does. does this contribution make it ez to customize your website or what? Can someone show me a demo like how they customize their website I want to see how this work.

 

As of now, I have no ideas what this contribition suppose to do..

Share this post


Link to post
Share on other sites

@ aboyz

this is a great contrib, it can cut your time in half if you ask me,

it's a heck of a lot easier to develop the site using familiar tables and plain old html, for the most part, i say give it a shot.

as for the demo here is one not fully done yet i'm still working on it

but have a look anyways http://deeann.kndgdesign.com it can be done without this contrib but it makes life simpler to us it

THX


The more you do, the more you learn

Share this post


Link to post
Share on other sites

Ok..

 

I have installed this contribution, but my store look the same? how do i cuztomize it .? I don't get it? where do i edit the look or add stuff. Stiff confusing to me on how to customize stuff.. I can do this with the orginal OSC.. what is the use of this? I just don't get it. I thought this is just a plug and play.. thing... I guess wrong!!.

 

Can someone help me on customizing my site cuz it look the same. when i install all the file..

Share this post


Link to post
Share on other sites

well the purpose of this template is to make things easier for you

that's all ,,,,and the design proccess well that's too long of a topc to teach you exactly what where and how, i'm working on a manual for this but it's ages from being done.

As of to where you make the chages: you change the look

of the site by modifing files in your ..catalog/templates/ directory :wink:


The more you do, the more you learn

Share this post


Link to post
Share on other sites

I have installed osC-Affiliate and it's working great but the design is not carrying over. The Affiliate files have not been modified for BTS.

 

How do I do this? Is it easy enough. If it is I will do it, make sure it works and post it here for anybody else to use. I just need to know the basic structure of BTS so I can incorporate into this.

 

osC-Affiliate site:

http://sourceforge.net/project/showfiles.p...lease_id=172110

Just in case you all wanna download and try it out yourselves.

 

My Site affiliate page:

http://www.jehova-nisi.com/index.php

The link is at the bottom of the left column.


Samuel Mateo, Jr.

osC 2.2 MS2

Installed Mods:

WYSIWYG HTMLArea 1.7 | Basic Template System 1.0 | osC-Affiliate | OSC-SupportTicket

Featured Products 1.3 | LoginBox 5.2 | LatestNews 1.1.3 | Extras for IE

Share this post


Link to post
Share on other sites

ok i got a new one why is that my tell_a_friend box takes me to shopping cart?

what i mean is if you click the envelope it should thake you to

tell_a_friend.php, but what happens is it adds the product to the shopping cart.

Any Ideas?

THX :wink:


The more you do, the more you learn

Share this post


Link to post
Share on other sites
Would the (include_path='.;c:You'd probably change it in WINNTphp.ini, but that probably is not the problem. You would be using a relative path (i.e. the . is what is important).

 

For some reason, your DIR_WS_INCLUDES is not getting defined. Verify that the require('includes/application_top.php'); line is above 5 in the file that is giving the error. If not, you need to shuffle the lines so that application_top.php is included before any other includes/requires are processed.

 

Hth,

Matt

Still stuck here Matt.. I have no idea what file is that is giving the error. I again just uploaded a clean MS2 and the BTS v.1 It's still shot down. Any help would be appreciated if you can figure it out if not, that's fine too.

Thanks

Share this post


Link to post
Share on other sites
I have installed osC-Affiliate and it's working great but the design is not carrying over. The Affiliate files have not been modified for BTS.

 

How do I do this? Is it easy enough. If it is I will do it, make sure it works and post it here for anybody else to use. I just need to know the basic structure of BTS so I can incorporate into this.

 

osC-Affiliate site:

http://sourceforge.net/project/showfiles.p...lease_id=172110

Just in case you all wanna download and try it out yourselves.

 

My Site affiliate page:

http://www.jehova-nisi.com/index.php

The link is at the bottom of the left column.

A little help would be appreciated. :roll:

 

Thanks in advance. :D


Samuel Mateo, Jr.

osC 2.2 MS2

Installed Mods:

WYSIWYG HTMLArea 1.7 | Basic Template System 1.0 | osC-Affiliate | OSC-SupportTicket

Featured Products 1.3 | LoginBox 5.2 | LatestNews 1.1.3 | Extras for IE

Share this post


Link to post
Share on other sites

BTS and infoboxes.

I would like to know how to write an "if" statement to have an info box display only on the home page, and another "if" statement to not have one display on the home page.

 

I am not sure how to write these when using the BTS mod. :cry:

Share this post


Link to post
Share on other sites
I have installed osC-Affiliate and it's working great but the design is not carrying over. The Affiliate files have not been modified for BTS.

 

How do I do this? Is it easy enough. If it is I will do it, make sure it works and post it here for anybody else to use. I just need to know the basic structure of BTS so I can incorporate into this.

 

osC-Affiliate site:

http://sourceforge.net/project/showfiles.p...lease_id=172110

Just in case you all wanna download and try it out yourselves.

 

My Site affiliate page:

http://www.jehova-nisi.com/index.php

The link is at the bottom of the left column.

A little help would be appreciated. :roll:

 

Thanks in advance. :D

 

You obviously know how many different file for the affiliate mod there are in the catalog directory, so heres an example for affiliate_affiliate.php..

 

This becomes affiliate_affiliate.php and is in the root directory(catalog)

 

 

<?php

/*

 $Id: affiliate_affiliate.php,v 1.8 2003/02/19 00:28:16 harley_vb Exp $



 OSC-Affiliate



 Contribution based on:



 osCommerce, Open Source E-Commerce Solutions

 http://www.oscommerce.com



 Copyright (c) 2002 - 2003 osCommerce



 Released under the GNU General Public License

*/



 require('includes/application_top.php');



 if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'process')) {

   $affiliate_username = tep_db_prepare_input($HTTP_POST_VARS['affiliate_username']);

   $affiliate_password = tep_db_prepare_input($HTTP_POST_VARS['affiliate_password']);



// Check if username exists

   $check_affiliate_query = tep_db_query("select affiliate_id, affiliate_firstname, affiliate_password, affiliate_email_address from " . TABLE_AFFILIATE . " where affiliate_email_address = '" . tep_db_input($affiliate_username) . "'");

   if (!tep_db_num_rows($check_affiliate_query)) {

     $HTTP_GET_VARS['login'] = 'fail';

   } else {

     $check_affiliate = tep_db_fetch_array($check_affiliate_query);

// Check that password is good

     if (!tep_validate_password($affiliate_password, $check_affiliate['affiliate_password'])) {

       $HTTP_GET_VARS['login'] = 'fail';

     } else {

       $affiliate_id = $check_affiliate['affiliate_id'];

       tep_session_register('affiliate_id');



       $date_now = date('Ymd');



       tep_db_query("update " . TABLE_AFFILIATE . " set affiliate_date_of_last_logon = now(), affiliate_number_of_logons = affiliate_number_of_logons + 1 where affiliate_id = '" . $affiliate_id . "'");



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

     }

   }

 }



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



 $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_AFFILIATE, '', 'SSL'));





 $content = CONTENT_AFFILIATE;



 require(DIR_WS_TEMPLATES . TEMPLATE_NAME . '/' . TEMPLATENAME_MAIN_PAGE);



 require(DIR_WS_INCLUDES . 'application_bottom.php');

?>

 

This becomes affiliate_affiliate.tpl.php and is put in the templatescontent folder...

 

    <table border="0" width="100%" cellspacing="0" cellpadding="<?php echo CELLPADDING_SUB; ?>">

     <tr>

       <td><table border="0" width="100%" cellspacing="0" cellpadding="0">

         <tr>

           <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>

           <td rowspan="2" class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_login.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

         </tr>

       </table></td>

     </tr>

     <tr>

       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

     </tr>

<?php

 if (isset($HTTP_GET_VARS['login']) && ($HTTP_GET_VARS['login'] == 'fail')) {

   $info_message = TEXT_LOGIN_ERROR;

 }



 if (isset($info_message)) {

?>



     <tr>

       <td class="smallText"><?php echo $info_message; ?></td>

     </tr>

     <tr>

       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

     </tr>

<?php

 }

?>

     <tr>

       <td><?php echo tep_draw_form('login', tep_href_link(FILENAME_AFFILIATE, 'action=process', 'SSL')); ?><table border="0" width="100%" cellspacing="0" cellpadding="2">

         <tr>

           <td class="main" width="50%" valign="top"><b><?php echo HEADING_NEW_AFFILIATE; ?></b></td>

           <td class="main" width="50%" valign="top"><b><?php echo HEADING_RETURNING_AFFILIATE; ?></b></td>

         </tr>

         <tr>

           <td width="50%" height="100%" valign="top"><table border="0" width="100%" height="100%" cellspacing="0" cellpadding="1" class="infoBox">

             <tr>

               <td><table border="0" width="100%" height="100%" cellspacing="0" cellpadding="2" class="infoBoxContents">

                 <tr>

                   <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

                 </tr>

                 <tr>

                   <td class="main" valign="top"><?php echo TEXT_NEW_AFFILIATE . '<br><br>' . TEXT_NEW_AFFILIATE_INTRODUCTION; ?></td>

                 </tr>

                 <tr>

                   <td class="smallText" colspan="2"><?php echo '<a  href="' . tep_href_link(FILENAME_AFFILIATE_TERMS, '', 'SSL') . '">' . TEXT_NEW_AFFILIATE_TERMS . '</a>'; ?></td>

                 </tr>

                 <tr>

                   <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

                 </tr>

               </table></td>

             </tr>

           </table></td>

           <td width="50%" height="100%" valign="top"><table border="0" width="100%" height="100%" cellspacing="0" cellpadding="1" class="infoBox">

             <tr>

               <td><table border="0" width="100%" height="100%" cellspacing="0" cellpadding="2" class="infoBoxContents">

                 <tr>

                   <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

                 </tr>

                 <tr>

                   <td class="main" colspan="2"><?php echo TEXT_RETURNING_AFFILIATE; ?></td>

                 </tr>

                 <tr>

                   <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

                 </tr>

                 <tr>

                   <td class="main"><b><?php echo TEXT_AFFILIATE_ID; ?></b></td>

                   <td class="main"><?php echo tep_draw_input_field('affiliate_username'); ?></td>

                 </tr>

                 <tr>

                   <td class="main"><b><?php echo TEXT_AFFILIATE_PASSWORD; ?></b></td>

                   <td class="main"><?php echo tep_draw_password_field('affiliate_password'); ?></td>

                 </tr>

                 <tr>

                   <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

                 </tr>

                 <tr>

                   <td class="smallText" colspan="2"><?php echo '<a href="' . tep_href_link(FILENAME_AFFILIATE_PASSWORD_FORGOTTEN, '', 'SSL') . '">' . TEXT_AFFILIATE_PASSWORD_FORGOTTEN . '</a>'; ?></td>

                 </tr>

                 <tr>

                   <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

                 </tr>

               </table></td>

             </tr>

           </table></td>

         </tr>

             <tr>

               <td colspan="2"><table border="0" width="100%" cellspacing="0" cellpadding="2" class="infoBoxContents">

         <tr>

           <td width="50%" align="left" valign="top"><?php echo '<a href="' . tep_href_link(FILENAME_AFFILIATE_SIGNUP, '', 'SSL') . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>

           <td width="50%" align="right" valign="top"><?php echo tep_image_submit('button_login.gif', IMAGE_BUTTON_LOGIN); ?></td>

         </tr>

               </table></td>

             </tr>

       </table></form></td>

     </tr>

   </table>

 

open the folder includes... and then the filenames.php and add ...

 

// Lango added for Affiliate Mod: BOF

 define('CONTENT_AFFILIATE', 'affiliate_affiliate');

// the rest go in here............

// Lango added for Affiliate Mod: EOF

 

also...

 

// Lango added for Affiliate Mod: BOF

 define('FILENAME_AFFILIATE', CONTENT_AFFILIATE . '.php');

// again the rest go in here....

// Lango added for Affiliate Mod: BOF

 

And I think that should do it :wink:

Share this post


Link to post
Share on other sites
I am still trying to exclude certin info boxes from the home page using "if" statements, any ideas?

 

To exclude boxes from certain pages is relatively easy,

Index.php for example you coud use this if statement in each box file you want to exclude...

 

  if (substr(basename($PHP_SELF), 0, 5) !='index') {

// include box

}

 

The only problem with this is the 3 parts to index.php

default, nested and products, it will stop your box from displaying in all these.

Share this post


Link to post
Share on other sites

Hey Lango,

Can you explain what you did to split up the file? Is it just separate the html fomr the php?

I appreciate your help.


Samuel Mateo, Jr.

osC 2.2 MS2

Installed Mods:

WYSIWYG HTMLArea 1.7 | Basic Template System 1.0 | osC-Affiliate | OSC-SupportTicket

Featured Products 1.3 | LoginBox 5.2 | LatestNews 1.1.3 | Extras for IE

Share this post


Link to post
Share on other sites

OK,

I think I figured out it's almost there, but I'm getting this error.

 

Warning: main(templates/content/affiliate_affiliate.tpl.php): failed to open stream: No such file or directory in /home2/nisi/public_html/templates/main_page.tpl.php on line 116



Fatal error: main(): Failed opening required 'templates/content/affiliate_affiliate.tpl.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home2/nisi/public_html/templates/main_page.tpl.php on line 116

 

This is that line:

    require(DIR_WS_CONTENT . $content . '.tpl.php');

 

I also had to change this line:

  require(DIR_WS_TEMPLATES . TEMPLATE_NAME . '/' . TEMPLATENAME_MAIN_PAGE);

To this so the mod would at least show part of the page.:

  require(DIR_WS_TEMPLATES . TEMPLATENAME_MAIN_PAGE);

 

Thanks.


Samuel Mateo, Jr.

osC 2.2 MS2

Installed Mods:

WYSIWYG HTMLArea 1.7 | Basic Template System 1.0 | osC-Affiliate | OSC-SupportTicket

Featured Products 1.3 | LoginBox 5.2 | LatestNews 1.1.3 | Extras for IE

Share this post


Link to post
Share on other sites

OK, OK, OK!

Nevermind. I figured it out on my own.

Thanks for the Lango. You're a lifesaver.

 

Much Thanks.


Samuel Mateo, Jr.

osC 2.2 MS2

Installed Mods:

WYSIWYG HTMLArea 1.7 | Basic Template System 1.0 | osC-Affiliate | OSC-SupportTicket

Featured Products 1.3 | LoginBox 5.2 | LatestNews 1.1.3 | Extras for IE

Share this post


Link to post
Share on other sites

Man! I hate not being able to edit my posts. Why is that anyways?

 

Anyways...

I meant, thanks for the Help, Lango.


Samuel Mateo, Jr.

osC 2.2 MS2

Installed Mods:

WYSIWYG HTMLArea 1.7 | Basic Template System 1.0 | osC-Affiliate | OSC-SupportTicket

Featured Products 1.3 | LoginBox 5.2 | LatestNews 1.1.3 | Extras for IE

Share this post


Link to post
Share on other sites

i have some massive bugs in my osc system.

 

Everytime when i click on a link i see the same page. Only the start page is correct. For example when i click on the advanced search button he takes me to the advanced_search.php, but the content is the same as in every page. The content is just likt this:

 

Heading_Title

 

Welcometext (with login ...)

 

And the New Products tabel

 

 

and this content is on every page. Only the Index.php has the right content.

 

Whats wrong with it? I have the newest version of oscommerce and the template systen

Share this post


Link to post
Share on other sites
The only problem with this is the 3 parts to index.php

default, nested and products, it will stop your box from displaying in all these.

Any way to exclude just the default page?

Share this post


Link to post
Share on other sites

I have quickly tested this and it seems to work Ok

 

  if ((substr(basename($PHP_SELF), 0, 5) !='index') | ($cPath > 0)) { 

// include box 

}

Share this post


Link to post
Share on other sites

Can anyone help - it looks like I am missing something. Installed this contribution but I am getting the following error message.

 

Warning: main(templates/TEMPLATENAME_MAIN_PAGE) [function.main]: failed to create stream: No such file or directory in /home/.sites/90/site140/web/catalog/index.php on line 150

 

Fatal error: main() [function.main]: Failed opening required 'templates/TEMPLATENAME_MAIN_PAGE' (include_path='.:/usr/lib/php') in /home/.sites/90/site140/web/catalog/index.php on line 150

 

Looks like something is just not being recognised but I am a bit stuck.

 

Thanks.

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  

×