Jump to content
Sign in to follow this  
paulm2003

BTSv1.2 Support

Recommended Posts

I tried it with removing repeat, no change in the look. It repeated anyways.

Sorry, my mistake.

It's because this boxheading consists of several td's in a row and the style is applied to all those td's. And it's from left to right in each of th td's, if it was an image from top to bottom (like in the "OneTable") it wouldn't probably be visible.

 

hth

Share this post


Link to post
Share on other sites

I just installed the OsC (latest version) and then BTS (latest version), now when I try placing an order and click "buy it now," my shopping cart page loads but says that nothing is in the cart.

 

No matter what I do, I cannot get products to actually add to the cart since I uploaded the BTS mod.

 

Any ideas?

 

Thanks,

Richard


Cheers,

Richard

Share this post


Link to post
Share on other sites
I just installed the OsC (latest version)

Latest version? What version do you call the latest osC version?

Share this post


Link to post
Share on other sites

Hi Greg,

 

sorry but I don't think your problem has anything to do with the BTS. Never heard of any problem like that before i.c.w. the BTS. Are you 100% sure you didn't make any other change to the shop which could be the cause of your problem?

Edited by paulm2003

Share this post


Link to post
Share on other sites

Hi !

 

I want to create a page where a person can inquire more info on a product.

 

So I've modified the product_info.php and contact_us.php pages

so that it will send the product_name or product_description of an item to the store owner in an email.

 

(modified BTS + template pages)

 

Instead of creating a new page, I used the normal contact_us.php page and instead of an enquiry, it send that info to the store owner in the email.

(or supposed to ) B)

 

SEE FULL POST + links HERE

 

If we can get this working it will be very usefull !

 

I really need some help with this as my Php skills are still limited.

 

Thanks in advance ! :)

Share this post


Link to post
Share on other sites
I want to create a page where a person can inquire more info on a product. 

Ask a Question contribution already exists... adapting existing contributions will save you a significant amount of time and there is rarely a good reason to reinvent the wheel if you don't have to.

 

Based on your questions, I'm assuming you do not know how to modify contributions to work with BTS. The same steps are generally needed to convert any contribution to work with BTS, and this particular add-on is pretty easy since it requires very few changes.

 

1. create a new content template file in templates/content/ask_a_question.tpl.php

2. define the content and filename in includes/filenames.php

define('CONTENT_ASK_A_QUESTION', 'ask_a_question');

define('FILENAME_ASK_A_QUESTION', CONTENT_ASK_A_QUESTION.'.php');

3. move all html output to the template created in step 1, leaving in ask_a_question.php only...

3a. require('includes/application_top.php');

3b. all php code

3c. $content = CONTENT_ASK_A_QUESTION;

require(DIR_WS_TEMPLATES . TEMPLATENAME_MAIN_PAGE);

require(DIR_WS_INCLUDES . 'application_bottom.php');

4. edit the template file to include only "center column" content... no HTML headers, no left/right column references, no footers. In the original ask_a_question.php, it is the part marked by "body text", lines 118-208.

 

Your final ask_a_question.php file will look something like this:

 

  require('includes/application_top.php');

/* begin ask a question php code */
if (!tep_session_is_registered('customer_id') && (ALLOW_GUEST_TO_TELL_A_FRIEND == 'false')) {
$navigation->set_snapshot();
tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
}
 $valid_product = false;
if (isset($HTTP_GET_VARS['products_id'])) {
$product_info_query = tep_db_query("select pd.products_name, p.products_model, p.products_price, p.products_price_suffix, p.products_tax_class_id, p.products_image from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'");
if (tep_db_num_rows($product_info_query)) {
 $valid_product = true;
 $product_info = tep_db_fetch_array($product_info_query);
   }
}

 if (!$valid_product) tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['products_id']));

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

