Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] STS v4


Guest

Recommended Posts

Well I've gone ahead and installed STS 4.6 manually, on a not-too modified RC2a.

 

When I go to Admin > Modules to turn it on, I get this error:

 

Parse error: syntax error, unexpected T_DEFAULT in /home/www/blah/catalog/admin/modules.php on line 256

 

 

 

Matt,

 

thumbsup.gif Anytime you manually install a contribution that also provides the files that need to edited as well, it helps to compare the two to see where things may have gone wrong.

 

blush.gif With that said, the error lies in my instructions. I mistakenly cropped some of the code out in the "cut and paste" when making the manual instructions.

 

Make sure you did not add an extra } at the end of that code segment. It should look like the following:

 

        eval('$keys .= ' . $value['set_function'] . "'" . $value['value'] . "', '" . $key . "');");
 // STS V4.6 drop start
       } else {
  if($key == 'MODULE_STS_TEMPLATE_FOLDER'){
   $dir_name = array();
   if ($handle = opendir('../'.MODULE_STS_TEMPLATES_FOLDER.'/')) {
       while (false !== ($file = readdir($handle))) {
     $pos = strpos($file, ".");
     if($pos === false){
      $dir_name[] = array("id" => $file, "text" => $file);
      $i++;
     }
    }
    closedir($handle);
   }
   $keys .= tep_draw_pull_down_menu('configuration[MODULE_STS_TEMPLATE_FOLDER]', $dir_name, $value['value']);
  }else{
   $keys .= tep_draw_input_field('configuration[' . $key . ']', $value['value']);
  }
       }
 // STS V4.6 drop end
       $keys .= '<br><br>';
       }
       $keys = substr($keys, 0, strrpos($keys, '<br><br>'));

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

Thanks very much Bill, that's got it. I am trying to use WinMerge a lot to try to fathom what the heck is going on, but I'm painfully aware that this is only my second shop (first not quite finished) and this is my introduction to php, so I'm taking big bites. Even the forum's pretty daunting at this stage, so thanks for your :thumbsup: :blush: stuff. If I start to get any kind of profit at the end of this learning curve, rest assured it's in my ethics to feel begrudgingly obliged to stump up.

 

 

I might be back with more stupid questions, can you tell? :-" I'm trying hard to hammer stuff out for myself, really I am. Now enough chit chat, I'm off to figure out how to actually use the thing.

.

Edited by MattReid
Link to comment
Share on other sites

Good morning all. Just installed v4.6 and now I have one heck of an problem. Shipping quotation contrib. is not working. It is still bringing up the pop-up but instead of bringing up the shipping calculator I get a base template with all of the code displayed.

 

Being that I am not all that familiar with php and just learning about the contribs I am kind of at a loss here on where to look let alone what to fix.

 

Any hints or suggestions would be greatly appreciated.

 

btw....RC2a version.

Link to comment
Share on other sites

Good morning all. Just installed v4.6 and now I have one heck of an problem. Shipping quotation contrib. is not working. It is still bringing up the pop-up but instead of bringing up the shipping calculator I get a base template with all of the code displayed.

 

Being that I am not all that familiar with php and just learning about the contribs I am kind of at a loss here on where to look let alone what to fix.

 

Any hints or suggestions would be greatly appreciated.

 

btw....RC2a version.

 

 

Not sure which contribution you are referring to as I use a shipping estimator that does not use popups and it works just fine with STS.

 

With that said, STS allows you to "exempt" a script from being templated by STS. See the following post on how to do this:

 

Exclude a page from being used by 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

My freshly installed STS 4.6 is displaying half of its own template buttons (eg: cart Update) and half of my old buttons from catalog\includes\languages\english\images\buttons (eg: cart Checkout)

 

 

What is the logic here, please?

 

.

Edited by MattReid
Link to comment
Share on other sites

My freshly installed STS 4.6 is displaying half of its own template buttons (eg: cart Update) and half of my old buttons from catalog\includes\languages\english\images\buttons (eg: cart Checkout)

What is the logic here, please?

 

Are you sure all buttons are present in the template folder? Did you had previously a stock store installed? Did you clear your computer cache?

Link to comment
Share on other sites

Not sure which contribution you are referring to as I use a shipping estimator that does not use popups and it works just fine with STS.

 

With that said, STS allows you to "exempt" a script from being templated by STS. See the following post on how to do this:

 

Exclude a page from being used by STS

 

Sorry about that Bill....I guess knowing which contrib is effected could help just a little bit :-"

 

I am using (or trying to use anyway) the Ship_Estimator_v2.2.2

Link to comment
Share on other sites

Not sure which contribution you are referring to as I use a shipping estimator that does not use popups and it works just fine with STS.

 

With that said, STS allows you to "exempt" a script from being templated by STS. See the following post on how to do this:

 

Exclude a page from being used by STS

 

Bill, I have read through that thread but I do not see what you are referring to. Everything else looks great with the STS templates, only that one function that is causing the problem. Which shipping estimator are you using?

Link to comment
Share on other sites

i've a nice template and you can install if you want. it doesn't require sts. it goes as a fresh installation. you can look at the view at www.xxxxxx.com

 

 

Why are you posting this in the STS Support Thread?? Please don't.

Edited by bkellum

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

Bill, I have read through that thread but I do not see what you are referring to. Everything else looks great with the STS templates, only that one function that is causing the problem. Which shipping estimator are you using?

 

The link pointed to this post....

 

How to exclude a page from being templated in STSv4.5.x:

 

