Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] STS v4


Guest

Recommended Posts

Hi,

 

I have installed STS as per the instructions on a new OSCommerce install. I click on "modules" in the admin area, and get "STS" option (Module Directory: /home/www/mydomain.com/includes/modules/sts/), but I click the install button, and nothing happens. Furthermore, I am unable to access the other modules. Eg, when I click on:

 

Shipping-

Fatal error: Class authorizenet_aim: Cannot inherit from undefined class base in /home/www/mydomain.com/includes/modules/payment/authorizenet_aim.php on line 16

 

Order total-

Fatal error: Call to a member function on a non-object in /home/www/mydomain.com/includes/modules/order_total/ot_cod_fee.php on line 107

 

Any ideas?

 

Thanks!

Edited by alythall
Link to comment
Share on other sites

Hi,

 

I have installed STS as per the instructions on a new OSCommerce install. I click on "modules" in the admin area, and get "STS" option (Module Directory: /home/www/mydomain.com/includes/modules/sts/), but I click the install button, and nothing happens. Furthermore, I am unable to access the other modules. Eg, when I click on:

 

Shipping-

Fatal error: Class authorizenet_aim: Cannot inherit from undefined class base in /home/www/mydomain.com/includes/modules/payment/authorizenet_aim.php on line 16

 

Order total-

Fatal error: Call to a member function on a non-object in /home/www/mydomain.com/includes/modules/order_total/ot_cod_fee.php on line 107

 

Any ideas?

 

Thanks!

Andrew, which version of osCommerce did you install?

There was a bug in the older 060817 version. You can fix it here:

http://www.oscommerce.com/forums/index.php?sho...p;#entry1086031

 

You can also upgrade to the most recent version of osCommerce called "Online Merchant RC1" which can be downloaded here:

http://www.oscommerce.com/solutions/downloads

 

If neither of the above is your issue, than you have either incorrectly installed osC or STS.

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Link to comment
Share on other sites

Hi guys,

 

I realize this may be off-topic, but I'm at a loss as to where to find it (and I have Googled the forums).

 

When an email is sent from the site to an email account, all the code to change the font or force a carriage return, etc... is printing in the email rather than causing something to happen.

 

For example, anywhere I have "/n" it prints in the email as /n rather than causing a return.

 

Any ideas on how to correct this?

 

Thanks!

Hey Tracy,

I'm not sure what would be causing this but I will take a look and let you know what I find.

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Link to comment
Share on other sites

Hi guys,

 

I realize this may be off-topic, but I'm at a loss as to where to find it (and I have Googled the forums).

 

When an email is sent from the site to an email account, all the code to change the font or force a carriage return, etc... is printing in the email rather than causing something to happen.

 

For example, anywhere I have "/n" it prints in the email as /n rather than causing a return.

 

Any ideas on how to correct this?

 

Thanks!

Tracy,

Have you tried commented out the following code in the includes/classes/email.php file?

 

 

/**
* Adds plain text. Use this function
* when NOT sending html email
*/

function add_text($text = '') {
  $this->text = tep_convert_linefeeds(array("\r\n", "\n", "\r"), $this->lf, $text);
}

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Link to comment
Share on other sites

Tracy,

Have you tried commented out the following code in the includes/classes/email.php file?

 

 

/**
* Adds plain text. Use this function
* when NOT sending html email
*/

function add_text($text = '') {
  $this->text = tep_convert_linefeeds(array("\r\n", "\n", "\r"), $this->lf, $text);
}

 

Hmmm - well, I tried commenting out the above, but that generates an error with this bit of code in includes/functions/general.php whenever the site wants to send an email

// Build the text version
$text = strip_tags($email_text);
if (EMAIL_USE_HTML == 'true') {
  $message->add_html($email_text, $text);
} else {
  $message->add_text($text);
}

 

However, I did find in my Control Panel that it was set for text e-mails rather than HTML. I changed it to HTML - signed up with a different e-mail addy, and am waiting to see the result :blush: Hopefully this is one of those cases where the answer was right under my nose and I was trying to make it more difficult than it needed to be :blush:

 

Thanks!

~Tracy
 

