Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[contribution] STS PLUS v4


Guest

Recommended Posts

Nadia,

 

I don't use the Header Tag contribution but I have read where Rigadin made reference that STS PLUS and the Header Tag contribution would work together as long as the file that I mentioned earlier was followed.

 

Even though I do not use Header Tag, I will research this for you and let you know ASAP. Keep your fingers crossed. :-)

 

Bill Kellum

 

Hi Bill, thanks for the responce to my dilemma. I have resolved the problem. I studied some code in an sts file (can't remember the name of the file) that lead me to a solution! I concatenated the description meta tag and keyword meta tag to the sts template array that holds the title meta tag, so when sts plus stomped over the header info my description and keyword meta tags were also added.

 

The file I did this in was catalog/includes/modules/sts_inc/general.php... this is the bit of code

$sts->template['headertags']= "<title>" . TITLE . "</title>"."\n"; // ORIGINAL LINE

$sts->template['headertags'] = $sts->template['headertags'] . '<meta name="description" content="'.DYNAMIC_DESCRIPTION.'">'."\n"; //LINE I ADDED

$sts->template['headertags'] = $sts->template['headertags'] . '<meta name="keywords" content="'. DYNAMIC_KEYWORDS.'">'."\n"; //LINE I ADDED

 

I also defined DYNAMIC_DESCRIPTION & DYNAMIC_KEYWORDS in all files I wanted unique keywords and descriptions!

 

Thanks anyway,

regards,

Nadia.

Link to comment
Share on other sites

  • Replies 421
  • Created
  • Last Reply

Top Posters In This Topic

Peter, I believe you could just add this link to your graphic image:
<?php echo '<a href="' . tep_href_link(FILENAME_YOURFILENAME) . '">' . tep_image(DIR_WS_IMAGES . 'YOURFILENAME.jpg', 'graphic text') . '</a>'; ?>

Of course, you would replace "YOURFILENAME" in both instances with the name of the file or graphic that you want to link to. In the above example, I added ".jpg" but you will add the ".gif" or whatever applies.

 

This example will also keep your links within a secure enviorment so your customer should not get the error message from their browser "You are leaving a secure site. Do you want to display nonsecure items?"

 

Hope this helps,

 

Bill Kellum

Bill,

 

thank you so much for sorting this out for me. I've actually found the tep_href_link() function myself, although I'm not totally sure if I can use it if I want to "hard link" to any given catalog category? In short, the thing I'm trying to pull off is to use an image for every category the store offers (yes - I realize this means quite a lot of extra work as everything has to be created and maintained manuallly). Now, that means every single image must have a proper catalog-URL.

 

When I look at the http://demo.opensourcecms.com/oscommerce/ online demo shop, it seems that the actual catalog is browsed using "/index.php?cPath=CATEGORYNUMBER&osCsid=SESSIONIDNUMBER". Does that mean I can check the "CATEGORYNUMBER" for every category myself, create these links by hand using tep_href_link() and be confident that the links generated are "safe" in the sense that the category ID numbers will remain the same for every single session (and that osCommerce suddenly doesn't change them for some reason)?

 

Hm - I guess what I'm trying to ask is whether or not the "cPath=" argument will stay fixed for every session and if it hence will be a safe way of implementing "hard coded" category links? Will, for instance, tep_href_link("index.php?cPath=2") always return a proper URL for the "Software"-category in the demo shop mentioned above?

 

Kind regards,

Peter

Load "H.E.R.O.", 8, 1 : Run

Link to comment
Share on other sites

Hm - I guess what I'm trying to ask is whether or not the "cPath=" argument will stay fixed for every session and if it hence will be a safe way of implementing "hard coded" category links? Will, for instance, tep_href_link("index.php?cPath=2") always return a proper URL for the "Software"-category in the demo shop mentioned above?

 

Kind regards,

Peter

 

Yes it will. And the $urlcat_2 tag will contain the correct link. If you don't have hundreds of categories with a bunch of subcategories, you can use $urlcat tags. If you are not using the categories infobox, remove its call from sts_column_left.php and you will save some execution time.

Link to comment
Share on other sites

Hello STS PLUS users!

 

After positive feedback from the community and the blessing from the original author of STS, Brian Gallagher, the code is back to where it belongs: STS. I'll no longer make new STS PLUS revisions, all updates will be made under the STS contribution.

 

I just posted a new revision of STS on the STS contribution page. The version number is v4.1 and is based on STS PLUS v4.0.7. Here is the changelog:

 

Changelog from STS PLUS v4.0.7 to STS v4.1:

 

- UPDATED class sts.php: renewed some parts of the code. Include template file from within the sts class instead of from a separate function, so the template can use $this-> to access methods and variables from the sts class. Added function add_debug ($text, $br=true) that add text to the $sts->template['debug'] with a line break by default, it helps when you want to debug your store.

- DELETED sts_column_right.php as its 1 line code can be put directly in column_left.php

- UPDATED sts_footer.php: no need to record the variable columnright2footer as it does not contain any usable information. sts_display_output is now called from here.

- UPDATED examples in sts_user_code.php.

- UPDATED sts_display_output.php: do not display the template variable 'template_html' in debug mode because it makes the page very long and it only represents the source code of the page => you can look at the source code instead.

- UPDATED module sts_product_info.php v1.0.5 to use templates for products in a specific categories. Template product_info_c32 for products in category ID32 and in sub-categories. Works also for content templates.

- UPDATED sts_column_left.php to not show the reviews infobox when on the product_reviews_info.php page. The infobox and the page are using same variable names and it put mess when the infobox is called before the content of the page. This is a simple workaround. If you want the infobox to display all the time, you have to change the variable names inside the infobox (or inside the script of the page). I have not tested without STS, but I'm pretty sure that the problem is same, if the reviews infobox is placed in the left column.

 

A new forum thread has also been started for STS v4.x:

http://www.oscommerce.com/forums/index.php?showtopic=204381

 

- Rigadin

Link to comment
Share on other sites

I got a problem...

 

I've now installed this 2 times, on the exact same method..

 

1st Shop

Contributions: Optional Related Products

Working good, no problem installed STS and was working instantly.

 

2nd Shop

Contributions: Register Globals

I had to install that contribution because of using another server then the 1st shop.

Installed STS the exact same way but it's not working..in the Admin section I can't activate DEFAULT, I can activate INDEX & PRODUCT_INFO...

 

Anybody knows what could be the difficulity? Register Globals???

Link to comment
Share on other sites

Hi ,

 

Also got a problem...

 

Just reinstalled all files from a perfect working stsplus4.01 to v4.1

 

but now getting the error :

 

Fatal error: Cannot redeclare tep_get_category_tree() (previously declared in /home/includes/modules/sts_inc/sts_user_code.php:33) in /home/includes/modules/sts_inc/sts_user_code.php on line 33

 

Anyone can help me ?????

 

greetzzzzz... :D

Link to comment
Share on other sites

Seems that the file sts_user_code.php is included twice, but why? Check the STS modules in your admin, where some files are listed. Each list should contain only one time this file.

Link to comment
Share on other sites

Hi ,

 

Also got a problem...

 

Just reinstalled all files from a perfect working stsplus4.01 to v4.1

 

but now getting the error :

 

Fatal error: Cannot redeclare tep_get_category_tree() (previously declared in /home/includes/modules/sts_inc/sts_user_code.php:33) in /home/includes/modules/sts_inc/sts_user_code.php on line 33

 

Anyone can help me ?????

 

greetzzzzz... :D

Usually when you get an error such as the one you are experiencing, it is a misplacement of one of the files or a missing file. Double check your work. Possible a double file maybe?

 

-Bill Kellum

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

hmmm i'll think i found it...

 

in my /catalog/includes/application_bottom.php still was :

 

// START STS PLUS 4.0 Store output between footer.php and application_bottom.php
 $sts->stop_capture('footer2applicationbottom');
 require (DIR_WS_MODULES . 'sts_inc/sts_display_output.php'); // Print everything out
// END STS PLUS 4.0

 

think i have to remove this one ?

 

.... :-"

Link to comment
Share on other sites

Yes you have to remove this one. The doc mentioned the files that need some update, and this one does. In the new STS4 forum thread I gave little bit more details for a successful update.

 

- Rigadin

Link to comment
Share on other sites

Hello fellow STSers

 

I've sucessfully utilitized pretty much all of the template features in STS plus, including the recent addition for handling product_info templates specific to given category - works great by the way - thanks goes again to Rigadin.

 

However, I can not create a unique template specific to index.php (site home page). This does not seem to be a feature of STS or STS plus or have I missed something obvious here?

 

In my attempts, I have manually edited the index.php code to include a separate(non-template) html file that displays only for the home page. But with STS active my html file occurs at the $content# placeholder along with the rest of the default template and I don't want the template, just the content(separate html file).

 

If I could suppress STS only for index.php(home) display my prayers would be answered.... or does anybody have other strategies that I might employ here?

 

thxs

Link to comment
Share on other sites

Now I am getting this

 

 

Warning: main(includes/configure.php): failed to open stream: No such file or directory in /home/lbwos/public_html/datrunk/includes/application_top.php on line 29

 

Fatal error: main(): Failed opening required 'includes/configure.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/lbwos/public_html/datrunk/includes/application_top.php on line 29

Link to comment
Share on other sites

Hey guys, what's up.

I've been looking around in the forums, but I haven't been able to find anything talking about changing the template for the checkout pages in STS PLUS.

 

I basically would like to remove the sidebar ($categorybox, $informationbox, $myaccount, $shoppingcart, etc.) once the shopper has clicked "checkout" and gone into the checkout procedure.

 

Any ideas?

Link to comment
Share on other sites

Hey guys, what's up.

I've been looking around in the forums, but I haven't been able to find anything talking about changing the template for the checkout pages in STS PLUS.

 

I basically would like to remove the sidebar ($categorybox, $informationbox, $myaccount, $shoppingcart, etc.) once the shopper has clicked "checkout" and gone into the checkout procedure.

 

Any ideas?

There is more than one way of doing this. The most simplist is to just create one template for all of your shops pages, this includes your checkout pages. The other way is to create a template for the following pages in the checkout process:

 

shopping_cart.php

checkout_shipping.php

checkout_payment.php

checkout_confirmation.php

checkout_success.php

 

 

 

For example: shopping_cart.php.htm would be your template for shopping_cart.php.

 

Hope this helps,

 

Bill Kellum

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

I am trying to add the est. shipping cost contrib to STS plus and am having a small problem. Since it doesn't really use a box I can't figure out how to add it to the template. I've added the code to call the module but when I add a product to the cart, est shipping appears at the top of the screen above the entire site. Any suggestions?

 

Thanks,

Chuck

Link to comment
Share on other sites

Does anyone know why this is doing this?

 

 

 

Warning: main(includes/configure.php): failed to open stream: No such file or directory in /home/lbwos/public_html/datrunk/includes/application_top.php on line 29

 

Fatal error: main(): Failed opening required 'includes/configure.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/lbwos/public_html/datrunk/includes/application_top.php on line 29

Link to comment
Share on other sites

I just checked and the file is there.
Are you using v4.1 or 4.07? Also, post your configure.php file so we can see what is on line which is showing the error.

 

Thanks, Bill Kellum

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

STS PLUS v4.0.7

 

// Define the webserver and path parameters

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

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

define('HTTP_SERVER', 'http://www.wordofsouth.com'); // eg, http://localhost - should not be empty for productive servers

define('HTTPS_SERVER', ''); // eg, https://localhost - should not be empty for productive servers

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

define('HTTP_COOKIE_DOMAIN', 'www.wordofsouth.com');

define('HTTPS_COOKIE_DOMAIN', '');

define('HTTP_COOKIE_PATH', '/datrunk/');

define('HTTPS_COOKIE_PATH', '');

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

define('DIR_WS_HTTPS_CATALOG', '');

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

define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');

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

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', '/home/lbwos/public_html/datrunk/');

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

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

Link to comment
Share on other sites

Take the STS instructions ans replace

$sts_block_name = 'headcart';
require(STS_START_CAPTURE);

By $sts->start_capture();

 

and

 

require(STS_STOP_CAPTURE);
$template['headcart'] = $sts_block['headcart'];

By $sts->stop_capture ('headcart');

 

Worked perfectly! Thank you!

Link to comment
Share on other sites

http://www.wordofsouth.com/datrunk/

 

I am having a couple of problems. I edited the product_info.php_26.html and for some reason when I upload it the page doesnt change. I even tried changing it to product_info.php and the same thing happens.

 

Also on the main page my fonts are huge

 

EX: DJ Coolbreeze - WGM 11.5: Hosted by B.G. & Turk/Da Official...

$9.99

 

How do I change these?

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