Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] STS v4


Guest

Recommended Posts

What's new box

 

I have an issue with the what's new box. Some day just dissapear from the index. I made the mistake of letting the issue to fix it later, made a lot of other modifications and now I cant fix it.

 

What could be the problem? If i put $whatsnewbox inthe sts_templeate, is does appear, but on every page. I want it to appear only where oscommerce places the box by default.

 

Where I shoud look into?

 

Juan,

You will have to create more than one template file and then only place the box in the template file that you want it to appear in. You have total control on where that box is placed.

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

Think I found it looking into the code includes/modules/sts_inc

 

I needed to use $cataloglogo and also place my image into the templatefolder/images/english since the general.php has the language folder referenced

 

I also needed to name the image header_logo.gif and not store_logo.png

 

So I ended up with putting $cataloglogo instead of <img border="0" src="images/store_logo.png"> in the template (sts_template.html of index.php.html in my case)

and also created the image and placed it in includes/sts_templates/test/images/english naming it header_logo.gif to match the code

 

	$sts->template['cataloglogo'] = '<a href="' . tep_href_link(FILENAME_DEFAULT). '">' . tep_image(STS_TEMPLATE_DIR.'images/'.$language . '/header_logo.gif', STORE_NAME) . '</a>'; 
// Modified in v4.3

 

 

Great contribution.

Hello Al and welcome to the STS thread.

 

You can insert images into your template just like you would any other HTML page on the web. The STS Image feature that you are referring to is in regard to the standard osCommerce images only. By using the $cataloglogo tag, it allows you to use this template in other osC STS enabled shops and not lose your image links. BUT, you are not limited to using this feature. You can always just insert your own logo and leave it at that. Very Simple.

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

Juan,

You will have to create more than one template file and then only place the box in the template file that you want it to appear in. You have total control on where that box is placed.

 

I thought that but I would have to create a template to every other page. I solved by creating a template for index.php only with the $whatnewbox and modified the whatnew.php file in the boxes folder.

 

I added:

<?php
if (isset($_GET['Cpath'])) {
// do nithing 
} else {
echo 'box html;'
}

 

I still don't undersant why it stoped appearing but it's ok now

Link to comment
Share on other sites

I get the following error on login.php and only on login.php

 

Fatal error: Cannot redeclare do_magic_quotes_gpc() (previously declared in /home/.../public_html/includes/functions/compatibility.php:19) in /home/.../public_html/includes/functions/compatibility.php on line 29

 

Now, the weird thing is that line 29 is just a "}", which closes the function, not creates ir again:

 

line 19: function do_magic_quotes_gpc(&$ar) {
if (!is_array($ar)) return false;
while (list($key, $value) = each($ar)) {
if (is_array($ar[$key])) {
do_magic_quotes_gpc($ar[$key]);
} else {
$ar[$key] = addslashes($value);
}
}
reset($ar);
line 29:}

 

I updates to tha latest STS version but I still have the issue

Help please!

Link to comment
Share on other sites

I get the following error on login.php and only on login.php

 

Fatal error: Cannot redeclare do_magic_quotes_gpc() (previously declared in /home/.../public_html/includes/functions/compatibility.php:19) in /home/.../public_html/includes/functions/compatibility.php on line 29

 

Now, the weird thing is that line 29 is just a "}", which closes the function, not creates ir again:

 

 

I removed the line that calls to compatibility.php and now it's saying:

Fatal error: Cannot redeclare tep_db_connect()

 

It fives error with just any function, what can i do???

 

HELP PLEASE, Im very stuck here.

Link to comment
Share on other sites

I have installed the contribution Event Calendar - http://www.oscommerce.com/community/contri...l/search,events

 

My problem is, it does not display on my customer front end. I've tried editing the template but I'm not entirely sure how I find out what to call it - I'm guessing I add a row like $calendarbox, but this just adds the words, not the box.

 

Does anyone have any ideas?

 

Thanks

Link to comment
Share on other sites

I have installed the contribution Event Calendar - http://www.oscommerce.com/community/contri...l/search,events

 