Link to comment
Share on other sites

Hmmm - well, I tried commenting out the above, but that generates an error with this bit of code in includes/functions/general.php whenever the site wants to send an email

// Build the text version
$text = strip_tags($email_text);
if (EMAIL_USE_HTML == 'true') {
  $message->add_html($email_text, $text);
} else {
  $message->add_text($text);
}

 

However, I did find in my Control Panel that it was set for text e-mails rather than HTML. I changed it to HTML - signed up with a different e-mail addy, and am waiting to see the result :blush: Hopefully this is one of those cases where the answer was right under my nose and I was trying to make it more difficult than it needed to be :blush:

 

Thanks!

 

Well - it seems it doesn't want to send me any email while in HTML mode :huh:

 

So - while I wait to see if I get an email I was wondering about something else. On the category pages, how do I change the content portion so it does not show the thumbnail category image? I don't want to change the product_info content, just the category content. Reading through the STS 4.5 instructions I only see info for the product_info content.

 

Any thoughts?

 

Thanks!

~Tracy
 

Link to comment
Share on other sites

Well - it seems it doesn't want to send me any email while in HTML mode :huh:

 

So - while I wait to see if I get an email I was wondering about something else. On the category pages, how do I change the content portion so it does not show the thumbnail category image? I don't want to change the product_info content, just the category content. Reading through the STS 4.5 instructions I only see info for the product_info content.

 

Any thoughts?

 

Thanks!

 

Ok - found how to turn off the category thumbnail image on the category pages - LOL

 

Still waiting to receive my welcome email though :huh: I did receive an email I created by clicking on Customers in my Admin and then clicking "email" next to my test account. So it's weird to me that I haven't yet received my welcome email for creating that account. :blink:

~Tracy
 

Link to comment
Share on other sites

Ok - found how to turn off the category thumbnail image on the category pages - LOL

 

Still waiting to receive my welcome email though :huh: I did receive an email I created by clicking on Customers in my Admin and then clicking "email" next to my test account. So it's weird to me that I haven't yet received my welcome email for creating that account. :blink:

 

Only took it about an hour, but I did finally get my Welcome email ;)

 

While it is slightly better with HTML turned on - here is what I get:

 

Dear Tracy

 

You can now take part in the <b>various services</b> we have to offer you. Some of these services include:

 

? <b>Saved Cards</b> - Any cards added to your online saved cards will remain there for 60 days. Cards that have not been purchased or modified in 60 days will be deleted.

 

? <b>Permanent Cart</b> - Any products added to your online cart while you are logged in will remain there for 60 days, allowing you ample time to check them out.

 

? <B>Address Book</b> - We can now deliver your products to another address other than yours!

 

? <b>Order History</b> - View your history of purchases that you have made with us.

 

So I'm still at a loss as to why it isn't actually interpreting the HTML in the email, but printing it instead :huh:

 

Any thoughts?

~Tracy
 

Link to comment
Share on other sites

Only took it about an hour, but I did finally get my Welcome email ;)

 

While it is slightly better with HTML turned on - here is what I get:

 

Dear Tracy

 

You can now take part in the <b>various services</b> we have to offer you. Some of these services include:

 

? <b>Saved Cards</b> - Any cards added to your online saved cards will remain there for 60 days. Cards that have not been purchased or modified in 60 days will be deleted.

 

? <b>Permanent Cart</b> - Any products added to your online cart while you are logged in will remain there for 60 days, allowing you ample time to check them out.

 

? <B>Address Book</b> - We can now deliver your products to another address other than yours!

 

? <b>Order History</b> - View your history of purchases that you have made with us.

 

So I'm still at a loss as to why it isn't actually interpreting the HTML in the email, but printing it instead :huh:

 

Any thoughts?

 

Yeah, Did you try commenting out the code that I suggested earlier? Also, have you tried any of the HTML email contributions? If you don't want to use them, you might at least find your answer in their mods to see what needs tweaked to get this to work.

 

By the way, I am interested in this fix as well as I see this as a bug in osCommerce. Hmm...I wonder if it has been reported and a fix is already there for the taking?

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Link to comment
Share on other sites

