Jump to content
DiamondSea

[contribution] Simple Template System (sts)

Recommended Posts

Thanks for that Bill,

 

I had realised that the 2nd option was probably the best route for me. However, I may have asked the question incorrectly. I think what meant to ask is this - if I have the product extra fields and populate them them with information, how can I insert them individually into a template page. For example remove $content and replace with something like the following: -

 

Product id : $productid (this is a standard field)

Price : $price (this is a standard field)

Height : $height (this is from the extra fields)

Age : $age (this is from the extra fields)

Owner : $owner (this is from the extra fields)

Award1 : $award_1 (this is from the extra fields)

 

The objective is to be able to use CSS to arrange the output. Where do I create the new variables (from products extra fields) for STS and how do I get them into my STS product template? I presume that the variable is related to the products_extra_fields_id and products_extra_fields_value?

 

Oh dear, re-reading this still it doesn't seem to sound right and it's getting me quite frustrated as I realise the huge potential of STS and am using it sucessfully to format all of my other output!

 

Am I going mad (more mad!)?

 

Thanks

 

Another frustrating day! I have managed to fully populate the database with the required extra fields, and associate them to a product AND all that in 3 different languages. Unfortunately I have not been able to find out how to 'capture' the extra fields and turn them into variables so that I can embed them in the product_info.php.html file. By keeping the $content I do get the output but not the ability to use CSS formatting - in fact even tables would do at the moment!

 

If you see my without picture: -

without.gif

 

An now my poor Photoshop hacked image: -

with.gif

 

I hope you can see what I'm trying to acheive?

 

I'm also looking to add a quantity selector for adding more than one to the cart, but that's to come.

 

As I have spent a lot of time trying to find out where to make the amendments I've almost gotten to the stage where I either consider an alernative package or look to pay a freelancer a few euros.

 

Any suggestion would be more than welcomed...

 

Thanks

Share this post


Link to post
Share on other sites
Another frustrating day! I have managed to fully populate the database with the required extra fields, and associate them to a product AND all that in 3 different languages. Unfortunately I have not been able to find out how to 'capture' the extra fields and turn them into variables so that I can embed them in the product_info.php.html file. By keeping the $content I do get the output but not the ability to use CSS formatting - in fact even tables would do at the moment!

 

If you see my without picture: -

without.gif

 

An now my poor Photoshop hacked image: -

with.gif

 

I hope you can see what I'm trying to acheive?

 

I'm also looking to add a quantity selector for adding more than one to the cart, but that's to come.

 

As I have spent a lot of time trying to find out where to make the amendments I've almost gotten to the stage where I either consider an alernative package or look to pay a freelancer a few euros.

 

Any suggestion would be more than welcomed...

 

Thanks

 

Well, that's a whole day gone without much success. I've uploaded what I've managed so far and on-line (as opposed to locally) it is incredibly slow. You can have a look at : -

Visit My Website

 

Not all the functionality is there and the admin back end isn't working but that's the least of my worries. I'm not usually a defeatist and I am sure that OSC 3 will be more manageable for people like myself who have skills in html and css but limited experience of PHP, however I am beginning to wonder whether I should be considering alternative products such as PrestaShop or Magento?

 

Anyway, that's more than enough for the day. Anyone know a reasonable freelancer??!???!??

Share this post


Link to post
Share on other sites
The $content variable is what holds what is says – the main "content". Without this variable, you have no store. From the look of the code you want to add, and since you seem to want to retain the "welcome guest" and the new products box... in the includes/languages/english/index.php

 

look for define('TEXT_MAIN', 'Put your code here');

 

two things you can try, you can put your css/html code directly here within the ' ', or put it in its own html file and use an include feature to load that separate file.

 

thats how I'd do it, may not be the best option but it worked for me.

Thank you for your help however, this still leaves me with my original problem. You can see my post about it here. A solution was proposed here however, that is not accomplishing what I would like. That is the whole reason I have chosen to go the route I am going. These modifications are for the main index only. For the life of me, I can not get rid of the table that contains 'What's New Here?'. I have removed the text from /includes/languages/english/index.php however the graphic and the table its self remains.

 

