Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] STS v4


Guest

Recommended Posts

Another newbie with osC here! Thanks for the great platform and all the effort people are sharing here!

 

I'm looking for a way to add product listing into product info page while using STS. The layout I'm looking for would have small images of all the few products in one category showing while product info of one of the items is viewed. I don't really know php or mysql so well that I could write a script that gathers all the products located under current category by myself, but probably similar code already exists somewhere where category product list view for example is formed. Any ideas what should I copy and where? :)

Link to comment
Share on other sites

I'm looking for a way to add product listing into product info page while using STS. The layout I'm looking for would have small images of all the few products in one category showing while product info of one of the items is viewed. I don't really know php or mysql so well that I could write a script that gathers all the products located under current category by myself, but probably similar code already exists somewhere where category product list view for example is formed. Any ideas what should I copy and where?

 

I tried to add script from new_products.php (thinking that it might be pretty easy to modify a little to do the trick) to my product_info.php.html but as with my other attempts, the script doesn't show any products. As said, I don't know too much about php, but could it be so that some variables / tables / arrays are not visible to product info page, but the scripts are supposed to be located somewhere 'upper' in the page hierarchy? Waiting for some super genius to give me an easy&fast solution:) Cheers!

Link to comment
Share on other sites

Hi this is the first time I am making an STS template and I am really confused

 

Here is my template

 

http://www.artyfact.in/osc/includes/sts_te...s_template.html

 

but when I see it on the osc page it looks blank like this

 

http://www.artyfact.in/osc/

 

See what I mean ...

 

why is this happening ..can some1 point this noob out what he is doing wrong?

 

 

Regards

Anando

Link to comment
Share on other sites

Hi this is the first time I am making an STS template and I am really confused

 

Here is my template

 

http://www.artyfact.in/osc/includes/sts_te...s_template.html

 

but when I see it on the osc page it looks blank like this

 

http://www.artyfact.in/osc/

 

See what I mean ...

 

why is this happening ..can some1 point this noob out what he is doing wrong?

 

 

Regards

Anando

Did you enable STS in the admin?

Did you set the correct template folder to use (in your case the "test" folder)?

 

Did you try using the sample templates to begin with to make sure you have STS installed correctly?

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 tried to add script from new_products.php (thinking that it might be pretty easy to modify a little to do the trick) to my product_info.php.html but as with my other attempts, the script doesn't show any products. As said, I don't know too much about php, but could it be so that some variables / tables / arrays are not visible to product info page, but the scripts are supposed to be located somewhere 'upper' in the page hierarchy? Waiting for some super genius to give me an easy&fast solution:) Cheers!

 

Joose,

 

You may find the code that you need in this contribution:

http://www.oscommerce.com/community/contributions,3275

 

http://www.oscommerce.com/community/contributions,137

 

http://www.oscommerce.com/community/contributions,5351

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

Did you enable STS in the admin?

Did you set the correct template folder to use (in your case the "test" folder)?

 

Did you try using the sample templates to begin with to make sure you have STS installed correctly?

 

 

Did you enable STS in the admin? YES

Did you set the correct template folder to use (in your case the "test" folder)? YES

Did you try using the sample templates to begin with to make sure you have STS installed correctly? NO

 

My next move should be? change to the full template folder and test that and see if its working properly or not?

Link to comment
Share on other sites