My problem is, it does not display on my customer front end. I've tried editing the template but I'm not entirely sure how I find out what to call it - I'm guessing I add a row like $calendarbox, but this just adds the words, not the box.

 

Does anyone have any ideas?

 

Thanks

Lotti, you need to define the new STS tag before it will work.

 

I think this contribution displays an events calendar in it's own infobox so all you need to do is create a new STS tag and add the link to the calendar.php file (if that is what it is called).

 

:thumbsup: 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 . 'calendar.php');
  $sts->stop_capture('calendar', 'box');

 

The above would create a STS user tag called $calendar. Change what you need to make it work for your specific box name.

 

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

Looks like you are calling application_top.php twice in login.php, compare your file with an original one.

 

- Chris

 

It was even dumber than that... I didn´t notice that I uploaded catalog/login.php to catalog/includes/languages/english/login.php

 

I feel so stupid! but so relieved that it´s solved.

Link to comment
Share on other sites

Placeholders Showing As Text

 

I've just installed STS on my site-3 times because I thought I was doing it wrong-and I'm still getting the same thing. The placeholders on the test template are only showing up as text. Here's the page http://classybutsassydesigns.com/oscommerc...s_template.html . Is it supposed to automatically convert or is there something else I need to do? I haven't altered anything, just uploaded STS and replaced the parts in the catalog/admin sections. I've done a search on the forum for 'placeholders' but I can't quite find anything that helps me with my problem. Any help is appreciated!

 

Thanks,

 

Christen

Link to comment
Share on other sites

Placeholders Showing As Text

 

I've just installed STS on my site-3 times because I thought I was doing it wrong-and I'm still getting the same thing. The placeholders on the test template are only showing up as text. Here's the page http://classybutsassydesigns.com/oscommerc...s_template.html . Is it supposed to automatically convert or is there something else I need to do? I haven't altered anything, just uploaded STS and replaced the parts in the catalog/admin sections. I've done a search on the forum for 'placeholders' but I can't quite find anything that helps me with my problem. Any help is appreciated!

 

Thanks,

 

Christen

Try this link:

http://classybutsassydesigns.com/oscommerce/catalog/

 

STS is working just fine. :rolleyes:

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

Lotti, you need to define the new STS tag before it will work.

 

I think this contribution displays an events calendar in it's own infobox so all you need to do is create a new STS tag and add the link to the calendar.php file (if that is what it is called).

 

:thumbsup: 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 . 'calendar.php');
  $sts->stop_capture('calendar', 'box');

 

The above would create a STS user tag called $calendar. Change what you need to make it work for your specific box name.

 

Hope this helped,

Bill,

 

You're a star!

 

So now I have my calendar added, but it's not in a box, how do I get it in a box?

 

Also I can't select any of the days, any additional assistance would be greatly appreciated - I'll post the solution to the Events Forum as a couple of people have hit issues - clearly it does work with STS - it's all down to poor users!!

 

Thanks Lotti

Link to comment
Share on other sites

Bill,

 

You're a star!

 

So now I have my calendar added, but it's not in a box, how do I get it in a box?

 

Also I can't select any of the days, any additional assistance would be greatly appreciated - I'll post the solution to the Events Forum as a couple of people have hit issues - clearly it does work with STS - it's all down to poor users!!

 

Thanks Lotti

Lotti,