I hope I have sufficiently explained my problem and I really hope there is someone out there that may be able to help me with this.

 

Thank you in advance.

Share this post


Link to post
Share on other sites
The $content variable is what holds what is says – the main "content". Without this variable, you have no store. From the look of the code you want to add, and since you seem to want to retain the "welcome guest" and the new products box... in the includes/languages/english/index.php

 

look for define('TEXT_MAIN', 'Put your code here');

 

two things you can try, you can put your css/html code directly here within the ' ', or put it in its own html file and use an include feature to load that separate file.

 

thats how I'd do it, may not be the best option but it worked for me.

If you do it this way then I have to ask....Why even use STS then???

 

A better solution that is more inline with STS would be to leave this line as so:

define('TEXT_MAIN', '');

(notice the empty quotes), and then add your css and HTML inside your template page putting it exactly where you want it.

 

Keep in mind that STS allows you to insert PHP code directly in the template itself so you can very easily add itemized osC functions such as the "Welcome Guest" text.

For example: If you wanted to place the Welcome Guest text anywhere in your template and be able to style it using CSS, do something like this:

<td class="main"><?php echo tep_customer_greeting(); ?></td>

 

If you wanted to change the actual wording, you would need to edit the following in catalog\includes\languages\english.php:

 

define('TEXT_GREETING_PERSONAL', 'Welcome back <span class="greetUser">%s!</span> Would you like to see which <a href="%s"><u>new products</u></a> are available to purchase?');
define('TEXT_GREETING_PERSONAL_RELOGON', '<small>If you are not %s, please <a href="%s"><u>log yourself in</u></a> with your account information.</small>');
define('TEXT_GREETING_GUEST', 'Welcome <span class="greetUser">Guest!</span> Would you like to <a href="%s"><u>log yourself in</u></a>? Or would you prefer to <a href="%s"><u>create an account</u></a>?');

 

You could also create a variable for the above and then just place the variable anywhere you want in your template.

 

*STS is perfect for laying out the default osCommerce functions "out of the box" and has everything you need to do so; however, when you install third party contributions, then you will either need to code in the custom changes yourself or pay someone to do it for you.


Bill Kellum

 

Sounds Good Productions

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

Share this post


Link to post
Share on other sites
Thank you for your help however, this still leaves me with my original problem. You can see my post about it here. A solution was proposed here however, that is not accomplishing what I would like. That is the whole reason I have chosen to go the route I am going. These modifications are for the main index only. For the life of me, I can not get rid of the table that contains 'What's New Here?'. I have removed the text from /includes/languages/english/index.php however the graphic and the table its self remains.

 

I hope I have sufficiently explained my problem and I really hope there is someone out there that may be able to help me with this.

 

Thank you in advance.

The graphic and the table will remain because you have not removed them from the index.php file. Edit the catalog/index.php file and remove all of the unwanted Table/TR/TD tags (and the associated closing Table/TR/TD tags).


Bill Kellum

 

Sounds Good Productions

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

Share this post


Link to post
Share on other sites
Well, that's a whole day gone without much success. I've uploaded what I've managed so far and on-line (as opposed to locally) it is incredibly slow. You can have a look at : -

Visit My Website

 

Not all the functionality is there and the admin back end isn't working but that's the least of my worries. I'm not usually a defeatist and I am sure that OSC 3 will be more manageable for people like myself who have skills in html and css but limited experience of PHP, however I am beginning to wonder whether I should be considering alternative products such as PrestaShop or Magento?

 

Anyway, that's more than enough for the day. Anyone know a reasonable freelancer??!???!??

Well,

 

STS is doing its job by bringing in the extra fields using the $content variable. The problem here is that you have installed a third party contribution that needs to be customized per your layout.

 