In the sts_default.php file, find the following code:

if (strstr($scriptbasename, "popup") || strstr($scriptbasename, "info_shopping_cart"))
         return ''; // We don't use template for these scripts

Add your php file that you want STS to exclude and it will not template that file. Note: Add the script name as follows:

if (strstr($scriptbasename, "popup") || strstr($scriptbasename, "your_script_here")|| strstr($scriptbasename, "info_shopping_cart"))
         return ''; // We don't use template for these scripts

 

That should do the trick for you.

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

My freshly installed STS 4.6 is displaying half of its own template buttons (eg: cart Update) and half of my old buttons from catalog\includes\languages\english\images\buttons (eg: cart Checkout)

 

 

What is the logic here, please?

 

.

 

Matt,

 

Did you read the section in the STS User Manual regarding the button sets?

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

The link pointed to this post....

 

How to exclude a page from being templated in STSv4.5.x:

 

In the sts_default.php file, find the following code:

if (strstr($scriptbasename, "popup") || strstr($scriptbasename, "info_shopping_cart"))
         return ''; // We don't use template for these scripts

Add your php file that you want STS to exclude and it will not template that file. Note: Add the script name as follows:

if (strstr($scriptbasename, "popup") || strstr($scriptbasename, "your_script_here")|| strstr($scriptbasename, "info_shopping_cart"))
         return ''; // We don't use template for these scripts

 

That should do the trick for you.

Hope this helped,

 

Thanks a million that did the trick! It took me a few times to figure out just what the script name was supposed to be....but after trying about a dozen variations it finally worked. I appreciate the help.

 

Todd

Link to comment
Share on other sites

Matt,

 

Did you read the section in the STS User Manual regarding the button sets?

Sorry sir, I did, but I probably saw the next portentious section coming and skimmed the buttons a bit. Still, I wouldn't have expected a half-and-half situation on the standard button set, so I thought I'd done something wrong. :blush:

Edited by MattReid
Link to comment
Share on other sites

Sorry sir, I did, but I probably saw the next portentious section coming and skimmed the buttons a bit. Still, I wouldn't have expected a half-and-half situation on the standard button set, so I thought I'd done something wrong. blush.gif

 

 

Not a problem Matt. Thanks for posting back. thumbsup.gif

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

Good good sir.

 

 

My next problem is with the fact that (for example) $content$ bundles everything together, so unlike the original osCommerce, you cannot assign different font attributes to a page heading, for example the word "Categories" or "Contact us" or the product name and price at the top of product_info. While I'm trying to work out how to get around this, any clues?

Link to comment
Share on other sites

Good good sir.

 

 

My next problem is with the fact that (for example) $content$ bundles everything together, so unlike the original osCommerce, you cannot assign different font attributes to a page heading, for example the word "Categories" or "Contact us" or the product name and price at the top of product_info. While I'm trying to work out how to get around this, any clues?

 

You can use a specific product_info.php.html template and put it into the /content/ folder. So you can design your product info page till the smallest detail using all tags in file sts_inc/product_info.php

You can also make specific templates for the info boxes. In both case you can create special css rules and apply them to the tags.

 

If you don't want to do this, then you can still alter the original php files either assigning style definitions into the file itself or using css, in the same way you would do without sts. The $content$ will appear as you styled it.

 

Or you can do a combination of both

Link to comment
Share on other sites

Good good sir.

 

 

My next problem is with the fact that (for example) $content$ bundles everything together, so unlike the original osCommerce, you cannot assign different font attributes to a page heading, for example the word "Categories" or "Contact us" or the product name and price at the top of product_info. While I'm trying to work out how to get around this, any clues?

 

 

There is nothing in the original osCommerce (meaning you have not installed any contributions) that cannot be done in STS. You need to familiarize yourself with the stylesheet as well as get a good tool that will allow you to view the parts of the page that is style dependent (web toolbar in your browser).

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

Thanks guys.

 

Bill, do you mean like the 'Developer Tools' F12 function in IE?

 

 

Yes, that would be the one. If you go to View | Class ID Information, you will see the style associated with each element on your 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

STS + Ultra Pics + lightbox

 

You need to do a couple of things...

 

At the end of this solution I should make :

 

-----------------

 

Then, in your content template (template_folder/content/product_info.php.html), add your new STS tags where you want them: For example:

$products_image_sm_1$

 

-----------------

 

But I don't have template_folder/content/product_info.php.html :( . I am using freeoscommerce_009 template . When I press on enlarge button nothing happens . If STS is disabled enlarge works good.

Link to comment
Share on other sites

STS + Ultra Pics + lightbox

 

You need to do a couple of things...

 

At the end of this solution I should make :

 

-----------------

 

Then, in your content template (template_folder/content/product_info.php.html), add your new STS tags where you want them: For example:

$products_image_sm_1$

 

-----------------

 

But I don't have template_folder/content/product_info.php.html sad.gif . I am using freeoscommerce_009 template . When I press on enlarge button nothing happens . If STS is disabled enlarge works good.

 

thumbsup.gif Then you should simply add the folder to that template set and put your content template inside it. It's not called Simple Template System for nothing whistling.giflaugh.gif

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

bkellum;

 

Sorry if this question been asked b4.. Im running a rc2a store now, since i have been using it for a while, do i need to re-do everything once i install this STS v4.6? Ie; the product i need to relist and re-type all the T&C, Shipping Terms etc etc? Thanks.

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.
Note: Your post will require moderator approval before it will be visible.

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