if (tep_session_is_registered('customer_id')) {
   $account_query = tep_db_query("select customers_firstname, customers_lastname, customers_email_address from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$customer_id . "'");
   $account = tep_db_fetch_array($account_query);

   $from_name = $account['customers_firstname'] . ' ' . $account['customers_lastname'];
   $from_email_address = $account['customers_email_address'];
}

if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'process')) {
   $error = false;
   $from_email_address = tep_db_prepare_input($HTTP_POST_VARS['from_email_address']);
   $from_name = tep_db_prepare_input($HTTP_POST_VARS['from_name']);
   $price = tep_db_prepare_input($HTTP_POST_VARS['price']);
   $shipinc = tep_db_prepare_input($HTTP_POST_VARS['shipinc']);
   $storeURL = tep_db_prepare_input($HTTP_POST_VARS['storeURL']);
   $storeName = tep_db_prepare_input($HTTP_POST_VARS['storeName']);
   $storeCity = tep_db_prepare_input($HTTP_POST_VARS['storeCity']);
   $storeState = tep_db_prepare_input($HTTP_POST_VARS['storeState']);
   $storePhone = tep_db_prepare_input($HTTP_POST_VARS['storePhone']);

   if (empty($from_name)) {
     $error = true;
     $messageStack->add('friend', ERROR_FROM_NAME);
   }
   if (!tep_validate_email($from_email_address)) {
     $error = true;
     $messageStack->add('friend', ERROR_FROM_ADDRESS);
   }
if (!$error) {
 if (empty($price) || empty($shipinc)) {
	 $error = true;
	 $messageStack->add('friend', "You did not complete all the required fields");
 }
}
if (!$error) {
 $low_Price = $product_info['products_price'];
 if ($spec_Price = tep_get_products_special_price($product_info['products_id'])) { $low_Price = $spec_Price; }
 $price = preg_replace("/[^\d|\.]/", "", $price);
 if ((float)$price >= (float)$low_Price) {
	 $error = true;
	 $messageStack->add('friend', "The price entered is not lower than our price");
 }
}
if (!$error) {
 if (empty($storeName) || empty($storeCity) || empty($storeState) || empty($storePhone)) {
	 if (empty($storeURL)) {
   $error = true;
   $messageStack->add('friend', "Enter a URL or the name, city, state and phone for a physical location");
	 }
 }
}

if ($error == false) {
 $to_email_address = tep_db_prepare_input(STORE_OWNER_EMAIL_ADDRESS);
 $to_name = tep_db_prepare_input(STORE_OWNER);
 $email_subject = sprintf(TEXT_EMAIL_SUBJECT, $from_name, STORE_NAME);
 $email_body = sprintf(TEXT_EMAIL_INTRO, $from_name, $price, $product_info['products_name'], $product_info['products_model'], $low_Price) . " This price does ";
 if ($shipinc < 0) $email_body .= "not ";
 $email_body .= "include shipping and handling.\n\n";

 $email_body .= sprintf(TEXT_EMAIL_LINK, tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['products_id'])) . "\n\n" . sprintf(TEXT_EMAIL_SIGNATURE, $storeURL . "\n" . $storeName . "\n" . $storeCity . "\n" . $storeState . "\n" . $storePhone . "\n");

 tep_mail($to_name, $to_email_address, $email_subject, $email_body, $from_name, $from_email_address);

 $messageStack->add_session('inline', sprintf(TEXT_EMAIL_SUCCESSFUL_SENT, $price, tep_output_string_protected($to_name)), 'success');

 tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['products_id']));
}
}

 $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_ASK_QUESTION, 'products_id=' . $HTTP_GET_VARS['products_id']));
/* end ask a question php code */

 $content = CONTENT_ASK_A_QUESTION;
 require(DIR_WS_TEMPLATES . TEMPLATENAME_MAIN_PAGE);
 require(DIR_WS_INCLUDES . 'application_bottom.php');

Share this post


Link to post
Share on other sites

OK...first and foremost let me start by saying that i am warning you that this post is lame and should not be for the faint of heart but after too much time wasted and my wife yelling at me to get off the computert i have to ask....please forgive me as i did try to get this resolved myself...

I am having an issue installing BTS and i believe it may be a directory issue or something...:wacko:

here is my directory path that bts installed on...

/home/redlinev/public_html/store/pkg/catalog

 

and my config file located in /home/redlinev/public_html/store/pkg/catalog/includes:

 

 

<?php