At the moment, I do not use the Event Calendar contribution so I really do not know all of the ins & outs of what it does or is supposed to do. What I can do is give some basic troubleshooting tips to assist you in getting this to work properly.

  1. If there is soem extra external code such as JavaScript in use, you may need to add this in the head section of each of your templates or maybe just make an infobox template for the calendar page and add the JavaScript there.
  2. When you created your STS tag, did you add the "box" term (see previous post about creating a STS tag for infoboxes. If you did, try removing the "box" term from the code and see if it makes a difference for you.
  3. Be sure you are calling the correct PHP script in your newly created STS tag. I only guessed at what the actual script name (calendar.php) is since I do not use the Event Calendar contribution (yet anyway...sounds like a good one). :thumbsup:

Let me know where you stand after trying the above.

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

Lotti,

At the moment, I do not use the Event Calendar contribution so I really do not know all of the ins & outs of what it does or is supposed to do. What I can do is give some basic troubleshooting tips to assist you in getting this to work properly.

  1. If there is soem extra external code such as JavaScript in use, you may need to add this in the head section of each of your templates or maybe just make an infobox template for the calendar page and add the JavaScript there.
  2. When you created your STS tag, did you add the "box" term (see previous post about creating a STS tag for infoboxes. If you did, try removing the "box" term from the code and see if it makes a difference for you.
  3. Be sure you are calling the correct PHP script in your newly created STS tag. I only guessed at what the actual script name (calendar.php) is since I do not use the Event Calendar contribution (yet anyway...sounds like a good one). :thumbsup:

Let me know where you stand after trying the above.

Hi Bill,

 

Here's the current progress.

 

I tried suggestion 2 - removing "box" term, I had added it - this didn't seem to make a difference.

 

I have now noticed that it works on IE, but not on Firefox

 

I still can't click on a date to display for that date but I can change the month - so I'm making progress.

 

I think I am definitely calling the correct file - you picked a good one!

 

I haven't tried suggestion 1 yet, I thought I would go through all the install notes again and see if I can spot any reference to any Java script.

 

I don't know if any of this gives you an inkling as to the remaining problem?

 

Many thanks

 

Lotti

Link to comment
Share on other sites

Hi Bill,

 

Here's the current progress.

 

I tried suggestion 2 - removing "box" term, I had added it - this didn't seem to make a difference.

 

I have now noticed that it works on IE, but not on Firefox

 

I still can't click on a date to display for that date but I can change the month - so I'm making progress.

 

I think I am definitely calling the correct file - you picked a good one!

 

I haven't tried suggestion 1 yet, I thought I would go through all the install notes again and see if I can spot any reference to any Java script.

 

I don't know if any of this gives you an inkling as to the remaining problem?

 

Many thanks

 

Lotti

Lotti, just to help rule out the contribution as being the problem, have you tried disabling STS and see if the Events Calendar works as described?

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

Lotti, just to help rule out the contribution as being the problem, have you tried disabling STS and see if the Events Calendar works as described?

Bill,

 

I've tried disabling STS and you're right there is no conflict - I'm sorry to have asked you all these questions! It seems I just have issues with the Event Calendar contribution.

 

I will however, post your solution to getting it added to the template and confirm that it is compatible with STS.

 

Many thanks for your help

 

Lotti

Link to comment
Share on other sites

Hi everyone!

 

First I wanna excuse because I am sure that the answer to my question is already somewhere in the previous 151 pages but I was too lazy to read all of it.

 

I installed STS and everything is working fine. I am now working on changing the template completly so that everything is using CSS instead of evil design templates. That's also working fine so far.

But now I want to change the little boxes which are binded via tags (like "&categories"). But I am unable to find what in the sts-templates folder has to be modified. Changing the /catalog/includes/boxes/categories.php worked but I don't think that's a very elegant way. Is there a way to do this using STS? Is there maybe even something like a template for these boxes? I alredy tried the catalog/includes/sts_templates/full/boxes/infobox.php.html. That had no effect (yes the "Use template for infoboxes" is activated)

 

Than you very much for your patience and time!

Link to comment
Share on other sites

I am now working on changing the template completly so that everything is using CSS instead of evil design templates.

 

Of course I mean evil design tables not templates

Link to comment
Share on other sites

I've been searching but I've not seen any info on this yet - thought maybe I'd ask and see if someone knows.

 

When setting up Dynamenu with STS 4.5.8 - I decided to use the ability to have a footer.php.html template and put this in there:

<!-- Footer /-->
<?php echo $GLOBALS['dmfooter']; ?>
<!-- end footer /-->

 

That is the only thing I have in footer.php.html currently. I then have this in my index.php.html template

<?php include("footer.php.html"); ?>

exactly where $footer_text used to be.

 

Now, here is the part that confuses me. If I do NOT put the echo $GLOBALS bit into the application_bottom.php file, I do not get anything in the source code between <!--Footer /--> and <!-- end footer /--> tags.

 

If I DO put the echo $GLOBALS bit into the application_bottom.php file, I do get the appropriate dynamenu information output to the source code, however, it is after the closing </body> tag, where it should be before it.

 

Any idea why it doesn't work if it's only in the footer template and not application_bottom.php - and also how to get it to show up before the closing </body> tag rather than afterwards?

 

Ok - back to searching, if I find the answer before I have a reply I'll go ahead and post it here as well :thumbsup:

 

Thanks in Advance!

~Tracy
 

Link to comment
Share on other sites

Is the check out process also templated? I want to change the look of the site but want the hole thing to look like it matches.

 

I believe the checkout process will take the template according to the index.php.html template :thumbsup:

 

I know it does get templated when using STS - just not 100% positive which template it uses, but I think that's the one ;)

~Tracy
 

Link to comment
Share on other sites

I've been searching but I've not seen any info on this yet - thought maybe I'd ask and see if someone knows.

 

When setting up Dynamenu with STS 4.5.8 - I decided to use the ability to have a footer.php.html template and put this in there:

<!-- Footer /-->
<?php echo $GLOBALS['dmfooter']; ?>
<!-- end footer /-->

 

That is the only thing I have in footer.php.html currently. I then have this in my index.php.html template

<?php include("footer.php.html"); ?>

exactly where $footer_text used to be.

 

Now, here is the part that confuses me. If I do NOT put the echo $GLOBALS bit into the application_bottom.php file, I do not get anything in the source code between and tags.

 

If I DO put the echo $GLOBALS bit into the application_bottom.php file, I do get the appropriate dynamenu information output to the source code, however, it is after the closing </body> tag, where it should be before it.

 

Any idea why it doesn't work if it's only in the footer template and not application_bottom.php - and also how to get it to show up before the closing </body> tag rather than afterwards?

 

Ok - back to searching, if I find the answer before I have a reply I'll go ahead and post it here as well :thumbsup:

 

Thanks in Advance!

Tracy,

Try this:

Remove all instances of the echo $GLOBALS from your templates.

Now, be sure you have the following in the application_bottom.php file at the very end of that file:

	// Output the footer for Dynamenu for osCommerce
echo $GLOBALS['dmfooter'];
?>

That should do what you want.

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

Is the check out process also templated? I want to change the look of the site but want the hole thing to look like it matches.

Pete,

Yes, this can also be templated. You would name the template checkout_payment.php.html and so on. I use this to display various credit card images and so fourth.

 

If you do not specify a specific named template as above, STS will use the default template for that page. Either way it gets templated.

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 Bill, but the part that is confusing me is this -

 

application_bottom.php is called after the closing </body> tag

 

If I put the echo $GLOBALS['dmfooter']; anywhere other than application_bottom.php the popups don't work and the 'dmfooter' file is obviously either not being called or not being interpreted properly.

 

If I put the echo $GLOBALS['dmfooter']; in application_bottom.php the popups work, it's just the info for them is called after the closing </body> tag.

 

Now- I'm not sure why this is important, but Nate (on the Dynamenu forum) seems to keep reiterating that this 'dmfooter' should be called before the closing </body> tag - and I've had other web designers email me stating that the menu info showing up after the closing </body> tag on our live site is incorrect and that I must have a coding error somewhere.

 

So - I figured I'd see if anyone else has gotten the 'dmfooter' to run from inside the <body> </body> tags and actually output it's information inside those tags too.

 

Any thoughts?

 

 

Tracy,

Try this:

Remove all instances of the echo $GLOBALS from your templates.

Now, be sure you have the following in the application_bottom.php file at the very end of that file:

	// Output the footer for Dynamenu for osCommerce
echo $GLOBALS['dmfooter'];
?>

That should do what you want.

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