Okay I was told to post this here...maybe someone can help!

 

Does anyone know if there is an addon that would allow me to switch the STS template based on the current date?

 

You know, like a July 4th Template, Xmas Template, Etc...that would automatically load those templates instead of the default templates on or around those dates?

 

I have an idea like a database table that has fields for for the directory name and the start and end date of the particular template...like Xmas template used from 12/1 to 12/25. Or maybe something that on a certain date just copies the template from its directory to the default STS directory (and overwrites it)?

 

I am just not sure how to do it.

Link to comment
Share on other sites

Okay I was told to post this here...maybe someone can help!

 

Does anyone know if there is an addon that would allow me to switch the STS template based on the current date?

 

You know, like a July 4th Template, Xmas Template, Etc...that would automatically load those templates instead of the default templates on or around those dates?

 

I have an idea like a database table that has fields for for the directory name and the start and end date of the particular template...like Xmas template used from 12/1 to 12/25. Or maybe something that on a certain date just copies the template from its directory to the default STS directory (and overwrites it)?

 

I am just not sure how to do it.

 

Bill's likely to have a MUCH better idea how to do this but poking around I think you'd need to jump into /includes/classes/sts.php and look for the defines around line 28

		// Defines constants needed when working with templates.
	// v4.4: Moved constant definitions before check of template output, so constants are also available to pagegs not using templates
define('STS_TEMPLATE_DIR', MODULE_STS_TEMPLATES_FOLDER . $this->template_folder .'/'); // v4.4: Use of MODULE_STS_TEMPLATES_FOLDER instead of fixed path
define('STS_DEFAULT_TEMPLATE', STS_TEMPLATE_DIR . MODULE_STS_TEMPLATE_FILE);

 

Then you'd want to jimmy up some logic to test the date and hardcode paths to the templatedir of your choice I would think. That's just a quick look and a pointer. Bill's MUCH more intimately aquainted with the innards of STS given that he's an author :thumbsup:

 

Anyways, hope that's a good jumping off point at least.

 

Iggy

Edited by Iggy

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

Link to comment
Share on other sites

Hi,

 

I have just installed leapfrog, it is for visitor tracking, but for some reason it is not working i think it is because of sts.

 

i want to put this code in the footer

 

<?php
  require(DIR_WS_FUNCTIONS . 'leapfrog.php');
 lf_update_tracking();
 ?>

 

 