/*

$Id: configure.php,v 1.14 2003/07/09 01:15:48 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

// Define the webserver and path parameters

// * DIR_FS_* = Filesystem directories (local/physical)

// * DIR_WS_* = Webserver directories (virtual/URL)

define('HTTP_SERVER', 'http://ghghghgh.com');

define('HTTPS_SERVER', 'https://ghghghgh.com');

define('ENABLE_SSL', false); // secure webserver for checkout procedure?

define('HTTP_COOKIE_DOMAIN', 'http://ghghghgh.com');

define('HTTPS_COOKIE_DOMAIN', 'https://ghghghgh.com');

define('HTTP_COOKIE_PATH', '/');

define('HTTPS_COOKIE_PATH', '/');

define('DIR_WS_HTTP_CATALOG', '/store/');

define('DIR_WS_HTTPS_CATALOG', '/store/');

define('DIR_WS_IMAGES', '/store/images/');

define('DIR_WS_ICONS', '/store/icons/');

define('DIR_WS_INCLUDES', 'includes/');

define('DIR_WS_TEMPLATES', 'templates/');

define('DIR_WS_CONTENT', DIR_WS_TEMPLATES . 'content/');

define('DIR_WS_JAVASCRIPT', DIR_WS_INCLUDES . 'javascript/');

define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');

define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');

define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');

define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');

define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');

 

define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');

define('DIR_FS_CATALOG', dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']));

define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

 

// define our database connection

define('DB_SERVER', 'localhost');

define('DB_SERVER_USERNAME', ghghghgh_osc7');

define('DB_SERVER_PASSWORD', 'ghghghghEDMw');

define('DB_DATABASE', ghghghgh_osc7');

define('USE_PCONNECT', 'false'); // use persistent connections?

define('STORE_SESSIONS', 'mysql');

?>

 

 

I have executed the SQL and inserted into the tables fine...

 

the issue is that when i load osc in the browser there are no changes/no template...like it is not seeing the config file...or the paths are screwed up....

 

here is the configuration on admin screen...

Default Template Directory OneTable-fluid

Template Switching Allowed true

Default Template Directory Closed

Template Switching Allowed true

 

i have followed the directions to a tee (i think :( ) but am just spinning my wheels...i know when i get past this hurdle i can play with the code to make this fun but this emabarrasment has gone to far....i will post any files necessary to get this resolved...and thanks in advance....

 

mark :wacko:

Share this post


Link to post
Share on other sites

Hi Mark,

my wife yelling at me to get off the computer
doesn't your wife understand the sooner your shop is ready the sooner you'll both be rich and famous? :D

 

I have some questions for you:

 

1) Do you have an url so we can take a look?

2) Why did you post your configure.php file?

3) How many times did you load the BTS.sql file? If you load it several times it becomes unclear which of the double settings will or won't work. So you will first have to remove any "doubles" somehow.

Share this post


Link to post
Share on other sites

THANKS FOR THE REPLY....

 

Let me answer your questions...

1) Do you have an url so we can take a look?

The url is http://www.redlinevegas.com/store/

 

2) Why did you post your configure.php file?
You are reading right thru my newbieness...I am actually a SQL SERVER DBA, but feel like a DUMB A$$ getting into new coding territories...

I figured it may help you tracking down issues since i saw a few users post it..at first i though it was a directory issue that was not mapped correctly, since there are no errors, just no changes....

3) How many times did you load the BTS.sql file? If you load it several times it becomes unclear which of the double settings will or won't work. So you will first have to remove any "doubles" somehow.

I may have ran the query more than once...i do some crazy things at 3 am, that may have been one of them....i have no dedication to this database and the copy of osC, so deleting and uploading a new copy from my host admin screen is not out of the question....

 

Again thanks for putting up with my "freshness" :D

 

Mark

Share this post


Link to post
Share on other sites

Thanks Paul...I figured it out and the little lady will actually see me in bed at a decent time tonight... :P

It was a directory issue...when my host set up osC they did not place the catalog in the root of the store....shame on them...i did some playing and figured it out...thanks anyway...BTW the host is anhosting in case anyone does a search and this helps...

regards,

Mark...

Share this post


Link to post
Share on other sites
I may have ran the query more than once...i do some crazy things at 3 am, that may have been one of them....

I don't think it's crazy at all. Actually it's a little tricky that you better can't install the sql file more than once. It's the only step you better skip when re?nstalling.

Share this post


Link to post
Share on other sites

I cannot get the category enhancement contribution working.

 

I get this:

Warning: main(templates/32/box.tpl.php): failed to open stream: No such file or directory in /var/www/html/includes/boxes/categories.php on line 172 .

 

Is it compatable?

 

I have the latest BTS 1.3

Share this post


Link to post
Share on other sites

This was fixed by adding the new lines ( added BTS1.2) from the original categories file. There was some at the beginning and some at the bottom.

Share this post


Link to post
Share on other sites

ok so i'm having a problem staying on task. I want a good way to edit the meta tages on the various pages in oscommerce. I sort of understand the way this works in BTS. I have been looking for a contrib to do this but maybe I would be better off just figuring out how to do it by hand? Is there a way to integrate the Header Tags Controller contrib. into BTS? Mostly I just need some advice on the path to take; use a contribution or should I just figure out how it works?

Edited by Daemonj

Share this post


Link to post
Share on other sites

@Jeremy: it's probably to late for you now, but there is a special BTSv1.2 (compatible with BTSv1.3) version in this package: http://www.oscommerce.com/community/contributions,1768

 

@femto2nd: The most difficult part about the BTS metatags controller is probably to dicover it exists and where it is (allthough a file search for "meta" in your shop will bring you there as fast as lightning of course).

 

Once you have found the "catalog/includes/meta_tags.php" file you should open it read the "// comments" and maybe read some more "/* comments */" and make any changes in the file itself (quite easy, you only need a simple text editor). You need to know what defines are and how they work though (I suppose that's explained in the WIKI somewhere because without knowing about the defines you won't get far with osC anyway).

 