As I said before, there are only two ways to do this:

  1. Edit the new contribution so that it works the way you want it to or....
  2. Create the custom STS tags (variables) to bring in the custom data for you to style as you wish. The key word here being 'Create'.

The folks over at the Products Extra Fields contribution has provided the following information to assist you in option #2 above (I have edited the steps below to make it a little easier to understand and implement):

 

Getting STS and Product Extra Fields to work in a Product_info Content Template:

 

NEW FILES THAT NEED TO BE ADDED:

product_extra_fields.php at: catalog/includes/modules (see step #2 below)

 

FILES THAT NEED TO BE MODIFIED:

catalog/includes/sts_templates/YOUR TEMPLATE FOLDER/product_info.php.html

catalog/includes/modules/sts_inc/sts_column_left.php

catalog/includes/modules/sts_inc/product_info.php

 

Installation Steps:

 

Step 1

 

BACKUP! BACKUP!

 

Step 2

 

Use the code below to create a new PHP file. Save the file as product_extra_fields.php and put it in catalog/includes/modules/:

 

<?php
/*
 strip_products.php

 Copyright (c) 2003 [url="http://www.summer.org.uk/"]www.summer.org.uk[/url]
 Heavy modified by [url="http://www.entropy.gr/"]www.entropy.gr[/url] (c) 2005
 Released under the GNU General Public License

 Do as you will with it.  If you refine the
 code, please release back to the community.

 Please do not delete the copyright and info as above.
 Add to it by all means.

 INSTRUCTIONS:
 a) I normally upload this script into:
 /includes/modules/
 b) And then in includes/column_left.php simply call:
 include(DIR_WS_MODULES . 'product_extra_fields.php');
--STS USERS DO NOT NEED TO DO STEP B ABOVE--

 EXTRA INFO:
 1) Coding could be refined somewhat.  Please feel free
 to do so and release back to the community.
 2) Please note that I rarely use the Osc classes to build
 tables and styles.  This is the reason why this is not
 controlled by a "contentbox" or an "infobox" etc.
 This could be coded quite easily.  Please feel free to
 do so and release back to the community.

 G Burton.  "burt" in the Oscommerce Forum.
 josé neves 
--EDITED FOR STSV4.5.8 BY BILL KELLUM AKA BKELLUM--
*/

if(isset($_GET['products_id']))
{
// START: Extra Fields Contribution v2.0b
$sql = "SELECT pef.products_extra_fields_status as status, pef.products_extra_fields_name as name, ptf.products_extra_fields_value as value FROM ". TABLE_PRODUCTS_EXTRA_FIELDS ." pef LEFT JOIN  ". TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS ." ptf ON ptf.products_extra_fields_id=pef.products_extra_fields_id WHERE ptf.products_id=".$HTTP_GET_VARS['products_id']." and ptf.products_extra_fields_value<>'' and (pef.languages_id='0' or pef.languages_id='".$languages_id."') ORDER BY products_extra_fields_order";
//echo $sql;
$fields_query = tep_db_query($sql);


$counter = tep_db_num_rows($fields_query);
//echo $counter;
if($counter > 0){
while($fields = tep_db_fetch_array($fields_query)) {
	if(!$fields['status'])  // show only enabled extra field
		continue;
		echo '<b>'.$fields['name'].': </b>'.$fields['value'].'<br>';
	}
} else {
	echo '';
}	
// END: Extra Fields Contribution
}
?>

 

Step 3

 

Open catalog/includes/modules/sts_inc/sts_column_left.php and add this code right before the closing php sign (?>):

 

   if (isset($HTTP_GET_VARS['products_id'])) {
include(DIR_WS_MODULES . 'product_extra_fields.php');
$sts->restart_capture ('product_extra_fields_box');
}

 

 

Step 4

 

Open catalog/includes/modules/sts_inc/product_info.php and add this code right before the closing php sign (?>):

 

 

$template_pinfo['pef']=$sts->template['product_extra_fields_box'];

 

 

After that you can put this tag in your product_info.php.html template wherever you want:

$pef$

 

That's it.

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

 

That should get you started in the right direction.

 

Hope you found this useful,


Bill Kellum

 

Sounds Good Productions

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

Share this post


Link to post
Share on other sites
Well,

 

STS is doing its job by bringing in the extra fields using the $content variable. The problem here is that you have installed a third party contribution that needs to be customized per your layout.

 

As I said before, there are only two ways to do this:

  1. Edit the new contribution so that it works the way you want it to or....
  2. Create the custom STS tags (variables) to bring in the custom data for you to style as you wish. The key word here being 'Create'.

The folks over at the Products Extra Fields contribution has provided the following information to assist you in option #2 above (I have edited the steps below to make it a little easier to understand and implement):

 

Getting STS and Product Extra Fields to work in a Product_info Content Template:

 

NEW FILES THAT NEED TO BE ADDED:

product_extra_fields.php at: catalog/includes/modules (see step #2 below)

 

FILES THAT NEED TO BE MODIFIED:

catalog/includes/sts_templates/YOUR TEMPLATE FOLDER/product_info.php.html

catalog/includes/modules/sts_inc/sts_column_left.php

catalog/includes/modules/sts_inc/product_info.php

 

Installation Steps:

 

Step 1

 

BACKUP! BACKUP!

 

Step 2

 

Use the code below to create a new PHP file. Save the file as product_extra_fields.php and put it in catalog/includes/modules/:

 

<?php
/*
 strip_products.php

 Copyright (c) 2003 [url="http://www.summer.org.uk/"]www.summer.org.uk[/url]
 Heavy modified by [url="http://www.entropy.gr/"]www.entropy.gr[/url] (c) 2005
 Released under the GNU General Public License

 Do as you will with it.  If you refine the
 code, please release back to the community.

 Please do not delete the copyright and info as above.
 Add to it by all means.

 INSTRUCTIONS:
 a) I normally upload this script into:
 /includes/modules/
 b) And then in includes/column_left.php simply call:
 include(DIR_WS_MODULES . 'product_extra_fields.php');
--STS USERS DO NOT NEED TO DO STEP B ABOVE--

 EXTRA INFO:
 1) Coding could be refined somewhat.  Please feel free
 to do so and release back to the community.
 2) Please note that I rarely use the Osc classes to build
 tables and styles.  This is the reason why this is not
 controlled by a "contentbox" or an "infobox" etc.
 This could be coded quite easily.  Please feel free to
 do so and release back to the community.

 G Burton.  "burt" in the Oscommerce Forum.
 josé neves 
--EDITED FOR STSV4.5.8 BY BILL KELLUM AKA BKELLUM--
*/

if(isset($_GET['products_id']))
{
// START: Extra Fields Contribution v2.0b
$sql = "SELECT pef.products_extra_fields_status as status, pef.products_extra_fields_name as name, ptf.products_extra_fields_value as value FROM ". TABLE_PRODUCTS_EXTRA_FIELDS ." pef LEFT JOIN  ". TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS ." ptf ON ptf.products_extra_fields_id=pef.products_extra_fields_id WHERE ptf.products_id=".$HTTP_GET_VARS['products_id']." and ptf.products_extra_fields_value<>'' and (pef.languages_id='0' or pef.languages_id='".$languages_id."') ORDER BY products_extra_fields_order";
//echo $sql;
$fields_query = tep_db_query($sql);


$counter = tep_db_num_rows($fields_query);
//echo $counter;
if($counter > 0){
while($fields = tep_db_fetch_array($fields_query)) {
	if(!$fields['status'])  // show only enabled extra field
		continue;
		echo '<b>'.$fields['name'].': </b>'.$fields['value'].'<br>';
	}
} else {
	echo '';
}	
// END: Extra Fields Contribution
}
?>

 

Step 3

 

Open catalog/includes/modules/sts_inc/sts_column_left.php and add this code right before the closing php sign (?>):

 

   if (isset($HTTP_GET_VARS['products_id'])) {
include(DIR_WS_MODULES . 'product_extra_fields.php');
$sts->restart_capture ('product_extra_fields_box');
}

 

 

Step 4

 

Open catalog/includes/modules/sts_inc/product_info.php and add this code right before the closing php sign (?>):

 

 

$template_pinfo['pef']=$sts->template['product_extra_fields_box'];

 

 

After that you can put this tag in your product_info.php.html template wherever you want:

$pef$

 

That's it.

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

 

That should get you started in the right direction.

 

Hope you found this useful,

 

Bill et al,

 

You wouldn't believe how grateful I am for the effort that you guys have put in.

 

It doesn't actually work for me as I am just getting the output variable $pef$ appear on the page so I think I must have a slightly screwed up STS installation. If I have time I will do a clean install of osC 2.2 RC2A then install PEF and try the amendments that you have supplied and see how that goes.

 

Just as a side issue I have the following contributions: -

STS 4.5.8

Product listing enhancements...

Sub category textboxes

Product extra fields

PWA

UL Categories

 

installed in that order

 

Is this an 'OK' installation sequence or is there a more optimal one?

 

Cheers

Share this post


Link to post
Share on other sites
What I meant be optimized images is that you may have some large image files that are not optimized for web use (good for print, bad for web) in your template pages that could be causing slow page uploads. Exchange these large image files with smaller image files and you will see a drastic reduction in your page loads.

 

Bill,

I've ruled that option out by simply removing all the images, and it's still quite slow.

Do you have any idea's how to pinpoint the performance hit?

Paul

Share this post


Link to post
Share on other sites
Bill,

I've ruled that option out by simply removing all the images, and it's still quite slow.

Do you have any idea's how to pinpoint the performance hit?

Paul

Paul,

All I can tell you is that I have installed several STSv4.5.8 shops and none of them had an issue with upload times. Host maybe?


Bill Kellum

 

Sounds Good Productions

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

Share this post


Link to post
Share on other sites
Bill et al,

 

You wouldn't believe how grateful I am for the effort that you guys have put in.

 

It doesn't actually work for me as I am just getting the output variable $pef$ appear on the page so I think I must have a slightly screwed up STS installation. If I have time I will do a clean install of osC 2.2 RC2A then install PEF and try the amendments that you have supplied and see how that goes.

 

Just as a side issue I have the following contributions: -

STS 4.5.8

Product listing enhancements...

Sub category textboxes

Product extra fields

PWA

UL Categories

 

installed in that order

 

Is this an 'OK' installation sequence or is there a more optimal one?

 

Cheers

 

Steve,

Are you sure you entered the tag in the template correctly? If you are not using a stop end character, then the tag would only have a "$" in front of the tag and not at the end. For example: $pef and not $pef$.


Bill Kellum

 

Sounds Good Productions

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

Share this post


Link to post
Share on other sites

I've just started using STS and I would like to add the "osCommerce Google Analytics module" as well.

 

The instructions say to add the line "<?php include(DIR_WS_MODULES . 'analytics/analytics.php'); ?>" to the file checkout_success.php. What is the recommended way of doing this with STS?

 

Thanks!

Edited by artengn

If I say it's safe to surf this beach Captain ......

Then it's safe to surf this beach!

Share this post


Link to post
Share on other sites
I've just started using STS and I would like to add the "osCommerce Google Analytics module" as well.

 

The instructions say to add the line "<?php include(DIR_WS_MODULES . 'analytics/analytics.php'); ?>" to the file checkout_success.php. What is the recommended way of doing this with STS?

 

Thanks!

 

 

A SHORT INSTRUCTION FOR GOOGLE ANALYTICS E-COMMERCE WITH STS4

 

1 - install the google analytics files from the package as discribed.

2 - in checkout_success.php, find this code:

 

<?php if (DOWNLOAD_ENABLED == 'true') include(DIR_WS_MODULES . 'downloads.php'); ?>
</table></form></td>
<!-- body_text_eof //-->

 

Add this code just before the above:

<?php
//google analytics
  require(DIR_WS_MODULES . 'analytics/analytics.php')
?>

3 - in your template file (like includes/sts_templates/*your template folder*/sts_template.html ) Find this code:

 

<meta http-equiv="Content-Language" content="en-us">
<!--$headcontent-->

 

Add this code just afterwards:

 

 

<?php
// osCoders.biz - Analystics - start
/*
Conditional code added thank to  rrodkey and bfcase
IMPORTANT -- IMPORTANT - IMPORTANT
You'll need to update the "xxxx-x" in the samples (twice) above with your own Google Analytics account and profile number.
To find this number you can access your personalized tracking code in its entirety by clicking Check Status in the Analytics Settings page of your Analytics account.
*/
if ($request_type == 'SSL') {
?>
<script src="[url="https://ssl.google-analytics.com/urchin.js"]https://ssl.google-analytics.com/urchin.js[/url]" type="text/javascript">
</script>
<script type="text/javascript">
_uacct="UA-xxxxx-x";
urchinTracker();
</script>
<?php
} else {
?>
<script src="[url="http://www.google-analytics.com/urchin.js"]http://www.google-analytics.com/urchin.js[/url]" type="text/javascript">
</script>
<script type="text/javascript">
_uacct="UA-xxxxx-x";
urchinTracker();
</script>
<?
}
// osCoders.biz - Analistics - end

?>

4 - don't forget to place this in every template file if you have more

 

5 - change the xxxxx-x to your ua- code from google

 

 

The above was taken from http://addons.oscommerce.com/info/3756 and modified by Bill Kellum.

 

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

Share this post


Link to post
Share on other sites

I am having trouble adding a new info box section (like the information box) to the left column of the sts template. Is there an easy way to add an info box and put links within this box? It should be exactly like the information box just with a different name.

Thanks.

Share this post


Link to post
Share on other sites
I am having trouble adding a new info box section (like the information box) to the left column of the sts template. Is there an easy way to add an info box and put links within this box? It should be exactly like the information box just with a different name.

Thanks.

 

 

Go to: http://www.oscommerce.info/kb/osCommerce/C...g_Area/Boxes/66

 

Then after you have done the above, You still need to define the STS tag for the new infobox that you just created.

 

How to add a new infobox variable(tag) to STS:

Add this code to sts_user_code.php

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

 

The above would create a STS user tag called $infobox_name. Change what you need to make it work for your specific box name. For example: If you new infobox page was called information_copy.php, then your code would look like this:

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

and your new STS tag would be $information_copy. Place this tag anywhere in your template where you want this new box to appear.

 

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

Share this post


Link to post
Share on other sites

Woot

 

Thanks Bill, you fixed my problem with the links by adding them to sts_user_code

 

$sts->template['urlshipping'] = tep_href_link(FILENAME_SHIPPING, '', 'NONSSL');

 

I just made a whole bunch of these and edited them for all my links and put them as the URL for my links.

Share this post


Link to post
Share on other sites
Woot

 

Thanks Bill, you fixed my problem with the links by adding them to sts_user_code

 

$sts->template['urlshipping'] = tep_href_link(FILENAME_SHIPPING, '', 'NONSSL');

 

I just made a whole bunch of these and edited them for all my links and put them as the URL for my links.

You are welcome!


Bill Kellum

 

Sounds Good Productions

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

Share this post


Link to post
Share on other sites

I'd like to start off by saying... great contribution, thank you!

 

I do have a couple of questions regarding the template:

 

Can I use php code in the template? Reason I ask is because I was trying to change the appearance of the searchbox and also take it of an individual infobox. I tryed using another contribution for a simplified and custom search box, when I inserted the php code into the STS template everything below where I inserted the code went blank.

 

Also I'd like to insert flash in the header, is this going to be a problem?

 

Thanks in advance for any feedback.

 

--- Mimi Que

Share this post


Link to post
Share on other sites
I'd like to start off by saying... great contribution, thank you!

 

I do have a couple of questions regarding the template:

 

Can I use php code in the template? Reason I ask is because I was trying to change the appearance of the searchbox and also take it of an individual infobox. I tryed using another contribution for a simplified and custom search box, when I inserted the php code into the STS template everything below where I inserted the code went blank.

 

Also I'd like to insert flash in the header, is this going to be a problem?

 

Thanks in advance for any feedback.

 

--- Mimi Que

 

Mimi,

 

Yes, you can use PHP in your template (I do this all of the time for added functionallity). Regarding the searchbox, it may be easier to simply add the form directly to your template (this is what I do and then style it using css).

 

Yes, Flash works great in your header. I actually create a header.php.html template (use an include statement in my main template to pull this in) and add the Flash in that.

 

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

Share this post


Link to post
Share on other sites
Mimi,

 

Yes, you can use PHP in your template (I do this all of the time for added functionallity). Regarding the searchbox, it may be easier to simply add the form directly to your template (this is what I do and then style it using css).

 

Yes, Flash works great in your header. I actually create a header.php.html template (use an include statement in my main template to pull this in) and add the Flash in that.

 

Hope this helped,

 

 

Hi Bill, Thank you for the information regarding the flash for my header.

 

I am still having trouble inserting the php search box contribution to the template. Every time I insert it it makes point after I insert it blank on the page... then if I refresh my browser it gives me the error

 

Fatal error: Call to a member function add_current_page() on a non-object in /home/content/i/v/y/ivyluxweb/html/catalog/includes/application_top.php on line 312

 

The add on I am attempting to insert onto the template is the simple search box v2

 

below is a little code for reference...

 

<a href="search.php">SEARCH OUR PRODUCTS</a>

<?php include(DIR_WS_BOXES . 'search2.php'); ?></font>

</div></td>

</tr>

</table>

<table border="0" width="800" cellspacing="3" cellpadding="1">

<tr>

<td valign="top" width="125"> <table border="0" width="125" cellspacing="0" cellpadding="1">

<tr>

<td> </td>

</tr>

<tr>

<td>$catmenu</td>

</tr>

<tr>

<td>$categorybox</td>

 

Any advice is appreciated. I can not even bring back up the website now because every page I attempt to go to gives me the same error... with that being said it has done this before and then "magically" went back to normal after a day, so I'm quite confused on what is happening here. I have not changed any other files or the application header file.

 

Thanks again,

 

Mimi

Share this post


Link to post
Share on other sites

Hi all

 

I would like to add a drop down menu to replace my main navigation menu.

 

Can anyone recommend something great that works with STS?

 

Cheers

sol

 

www.boomskateboarding.com

Share this post


Link to post
Share on other sites
Hi Bill, Thank you for the information regarding the flash for my header.

 

I am still having trouble inserting the php search box contribution to the template. Every time I insert it it makes point after I insert it blank on the page... then if I refresh my browser it gives me the error

 

Fatal error: Call to a member function add_current_page() on a non-object in /home/content/i/v/y/ivyluxweb/html/catalog/includes/application_top.php on line 312

 

The add on I am attempting to insert onto the template is the simple search box v2

 

below is a little code for reference...

 

<a href="search.php">SEARCH OUR PRODUCTS</a>

<?php include(DIR_WS_BOXES . 'search2.php'); ?></font>

</div></td>

</tr>

</table>

<table border="0" width="800" cellspacing="3" cellpadding="1">

<tr>

<td valign="top" width="125"> <table border="0" width="125" cellspacing="0" cellpadding="1">

<tr>

<td> </td>

</tr>

<tr>

<td>$catmenu</td>

</tr>

<tr>

<td>$categorybox</td>

 

Any advice is appreciated. I can not even bring back up the website now because every page I attempt to go to gives me the same error... with that being said it has done this before and then "magically" went back to normal after a day, so I'm quite confused on what is happening here. I have not changed any other files or the application header file.

 

Thanks again,

 

Mimi

 

Miimi,

 

See a few post above on how you should add a new infobox variable into the sts_user_code.php file for your searchbox php file.


Bill Kellum

 

Sounds Good Productions

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

Share this post


Link to post
Share on other sites

You've heard it before but here it is again; Can't get the Ultrapics to play nicely with STS.

 

I have read through the forums and have:

 

(i) updated the Ultrapics code with the one in the latest Ultrapic STS + Lightbox + yadda yadda pack

 

(ii) Replaced the code in the includes/modules/popup with said replacement code

 

No luck.

 

Can't get images to "pop" nor open. Funny thing is when I doubleclick any of the images the product options disappears (ie size, style, color etc)

 

Now it might just be me but isn't that just plain weird?

 

Have tried both IE & Firefox. No difference. Running rc2.

 

So, in short.

 

H E L P.

Share this post


Link to post
Share on other sites
You've heard it before but here it is again; Can't get the Ultrapics to play nicely with STS.

 

I have read through the forums and have:

 

(i) updated the Ultrapics code with the one in the latest Ultrapic STS + Lightbox + yadda yadda pack

 

(ii) Replaced the code in the includes/modules/popup with said replacement code

 

No luck.

 

Can't get images to "pop" nor open. Funny thing is when I doubleclick any of the images the product options disappears (ie size, style, color etc)

 

Now it might just be me but isn't that just plain weird?

 

Have tried both IE & Firefox. No difference. Running rc2.

 

So, in short.

 

H E L P.

 

That version of UltraPics has been known to be buggy. Try an earlier version without the Lightbox addition.


Bill Kellum

 

Sounds Good Productions

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

Share this post


Link to post
Share on other sites
You've heard it before but here it is again; Can't get the Ultrapics to play nicely with STS.

 

I have read through the forums and have:

 

(i) updated the Ultrapics code with the one in the latest Ultrapic STS + Lightbox + yadda yadda pack

 

(ii) Replaced the code in the includes/modules/popup with said replacement code

 

No luck.

 

Can't get images to "pop" nor open. Funny thing is when I doubleclick any of the images the product options disappears (ie size, style, color etc)

 

Now it might just be me but isn't that just plain weird?

 

Have tried both IE & Firefox. No difference. Running rc2.

 

So, in short.

 

H E L P.

 

 

I managed to get this working ok. I had a LOT of trouble with products_info.php - how did you get on there? If you need a copy of products_info.php coded for ultra pics, sts and qtpro, PM me. Sorry I can't help with the other issues.

Rgds

Sol

Share this post


Link to post
Share on other sites
Miimi,

 

See a few post above on how you should add a new infobox variable into the sts_user_code.php file for your searchbox php file.

 

 

Hi Bill,

 

Thanks for your help Bill, I am using your instructions for adding additional boxes. Works good however I keep getting this error:

 

Fatal error: Call to a member function add_current_page() on a non-object in /home/content/i/v/y/ivyluxweb/html/catalog/includes/application_top.php on line 312

 

I am unsure why this is happening... and why it will disappear after a day if I don't touch the site. It happens when I try to insert an info box and there is an error in the box. Even if I fix the problem and reload all the backup files I still get the error.

 

Here is the code from my application_top.php from line 301 -319

 

// navigation history

if (tep_session_is_registered('navigation')) {

if (PHP_VERSION < 4) {

$broken_navigation = $navigation;

$navigation = new navigationHistory;

$navigation->unserialize($broken_navigation);

}

} else {

tep_session_register('navigation');

$navigation = new navigationHistory;

}

$navigation->add_current_page();

 

// Shopping cart actions

if (isset($HTTP_GET_VARS['action'])) {

// redirect the customer to a friendly cookie-must-be-enabled page if cookies are disabled

if ($session_started == false) {

tep_redirect(tep_href_link(FILENAME_COOKIE_USAGE));

}

 

 

Sorry to keep bothering you and thanks for you assistance.

 

Thanks,

 

Mimi

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

×