This is what I am getting now after I shifted my templates folder..it seems to be working fine... :( then why isnt mine! ..can it be that my css files and images need to be someplace else so that it can be read?

 

 

see the page for testing !

 

http://www.artyfact.in/osc/

 

 

 

 

 

This is the template for index.php page. You can find it here: /osc/includes/sts_templates/full/index.php.html

 

 

What's New Here?

 

 

Welcome Guest! Would you like to log yourself in? Or would you prefer to create an account?

 

This is a default setup of osCommerce Online Merchant. Products shown are for demonstrational purposes. Any products purchased will not be delivered nor will the customer be billed. Any information seen on these products is to be treated as fictional.

 

Error Messages

 

If there are any error or warning messages shown above, please correct them first before proceeding.

 

Error messages are displayed at the very top of the page with a complete background color.

 

Several checks are performed to ensure a healthy setup of your online store - these checks can be disabled by editing the appropriate parameters at the bottom of the includes/application_top.php file.

Link to comment
Share on other sites

Hi, thanks again,

The code for my menu is as follows:

<div id="menu">

<img style="position:absolute; top:0px; left:0px;" src="$templatedir/images/menu/menu_top.jpg" />

<script type="text/javascript" src="http://www.game101.co.uk/includes/sts_templates/test/data.js"></script>

<img style="position:absolute; bottom:0px; left:0px;" src="$templatedir/images/menu/menu_bottom.jpg" />

</div>

As you can see the link to the external .js file is not in the head it is in the actual content of the page. Does this mean it is not possible to get it to work?

Also the javascript code that links to the categories is as follows:

 

["DS","", "", "", "", "", "", "0", "", "", ],

["|View All","http://www.game101.co.uk/ds/all.html", "", "", "", "", "", "12", "", "", ],

["|Action","http://www.game101.co.uk/ds/action.html", "", "", "", "", "", "12", "", "", ],

["|Activity","http://www.game101.co.uk/ds/activity.html", "", "", "", "", "", "12", "", "", ],

["|Adventure","http://www.game101.co.uk/ds/adventure.html", "", "", "", "", "", "12", "", "", ],

["|Classic","http://www.game101.co.uk/ds/classic.html", "", "", "", "", "", "12", "", "", ],

["|Fighting","http://www.game101.co.uk/ds/fighting.html", "", "", "", "", "", "12", "", "", ],

["|Hardware","http://www.game101.co.uk/ds/hardware.html", "", "", "", "", "", "12", "", "", ],

["|Platform","http://www.game101.co.uk/ds/platform.html", "", "", "", "", "", "12", "", "", ],

["|Point and Click","http://www.game101.co.uk/ds/pointclick.html", "", "", "", "", "", "12", "", "", ],

["|Puzzle","http://www.game101.co.uk/ds/puzzle.html", "", "", "", "", "", "12", "", "", ],

["|Racing","http://www.game101.co.uk/ds/racing.html", "", "", "", "", "", "12", "", "", ],

["|Role Playing","http://www.game101.co.uk/ds/roleplaying.html", "", "", "", "", "", "12", "", "", ],

["|Sport","http://www.game101.co.uk/ds/sport.html", "", "", "", "", "", "12", "", "", ],

["|Strategy","http://www.game101.co.uk/ds/strategy.html", "", "", "", "", "", "12", "", "", ],

 

Please could you tell me how to intergrate the link into that.

Thanks so much your help is really appreciated! Top Man!

 

You can include a javascript file from inside a template: place the JavaScript file in your template folder and in the header of your template, add this:

 

<script LANGUAGE="JavaScript" SRC="$templatedir/data.js"></SCRIPT>

 

I think the root of your issue is the links that are being generated in the JavaScript. If these links are hard coded, you should create them as I mentioned earlier or you are going to have issues with the session ID being lost in which case would empty out your customer's shopping cart, log him out, etc.

 

You will need to find the category ID for each category/subcategory and then build your links using the method I suggested earlier.

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

guys thx a lot..but its fixed..the css needed to be in the root folder of OSC . I ll come back soon with new noob questions :)

It is suggested that you place your template stylesheet in your template folder so that you can have a separate stylesheet for each template folder. Some STS users like having a different template folder to be used per season, holiday, special annual sales event, etc.

 

To link to your template stylesheet, use the following:

 

 <link rel="stylesheet" type="text/css" href="$templatedir/stylesheet.css">

 

The STS tag "$templatedir" is self explainatory. :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

You can include a javascript file from inside a template: place the JavaScript file in your template folder and in the header of your template, add this:

 

<script LANGUAGE="JavaScript" SRC="$templatedir/data.js"></SCRIPT>

 

I think the root of your issue is the links that are being generated in the JavaScript. If these links are hard coded, you should create them as I mentioned earlier or you are going to have issues with the session ID being lost in which case would empty out your customer's shopping cart, log him out, etc.

 

You will need to find the category ID for each category/subcategory and then build your links using the method I suggested earlier.

 

Hi again.