But the best part about this meta tags controller is that you normally don't even need to know how it works, or even how to change settings, Brenden already did all the hard work for you. All you need to do is fill in nice product names and descriptions (admin::categories), and the dynamic meta tags will be created automagicly for you.

Share this post


Link to post
Share on other sites

Tip for non BTS users: it's (probably) very easy to use the BTS dynamic meta tags controller even without using the BTS itself!

 

Just replace the original osC title tag and meta tag lines by:

<?php require(DIR_WS_INCLUDES . 'meta_tags.php'); ?>
<title><?php echo META_TAG_TITLE; ?></title>
<meta name="description" content="<?php echo META_TAG_DESCRIPTION; ?>" >
<meta name="keywords" content="<?php echo META_TAG_KEYWORDS; ?>" >

 

And copy the BTS meta_tag.php file to your "catalog/includes" directory, and your done!

 

Untested, but I'm pretty sure it will work. If some one tries this, please confirm if it works (or not).

Share this post


Link to post
Share on other sites

Having literally spent days wading through forum pages and pages of links etc I still cant seem to see a definit answer as to wether BTS will manage or add boxes to Featured Products or New products for..."

 

I know modavo was tackling this problem somehwre else but I cant find the link now

 

Does BTS (or any other) mod manage/do this? Or am i completely on the wrong track?

 

Cheers

 

les

Share this post


Link to post
Share on other sites

Hi Lester,

wether BTS will manage or add boxes to Featured Products or New products for...
No it won't. These tables are generated by includes/classes/boxes.php. It seems to me that your options are:

 

1) wrap a div (or another table :rolleyes: ) around it, and assign a CSS class to it

or

2) make small mods to the boxes class to assign CSS classes to these boxes

or

3) create a new box class which makes it easyer to make changes to these boxes

 

1 and 2 are quick mods but somewhat limited, 3 gives unlimited possibilities of course, but it will be quite some work (especially if your not a programmer)

 

Or am i completely on the wrong track?
So by itself you are on the right track, but these are exactly those boxes which are not yet rewritten to be "templated"

 

Don't know about any mods, but they may exist (never searched for it). Someone has experimented with rewriting (a part of) the box class to div's. It' unfinished code but if you're really interested I will try to look it up.

Edited by paulm2003

Share this post


Link to post
Share on other sites

Thanks for pointing out the right direction!

 

No need to bother with that unifinished code -unless its very close to hand of course - now that i know what im supposed to be doing i should be able to work the rest out.

 

Cheers :)

Share this post


Link to post
Share on other sites

Hi guys,

I have installed OSc. 2.2MS2 + BTS 1.3.

When I want to view my /catalog directory (The shops mainpage) in my webbrowser the site just keeps blank. No errors, no warnings, it just keeps blank...

Do I have to edit at least some lines of code FIRST to make the index show up properly again?

 

I am running the shop on OSx 10.3.3s Apache, php installed, mysql running, database seems to be ok, and I included the BTS sql, and I'm planning to copy the configured BTS to my real ONLINE shop once I am finished with the design of my local installation.

 

Thanks for any advice!

best

Phil

Share this post


Link to post
Share on other sites

To install the BTS you only need to copy the files to the right locations and insert the sql and it should work.

 

A blank screen does not sound familiar :unsure:

Share this post


Link to post
Share on other sites
To install the BTS you only need to copy the files to the right locations and insert the sql and it should work.

 

A blank screen does not sound familiar :unsure:

I guess I shouldn't have tried to get this to work at 3am...

I loaded the BTS sql, but didnt execute it :-D (duh!)

thanks anyway!

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  

×