Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] STS v4


Guest

Recommended Posts

I wanted to edit my last post to add my other question, but I guess after a while the edit function is removed from a post...

 

Anyways, what I wanted to do is on the index page, where it says "New Products For Month", I want to replace that section with manufacturer table. I know there is a manufacturer box as well, but I don't want a box in the middle of the page. I want the manufacturers in a table form, and people can click on them and be taken to that manufacturers products. Any idea's how to do this? So basically, the $content for index page, would be the contents from say manufacturer box, but not in a dropdown. I saw mention elsewhere to have the manufacturer box as a list, but I don't know if I can modify that to make it a table...

 

Also, I have using STS 4.5.5 using rc1. I would appreciate any help.

 

Thanks,

 

Nick

Link to comment
Share on other sites

I wanted to edit my last post to add my other question, but I guess after a while the edit function is removed from a post...

 

Anyways, what I wanted to do is on the index page, where it says "New Products For Month", I want to replace that section with manufacturer table. I know there is a manufacturer box as well, but I don't want a box in the middle of the page. I want the manufacturers in a table form, and people can click on them and be taken to that manufacturers products. Any idea's how to do this? So basically, the $content for index page, would be the contents from say manufacturer box, but not in a dropdown. I saw mention elsewhere to have the manufacturer box as a list, but I don't know if I can modify that to make it a table...

 

Also, I have using STS 4.5.5 using rc1. I would appreciate any help.

 

Thanks,

 

Nick

Nick, I would suggest the Wolfen Feature Sets contribution or the Open Feature Sets contribution. Both contributions give the option of displaying Featured Products, Featured Manufacturers, Products in their own box, etc.

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

Hello,

 

I am having a great time learning STS4 with osCommerce mm2.2 rc1. However, I always come up to a challenge whenever I try to install a contribution (Especially since I have extremely limited knowlege of PHP). THis is no different. I am trying to install BuySafe into my osCommerce store. I follow the instructions and they seem simple enough until I come across this one. I have to find the following code in \admin\index.php and add new code after it. However, the original code doesn't even exist in my index.php. I am looking to see if anyone else has successfully installed this onto their rc1 site or figure out what I need to do with this. Is it OK, to just add ithe whole thing to the bottom of the script (may or may not be a stupid idea)?

 

Anyone?

 

Thanks

Lionel

Link to comment
Share on other sites

It would help if I included the script. Here it is:

 

1) After code:

 

$contents = array();

 

if (getenv('HTTPS') == 'on') {

$size = ((getenv('SSL_CIPHER_ALGKEYSIZE')) ? getenv('SSL_CIPHER_ALGKEYSIZE') . '-bit' : '<i>' . BOX_CONNECTION_UNKNOWN . '</i>');

$contents[] = array('params' => 'class="infoBox"',

'text' => tep_image(DIR_WS_ICONS . 'locked.gif', ICON_LOCKED, '', '', 'align="right"') . sprintf(BOX_CONNECTION_PROTECTED, $size));

} else {

$contents[] = array('params' => 'class="infoBox"',

'text' => tep_image(DIR_WS_ICONS . 'unlocked.gif', ICON_UNLOCKED, '', '', 'align="right"') . BOX_CONNECTION_UNPROTECTED);

}

 

$box = new box;

echo $box->tableBlock($contents);

 

insert:

 

// {{ buySAFE Module

$contents = array();

 

$contents[] = array('params' => 'align="center"',

'text' => '<table cellpadding="10"><tr><td align="center" class="sub"><a href="' . tep_href_link(FILENAME_MODULES, 'selected_box=modules&set=buySAFE') . '" alt="buySAFE"><img src="https://seal.buysafe.com/private/rollover/images/buySAFE_logo.gif" name="Install buySAFE" border="0"></a><br>Setup buySAFE<br><script type="text/javascript" src="https://seal.buysafe.com/private/rollover/rollover.js"></script></td></tr></table>');

 

$box = new box;

echo $box->tableBlock($contents);

// }}

 

 

Thanks

Lionel

Link to comment
Share on other sites

Hello,

 