The script for my menu is located inside a <div> tag in the page body so it can be positioned correctly. If i remove it from the body and place it in the head i cannot position it, it will always appear in the top left corner of the browser.

 

Is there a way around this? Many thanks.

Link to comment
Share on other sites

Hey guys,

 

I am not sure if there are a solution for it, but we seams quite a few having the same problem. The Ajax shopping cart doesn't work correctly with STS. Some asked questions here (ajax shopping cart) but no one had a solution.

 

I try a post here and see if any of you guys got it to work with STS? In such case what kind of adjustments are needed?

 

Cheers

Hakan

If the contribution is coded to osC standards then STS will not have any issues with it. The Ajax Shopping Cart has some bugs that need to be worked out by the authors of that contribution. Other than that, it may be an issue with how the JavaScript handled.

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

Someone asked the following outside of this thread so I will post it here again for all STS Users:

 

When adding a new contribution to your store that adds a new infobox, you will need to define a new STS tag for the new infobox being created by that contribution.

 

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. In the sample above, the new box being added was infobox_name.

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

If the contribution is coded to osC standards then STS will not have any issues with it. The Ajax Shopping Cart has some bugs that need to be worked out by the authors of that contribution. Other than that, it may be an issue with how the JavaScript handled.

 

But many non STS users take advantage of Ajax Shopping cart, as it is powerful and professional. So, what about us as STS users?! Are we unlucky to use this great contribution?

 

Please Bill if you are not familiar with Ajax, do ask the author of Ajax Shopping cart to convert it to STS.

Link to comment
Share on other sites

But many non STS users take advantage of Ajax Shopping cart, as it is powerful and professional. So, what about us as STS users?! Are we unlucky to use this great contribution?

 

Please Bill if you are not familiar with Ajax, do ask the author of Ajax Shopping cart to convert it to STS.

 

I'm very familar with Ajax. The issue is that I do not have a need for that contribution at this time and I do not have the time to troubleshoot all of the bugs in it as well. Others HAVE installed it along with STS and had no issues at all so this leaves me to think that any issues are isolated issues and not a global issue that has anything to do with STS.

 

The issues that some are having could very possibly have to do with the JavaScript not being accessed correctly. Another possible solution would be to have STS not template specific files from the contribution (see the STS User Manual for details).

 

I have given detailed instructions on some steps that could be taken to resolve a blank page issue but I have not heard back on whether my tips worked or not. Other than "some" experiencing a blank page, I do not know of any other issues that Ajax Shopping Cart is in conflict with STS and whether or not these are global issues or isolated to a few (other contributions may be conflicting with Ajax Shopping Cart and STS just so happens to be in use but may not be the problem). Users should make them known and maybe the community as a whole can get them worked out.

 

The Ajax Shopping Cart support thread is located here:

http://www.oscommerce.com/forums/index.php?s=&...t&p=1152831

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 thank you i hope Ajax shopping cart will work for me with no issues.

 

please how to make the width of the left column smaller?

 

I tried in application_top

// customization for the design layout
 define('BOX_WIDTH', 125); // how wide the boxes should be in pixels (default: 125)

 