but i don`t know how to do it in sts what i have done i am putting below. could some on help ?

 

 

<?php
// START STS 4.5
if ($sts->display_template_output) {
 // Get content here, in case column_right is not called.
 if (!isset($sts->template['content'])) $sts->restart_capture ('content');
} else {
//END STS

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



<table border="0" width="100%" cellspacing="0" cellpadding="1">
 <tr class="footer">
<td class="footer">  <?php echo strftime(DATE_FORMAT_LONG); ?>  </td>
<td align="right" class="footer">  <?php echo $counter_now . ' ' . FOOTER_TEXT_REQUESTS_SINCE . ' ' . $counter_startdate_formatted; ?>  </td>
 </tr>
</table>
<br>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
 <tr>
<td align="center" class="smallText">
<?php

 echo FOOTER_TEXT_BODY
?>
</td>
 </tr>
</table>
<?php
 if ($banner = tep_banner_exists('dynamic', '468x50')) {
?>
<br>
<table width="100%">
<tr>
<td align="center" class="smallText">
  <?php echo 'Your IP Address is: ' . tep_get_ip_address(); ?>
</td></tr></table>
<br>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
 <tr>
<td align="center"><?php echo tep_display_banner('static', $banner); ?></td>
 </tr>
</table>
<?php
  require(DIR_WS_FUNCTIONS . 'leapfrog.php');
 lf_update_tracking();
 ?>
<?php
 }
// START STS 4.1
}
// END STS 4.1

?>

Link to comment
Share on other sites

Yeah, Did you try commenting out the code that I suggested earlier? Also, have you tried any of the HTML email contributions? If you don't want to use them, you might at least find your answer in their mods to see what needs tweaked to get this to work.

 

By the way, I am interested in this fix as well as I see this as a bug in osCommerce. Hmm...I wonder if it has been reported and a fix is already there for the taking?

 

Well - after reading your thoughts, I decided to simply search the forums (through google) for HTML Email (rather than the specific problem I was having). Lo and Behold, wouldn't ya know there is a TON of posts on this issue - LOL

 

The post that fixed my problem is here: http://www.oscommerce.com/forums/index.php?s=&...t&p=1100921

 

I also added a post to that thread as I have Admin Edit Emails contrib installed, so I had to make an extra change ;)

 

Hope this helps somebody else too!! :thumbsup:

~Tracy
 

Link to comment
Share on other sites

Well - after reading your thoughts, I decided to simply search the forums (through google) for HTML Email (rather than the specific problem I was having). Lo and Behold, wouldn't ya know there is a TON of posts on this issue - LOL

 

The post that fixed my problem is here: http://www.oscommerce.com/forums/index.php?s=&...t&p=1100921

 

I also added a post to that thread as I have Admin Edit Emails contrib installed, so I had to make an extra change ;)

 

Hope this helps somebody else too!! :thumbsup:

Tracy, thanks for the post back!

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Link to comment
Share on other sites

Ajay,

 

I do not use Leap Frog but can offer the following suggestions:

 

If the contribution displays or creates a new infobox, then you will need to define this infobox in STS. You do that by doing the following:

In the includes/modules/sts_inc/sts_column_left.php, you will see an example:

 

  require(DIR_WS_BOXES . 'information.php');
 $sts->restart_capture ('informationbox', 'box');

This code includes the information.php file and creates the STS tag $informationbox.

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Link to comment
Share on other sites

Hi guys

 

Nice, nice, nice contributions...congratulations for the programmers.

 

I've some doubts:

 

- How can insert a new infobox? (like Loginbox_Best contribution). I now that I 've to put a new placeholder, but I don't know how.

 

- I use a contribution to control the width of the entire store ("Fixed width site with CSS"). When I installed the STS, this configuration has gone. So, I get the script and put it in the index.php.html. Is the right way? And about the pages like create account, checkout ..., etc

 

Thanks for any help

Edited by rdbello
Link to comment
Share on other sites

Ive been brave and made a new install of the latest STS. I'm an STS virgin.

 

www.supersprint-exhausts.co.uk/shop

 

I haven't really started with the design yet, as you can see. Before I do I want to make sure I get the products done. So I've tested by adding some categories and a product.

 

Every page has the same design as the index. Nothing changed when I click through the categories and the products aren't showing. I've obviously not done something correctly. I don't know what though.

Link to comment
Share on other sites

Hi guys

 

Nice, nice, nice contributions...congratulations for the programmers.

 

I've some doubts:

 

- How can insert a new infobox? (like Loginbox_Best contribution). I now that I 've to put a new placeholder, but I don't know how.

 

- I use a contribution to control the width of the entire store ("Fixed width site with CSS"). When I installed the STS, this configuration has gone. So, I get the script and put it in the index.php.html. Is the right way? And about the pages like create account, checkout ..., etc

 

Thanks for any help

The answer to your infobox questions was given exactly one post above yours.

 

Regarding the width, you can control the width within the template itself just as you would any other HTML page.

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Link to comment
Share on other sites

Ive been brave and made a new install of the latest STS. I'm an STS virgin.

 

www.supersprint-exhausts.co.uk/shop

 

I haven't really started with the design yet, as you can see. Before I do I want to make sure I get the products done. So I've tested by adding some categories and a product.

 

Every page has the same design as the index. Nothing changed when I click through the categories and the products aren't showing. I've obviously not done something correctly. I don't know what though.

Steven, you did not give enough information to even tell if you actually have an issue or not. :blink:

With STS, you still should add your products and categories within your store's admin, just as non-STS users do. If you set that up correctly, then STS will not have any problems displaying each product and category.

STS gives you plenty of options regarding how to template your store. You can use one template for everything, meaning every page will have the same layout and look, or you can template every specific category, product, and page in your store. See the STS User Manual for more details on how to do this.

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Link to comment
Share on other sites

Hi all,

 

These forums have been an invaluable mine of information for me in setting up osC and STS, but I can't find the answer to this one...

 

I'm having a problem in that STS is putting this:  at the top of all catalog pages. When I view the html source of the page, these characters appear at the top before the document type declaration like this: <!DOCTYPE HTML blah...

 

It is not there if I change "Use Templates?" to "false" in Admin->modules->STS->Default.

 

I've checked sts_template.html in /test/ (the one I'm using): there are no characters before the doctype there.

I've also checked the files that I've most recently edited - replacing them with their original versions. No difference.

 

I'm guessing that some so-called non-printable-characters have found there way into a php file somewhere, but I have no idea which files I should be checking...

 

(I'm using the new osC v2.2 RC1 with the updated STS 4.5.3, and I've imported the database from my previous installation, adding the additional administrators table)

 

Any ideas?

 

Cheers,

Matt.

Link to comment
Share on other sites

Ive been brave and made a new install of the latest STS. I'm an STS virgin.

 

www.supersprint-exhausts.co.uk/shop

 

I haven't really started with the design yet, as you can see. Before I do I want to make sure I get the products done. So I've tested by adding some categories and a product.

 

Every page has the same design as the index. Nothing changed when I click through the categories and the products aren't showing. I've obviously not done something correctly. I don't know what though.

 

Did you remember to add the $content tag to the body of your template? without that tag it will never display any of the info you are suppose to have in the main section of the site, from your inde to checkout to loginging in and out and of course products.

 

I know when I first designed my template I uploaded it to the server and freaked caused everything was blank, then I realized I forgot to add the $content tag.

Powered By osC 2.2RC2a STS 4.5.8 - HTC 2.6.3 - FP 1.5.9 - BCH 1.0.0

Link to comment
Share on other sites

Sorry, one more question:

 

Could I use any contribution with STS? For exemple: I intend to use the Star Product, Feature Products, Loginbox Best, and much more. Is it possible with no problems? Thanks again.

 

Short answer, yes.

 

Long answer yes, but you may gave to tweak and modifed the contribs you are adding in your osC store.

 

Also, Bill correct me if I am wrong, you will have to specifiy the new tags for them to show properly.

Powered By osC 2.2RC2a STS 4.5.8 - HTC 2.6.3 - FP 1.5.9 - BCH 1.0.0

Link to comment
Share on other sites

Ive been brave and made a new install of the latest STS. I'm an STS virgin.

 

www.supersprint-exhausts.co.uk/shop

 

I haven't really started with the design yet, as you can see. Before I do I want to make sure I get the products done. So I've tested by adding some categories and a product.

 

Every page has the same design as the index. Nothing changed when I click through the categories and the products aren't showing. I've obviously not done something correctly. I don't know what though.

 

Okay, I just went through your site, and noticed that you only have 1 product listed for your store, and when you navigate to that product it does show up.

 

Also you are getting errors on your site due to the fact that you are specifing that STS read from the sts template directory "full" for how everything is supposed to be displayed, but you did not fully upload the "full" folder so you are getting this error

 

Warning: read_template_file(includes/sts_templates/full/) [function.read-template-file]: failed to open stream: No such file or directory in /homepages/44/d194939030/htdocs/shop/includes/classes/sts.php on line 163

 

Fatal error: read_template_file() [function.require]: Failed opening required 'includes/sts_templates/full/' (include_path='.:/usr/local/lib/php') in /homepages/44/d194939030/htdocs/shop/includes/classes/sts.php on line 163

Powered By osC 2.2RC2a STS 4.5.8 - HTC 2.6.3 - FP 1.5.9 - BCH 1.0.0

Link to comment
Share on other sites

Did you remember to add the $content tag to the body of your template? without that tag it will never display any of the info you are suppose to have in the main section of the site, from your inde to checkout to loginging in and out and of course products.

 

I know when I first designed my template I uploaded it to the server and freaked caused everything was blank, then I realized I forgot to add the $content tag.

 

I realised this is what I had done. Removed the $content tag. Placed it back in the template and its working great again. Thanks for your reply.

 

Now I just need to figure out how I design the category display and product display pages.

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