I am having a great time learning STS4 with osCommerce mm2.2 rc1. However, I always come up to a challenge whenever I try to install a contribution (Especially since I have extremely limited knowlege of PHP). THis is no different. I am trying to install BuySafe into my osCommerce store. I follow the instructions and they seem simple enough until I come across this one. I have to find the following code in \admin\index.php and add new code after it. However, the original code doesn't even exist in my index.php. I am looking to see if anyone else has successfully installed this onto their rc1 site or figure out what I need to do with this. Is it OK, to just add ithe whole thing to the bottom of the script (may or may not be a stupid idea)?

 

Anyone?

 

Thanks

Lionel

Hello Lionel, This thread is for STS related questions only. You will need to ask your question in the BuySafe thread :thumbsup: (if there isn't one, then you could start a new one in the contribution support section of this forum).

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 have a quick one... hopefully.

 

I am trying to do a custom template for specific products on STS product_info.php.html page. I know how to make my own product_info.php.html page and drop the variables where I want them, but when I design a specific layout for a specific product and name it product_info.php_28.html and upload it, the variables do not work. It displays just fine, but no data is coming in like $addtocartbutton and $startform and so on, i looked at the product_info.php and the only thing i saw different was the: <?php DEFINE ('STS_CONTENT_END_CHAR', '$'); ?> at the top, i put that in mine too and it did not work!

 

Is there something else i have to do to enable the use of custom product info pages?

 

Thanks,

 

shines

Link to comment
Share on other sites

I am trying to do a custom template for specific products on STS product_info.php.html page. I know how to make my own product_info.php.html page and drop the variables where I want them, but when I design a specific layout for a specific product and name it product_info.php_28.html and upload it, the variables do not work. It displays just fine, but no data is coming in like $addtocartbutton and $startform and so on, i looked at the product_info.php and the only thing i saw different was the: <?php DEFINE ('STS_CONTENT_END_CHAR', '$'); ?> at the top, i put that in mine too and it did not work!

I think what happens is on those pages with the STS_CONTENT_END_CHAR defined as "$", you need to add that to the end of any variables you insert.

 

For example, $addtocartbutton needs to be $addtocartbutton$.

 

That's my understanding anyway.

Link to comment
Share on other sites

I have a query which someone might be able to clear up for me. There are two definitions in the file "catalog/includes/configure.php", called "ENABLE_SSL" and "USE_PCONNECT". These values are currently set to TRUE and FALSE, without apostrophes. In some files within OSC, there's a check for "ENABLE_SSL" being equal to TRUE, and other times it's checked as being equal to 'TRUE' (with apostrophes). Why are there differences? I've changed all such references to 'TRUE' (with apostrophes) for the sake of uniformity, and the site appears to function in exactly the same way. Can anyone enlighten me on this subject?

 

Further to this, and directly related to STS, I find that when using a https:// (secure URL), the address isn't correctly recognised as secure (i.e. the Address bar is not highlighted yellow, and in Firefox the padlock is crossed out). Strangely though, the SSL connection works properly when I turn off the STS templates. Does anyone else have this issue?

Link to comment
Share on other sites

I think there is a problem with one of the packages listed on the contribution page.

 

I downloaded "STS 4.5.6 for 2.2MS2 and RC1" and found that the zip file's contents are identical to that of contribution "STS v4.5 SP5", including the changelog. The change described, regarding ouput buffering with ob_end_clean() isn't anywhere within the package. Could someone please download these two packages and tell me if there is a difference? I'm reporting extracted total file sizes of 32,768 bytes.

Link to comment
Share on other sites

I think there is a problem with one of the packages listed on the contribution page.

 

I downloaded "STS 4.5.6 for 2.2MS2 and RC1" and found that the zip file's contents are identical to that of contribution "STS v4.5 SP5", including the changelog. The change described, regarding ouput buffering with ob_end_clean() isn't anywhere within the package. Could someone please download these two packages and tell me if there is a difference? I'm reporting extracted total file sizes of 32,768 bytes.

Nevermind, it is indeed correct -- not sure why the byte size is identical, however. My mistake.

Link to comment
Share on other sites

I think there is a problem with one of the packages listed on the contribution page.

 

I downloaded "STS 4.5.6 for 2.2MS2 and RC1" and found that the zip file's contents are identical to that of contribution "STS v4.5 SP5", including the changelog. The change described, regarding ouput buffering with ob_end_clean() isn't anywhere within the package. Could someone please download these two packages and tell me if there is a difference? I'm reporting extracted total file sizes of 32,768 bytes.

 

Grant, I have not had time to look at the 4.5.6 upload other than it is not a "full package". I have never had any query issues using STSv4x.

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 there I'm using Custom Computer Creator 9.3 and now I want to implement a custom Design for my shop so I gave STS a try.

Its fine but after the Installation I can't access the Custom Computer Creator pages. Normaly CCC implements in /includes/header.php a link. The code is as followes:

  define('HEADER_TITLE_CUSTOM_BUILD', 'Custom Computer Creator');
 if (tep_session_is_registered('ccc_prod_id')){
$edit_params = 'edit=1';
$link_file = FILENAME_CCC_BUILD;
 } else {
$link_file = FILENAME_CCC;
$edit_params = '';
 }

and:

<table border="0" width="100%" cellspacing="0" cellpadding="1">
 <tr class="headerNavigation">
<td class="headerNavigation">  <?php echo $breadcrumb->trail(' » '); ?></td>
<td align="right" class="headerNavigation"><?php if (tep_session_is_registered('customer_id')) { echo '<a href="' . tep_href_link(FILENAME_LOGOFF, '', 'SSL') . '" class="headerNavigation">' . HEADER_TITLE_LOGOFF . '</a>  |  '; } echo '<a href="' . tep_href_link($link_file, $edit_params, 'SSL') . '" class="headerNavigation">' . HEADER_TITLE_CUSTOM_BUILD . '</a>  |  <a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '" class="headerNavigation">' . HEADER_TITLE_MY_ACCOUNT . '</a>  |  <a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '" class="headerNavigation">' . HEADER_TITLE_CART_CONTENTS . '</a>  |  <a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '" class="headerNavigation">' . HEADER_TITLE_CHECKOUT . '</a>'; ?>  </td>
 </tr>
</table>
<!--
<table border="0" width="100%" cellspacing="0" cellpadding="1">
 <tr class="headerNavigation">
<td class="headerNavigation">  <?php echo $breadcrumb->trail(' » '); ?></td>
<td align="right" class="headerNavigation"><?php if (tep_session_is_registered('customer_id')) { ?><a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_LOGOFF; ?></a>  |  <?php } ?><a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a>  |  <a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a>  |  <a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CHECKOUT; ?></a>   </td>
 </tr>
</table>
-->

 

I noticed that I can define own placeholders within STS but I don't know how.

 

I know I have to modify /includes/modules/sts_inc/sts_user_code.php in such a way:

   $sts->start_capture();
  require(DIR_WS_BOXES . 'new_thing_box.php');
  $sts->stop_capture('newthingbox', 'box');

 

So I tried:

   $sts->start_capture();
  require(DIR_WS_BOXES . 'header.php');
  $sts->stop_capture('custom_build', 'box');

 

In /includes/sts_templates/test/sts_template.html I included $custom_build.

 

But when I try to lunch the site I get an error that .../box/header.php is missing.

 

 

I'm sure there's something wrong (If not I wouldn't have these problems) but what's wrong??

Link to comment
Share on other sites

Hello I have just installed STS and am just starting to use it. I do have a quick question maybe you can help me with. In the doc's i found the list of general place holders. Now i get how these work and have used them in my code. One thing i was wondering was that a complete list of place holders, or is there more, or i can make more and how.

 

For example in my footer on my main page i call

 

class="footer">  $contactlogo  </td>

 

So in my footer bar it links to my contact info.

 

Now is there a way to use a place holder to link to my shipping info.

 

All I could find was a place holder for an info box that contained the shipping info.

 

Any help at all will be much appreciated. Thank You!

Link to comment
Share on other sites

Hello I have just installed STS and am just starting to use it. I do have a quick question maybe you can help me with. In the doc's i found the list of general place holders. Now i get how these work and have used them in my code. One thing i was wondering was that a complete list of place holders, or is there more, or i can make more and how.

 

For example in my footer on my main page i call

 

class="footer">  $contactlogo  </td>

 

So in my footer bar it links to my contact info.

 

Now is there a way to use a place holder to link to my shipping info.

 

All I could find was a place holder for an info box that contained the shipping info.

 

Any help at all will be much appreciated. Thank You!

Sean,

Yes, you can make your own placeholders and it is a common procedure to do so. For example, if you ever created your own infobox or installed a contribution that added its own infobox, you would need to create a new placeholder for it. A sample of this can be found in the includes/modules/sts_inc/sts_user_code.php file.

 

How to add a custom infobox in your sts template:

 

/* The following code is a sample of how to add new boxes easily.
 Use as many blocks as you need and just change the block names.
  $sts->start_capture();
  require(DIR_WS_BOXES . 'new_thing_box.php');
  $sts->stop_capture('newthingbox', 'box');  // 'box' makes the system remove some html code before and after the box. Otherwise big mess!
Note: If $sts->stop_capture('newthingbox', 'box') is followed by $sts->start_capture, you can replace both by $sts->restart_capture('newthingbox', 'box')
Another way to declare STS variables is to enter them directly into the STS array:
  $sts->template['MyText']='Hello World';
*/

 

For example:

The code below will create a sts user tag for the infobox "search.php" and the tag will be "$whatever":

 

$sts->start_capture();
  require(DIR_WS_BOXES . 'search.php');
  $sts->stop_capture('whatever', 'box');

 

You will save this code just before the last ?> in the includes/modules/sts_inc/sts_user_code.php file. The above example creates a new placeholder called $whatever to be used anywhere on your template where you would want the search.php infobox to appear (just a generic example).

 

The STS User Manual lists all of the "out of the box" placeholders that bring in all of the osCommerce default functions.

 

Regarding a placeholder for the shipping page, I would simply create a link to that page using standard HTML:

<a href="<?php echo tep_href_link('shipping.php', 'NONSSL'); ?>">Link Text Here such as Shipping</a>

If you really need a placeholder for your shipping.php file, you can always add the following into your sts_user_code.php file or sts_inc/general.php file:

$sts->template['shippinglink'] = '<a href=' . tep_href_link(FILENAME_SHIPPING, '', 'SSL') . '>' . BOX_INFORMATION_SHIPPING . '</a>';

This will allow you to use the $shippinglink in any of your template pages.

 

Hope this helped,

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

Quick question.

 

I am using the latest and greatest osc and sts.

 

I am doing quite well with customizing sts to make the pages look how I want. It has been a journey.

 

I am to the point now where i need to design some static pages such as, specs, bios, about us, things like that. I want to keep the sts content though and i cant figure out what i need to do.

 

Do I save as mypage.php.html and keep in the sts template folder? content folder? catalog folder?

 

Do I need to have:

<?php DEFINE ('STS_CONTENT_END_CHAR', '$'); ?>

 

at the top?

 

I feel like i have tried all this and nothing seems to be working? Any help would greatly be appreciated.

 

shines

Link to comment
Share on other sites

Quick question.

 

I am using the latest and greatest osc and sts.

 

I am doing quite well with customizing sts to make the pages look how I want. It has been a journey.

 

I am to the point now where i need to design some static pages such as, specs, bios, about us, things like that. I want to keep the sts content though and i cant figure out what i need to do.

 

Do I save as mypage.php.html and keep in the sts template folder? content folder? catalog folder?

 

Do I need to have:

<?php DEFINE ('STS_CONTENT_END_CHAR', '$'); ?>

 

at the top?

 

I feel like i have tried all this and nothing seems to be working? Any help would greatly be appreciated.

 

shines

Steve, Take a look at my "Add new pages using STS" add-on listed on the STS Power Pack site (use the link in my signature below). This is a step by step on how to do exactly what you are asking above. By following this example, you will be able to create new pages that will keep the session ID for each customer as welll as follow the standard osC procedures for creating new pages (meaning the pages will still work even with STS turned off in the admin).

 

Hope this helped,

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

This is a bug of osCommerce 2.2MS2-060817, not of STS. Read little bit this thread and you'll find the answer. Bill Kellum has also posted a solution on the STS contribution page, last year I think.

Also, the latest version of osCommerce is 2.2RC1 and it would be wise to start with this one and not the 2.2MS2!

 

- Chris

Link to comment
Share on other sites

OK time to build a search box of my own, how??? i guess what code do i need to put in?

 

Code for search box can be found here: catalog/includes/boxes/search.php, up to you to modify it for your needs. If you remove the <tr><td> and </td></tr> that wrap the box, you should also modify catalog/includes/modules/sts_inc/sts_column_left.php, where the search box is called, the second parameter 'box' must be removed, otherwise your box may be just empty. Look at those files and play little bit, you'll see.

 

- Chris

Link to comment
Share on other sites

Steve, Take a look at my "Add new pages using STS" add-on listed on the STS Power Pack site (use the link in my signature below). This is a step by step on how to do exactly what you are asking above. By following this example, you will be able to create new pages that will keep the session ID for each customer as welll as follow the standard osC procedures for creating new pages (meaning the pages will still work even with STS turned off in the admin).

 

Hope this helped,

 

Thank you so much for your reply, I am checking it out now.

 

Just wanted to say thanks alot!

 

shines

Link to comment
Share on other sites

Ok I figured out a way to integrate the ccc link within sts, thanks to bekellum.

 

But Is it possible to integrate a link within the categories info box? I tried to modify the categories.php (to integrate a link to the menu point) but either I get the link above or under the categories box.

 

Maybe someone can help.

Edited by Grinse
Link to comment
Share on other sites

Hi guys,

 

I'm finally getting a chance to try and get back to some updates to our osC site, and I'm stumped.

 

I am creating some health assessments using PHP Surveyor. I need to somehow manually link from a category page to a survey. The survey I'm working on, for example, is located at: localhost/mmherbs/assess/index.php?sid=1 (my root directory for my local site is localhost/mmherbs/ )

 

I know I somehow need to either add this as a page, or add a page with a frameset that calls in the "?sid=1" specific survey. However; I also need to keep their osCsid # so that I can link the survey results to products without having them lose their session.

 

I've been searching the forums and contributions for adding pages and trying to make heads or tails of this. I'm sure it's a simple enough task, but for some reason it is just giving me grief, and I'm sure it has to do with the ?sid=1 bit. I did try creating a frameset at localhost/mmherbs/assess.php (root directory) and then had the frameset in assess.php have it's source as the full localhost/mmherbs/assess/index.php?sid=1 - but for some reason it's not working either.

 

I've also tried setting up the frameset in the includes/filenames.php file so I could just link to FILENAME_HEALTH_ASSESSMENT - but that didn't work either. I'm not sure how to add the assess/index.php to this file since it's in the assess/ folder.

 

I'm trying to use the javascript pop-up window that was in the 'Agree to Terms' contribution - so my link looks like:

<a href="java script:void(0);" onclick="NewWindow('<?php echo tep_href_link(FILENAME_HEALTH_ASSESSMENT,'','NONSSL'); ?>','tech','800','600','yes');return false">Health Assessment</a>

 

Being I'm using STS as well, I'm guessing maybe I'm missing something with how to add this page - it doesn't need a template though as the PHP Surveyer script contains it's own area for templates. I don't need a frameset if I can somehow link directly to the ?sid=1 (survey ID as there is more than one survey, but all of them run off the index.php page).

 

At this point I'm beginning to wonder if it's just as simple as the href method I'm trying to use being incorrect for this particular purpose :blush:

 

Any ideas would be greatly appreciated!

 

Also - does anyone know, when using Apache Services on a Windows Machine in order to have a "localhost" option with a PHP/MySQL site - what configuration settings do I need to change so that I see the SQL Errors in my browser window? Currently I just get a blank window, but no error. I'm trying not to have to load this up to the live site to see the errors since it is far from ready to go live :blush:

 

Thanks in Advance for any ideas or advice anyone can give ;)

~Tracy
 

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