but this do change the layout of both left and right columns :(

 

also, please how to custom create_account.php i want to change its color, a step by step instruction will be appreciated :wub:

 

Sorry for my too many questions but i am new to STS ^_^

Edited by celina2007
Link to comment
Share on other sites

Hi,

 

I'm using this contribution http://addons.oscommerce.com/info/3329 (the very first one) and added search2.php to boxes and added another placeholder in sts_column_left. Anyway this seems to show and work fine I just want to increase the size of the box (higher - i can make it longer easy enough as defined in search2.php). I thought just changing the font size etc would work but no joy. Also I tried to get V2.3 working (allows text to be pre-populated into box and clear on box selection, proper buttons etc) but couldn't - do you think this is a javescript issue?

 

Many thanks

Link to comment
Share on other sites

Bill thank you i hope Ajax shopping cart will work for me with no issues.

 

please how to make the width of the left column smaller?

 

I tried in application_top

// customization for the design layout
 define('BOX_WIDTH', 125); // how wide the boxes should be in pixels (default: 125)

 

but this do change the layout of both left and right columns :(

 

also, please how to custom create_account.php i want to change its color, a step by step instruction will be appreciated :wub:

 

Sorry for my too many questions but i am new to STS ^_^

 

 

No need to fuss with application_top.php. STS allows you to make the layout anyway that you want. You could even leave out the 2nd or 3rd columns all together.

 

Change the width inside your template. If you are using tables than modify the table width, cell, column. If you are using CSS, then make the change in your stylesheet.

 

Same thing goes for any custom page templates such as the one you mentioned, create_account.php. You will need to follow the STS naming syntax which is easy enough: create_account.php.html. You can do anything you want with this page such as make it one column, two column, etc. Again, if you are using tables, simply modify the table background. If you are using CSS, modify the background color in the CSS class.

 

TIP:

For Internet Explorer users, I strongly suggest installing a handy developer's plugin tool from Microsoft that will assist you in finding all of the details about your particular page in the browser. For example: Having a tough time finding what CSS class is causing your text to be green? Use this tool to display all of the CSS and Class ID information. Big Time saver!

Download it free from Microsoft:

http://www.microsoft.com/downloads/details...;displaylang=en

 

Firefox users can download a similar tool from Mozilla called Webdeveloper.

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,

 

I'm using this contribution http://addons.oscommerce.com/info/3329 (the very first one) and added search2.php to boxes and added another placeholder in sts_column_left. Anyway this seems to show and work fine I just want to increase the size of the box (higher - i can make it longer easy enough as defined in search2.php). I thought just changing the font size etc would work but no joy. Also I tried to get V2.3 working (allows text to be pre-populated into box and clear on box selection, proper buttons etc) but couldn't - do you think this is a javescript issue?

 

Many thanks

 

Becki,

 

To add the search function to your template, you could simply add the actual form:

 

<form name="advanced_search" action="advanced_search_result.php" method="get">

<td bgcolor="anycolor">

<table width="100%" cellpadding="0" cellspacing="0"><tr><td class="navigation">Search ;</td>

<td align="center"><input type="hidden" name="search_in_description" value="1"><input type="hidden" name="inc_subcat" value="1" 1><input type="text" name="keywords" size="10" maxlength="30" class="searchForm" style="width: 95px"></td><td align="center"> <input type="image" src="$templatedir/images/gobutton.gif" border="0" alt="Search" title=" Search "></td></tr></table>

</td></form>

The above code can be used anywhere in your template and can be styled anyway you desire. The items in bold need to be changed to your liking.

 

You can get some nice design ideas from the following contribution and each one of the HTML code snipits work perfectly in your STS templates:

http://www.oscommerce.com/community/contributions,3295

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

Chris,

I do not use that contribution but here are some suggestions:

 

If the contribution has some pages that are not working with STS or you would rather those pages (popups) not be templated by STS, you could easily instruct STS to ignore them.

 

:thumbsup: How to exclude a page from being templated in STSv4.4 and above:

 

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,

 

 

You made a spot in the line of my personal heroes, sir.

 

Thank you!

Link to comment
Share on other sites

Hi everyone.

I have created a template for the category pages of my website, which display the products in a list using the $content tag. You can see it here at: http://www.game101.co.uk/index.php?cPath=22

Iv been reading how to create $content templates for the product info pages, but can it be done for the content of the category pages?

As i want to change the fonts and sizes, move Displaying 1 to 3 (of 3 products) from the bottom of the page to the top of the page for example. And more importantly add a spacer image between each product to seperate them, and add additional information such as release date, an image displaying the age classification and format, rather than solely displaying the product name.

All help appreciated!

Many thanls.

Link to comment
Share on other sites

Hi guys I cant seem to get a cart total in the head of my page.

 

I followed the forum entry but i still get $headcart instead of the total that is in the cart.

 

Any ideas on what I missed?

Be sure you have done everything in the following post (from this support thread):

#3317

http://www.oscommerce.com/forums/index.php?sho...p;#entry1195537

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 please tell me what's wrong with cssmenu, sometimes I see this error in the categories infobox

Warning: Invalid argument supplied for foreach() in /www/catalog/includes/boxes/categories_cssmenu.php on line 144

 

Just sometimes (!)

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