Jump to content
rigadin2

[Contribution] STS v4

Recommended Posts

Absolutely - that's what the "content" folder is for - content templates :) Read the instructions that come with STS to learn how to use them :)

 

But does this include the content of boxes to? for instance the product listing box. How does the $content work for this? There is some kind of loop involved in boxes like product listing box or category box but I can't use php code in templates so how does this work? Does the template I create in content/ folder represent the display of one product in product listning box and one category in the categorybox?

 

I read the part about $content tag but as I understood it I can use $content to shange the shape of a box or a sub page like a category but kan I realy change the box content of category box or product listening box?

 

What should I name the file in content/ folder so the template pick it upp to show product list for a specifik product?

Edited by fredriksk

Share this post


Link to post
Share on other sites
There is some kind of loop involved in boxes like product listing box or category box but I can't use php code in templates so how does this work?

 

Who says you can't? Yes, you can use PHP code in any of your templates.

 

Here is a short tutorial on how to create a content template see the following post:

 

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


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
can iframes be used with STSv4? If yes, what naming syntax should be used for the content file it reads. Or can sts_users_code be modified. Or is it a matter of creating a page to be placed in the content folder of the template.

 

any info would be appreciated.

 

 

Thanks in advance

 

_Matt

 

Yes, an iframe can be used but it is really a clunky way to do things:

http://www.w3schools.com/TAGS/tag_iframe.asp

 

The naming syntax has nothing to do with the iframe or the src.


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
Hi all,

 

Looking for a little help and I hope I am posting in the correct thread, I am using STS but am unsure what version..

 

I am having a problem with Products not showing up at all, I have created all the cats i require and inserted products into some of them as U can see by the numbers in the nav bar but when you navigate thru the left hand navigation to the product is just shows a blank page with the text Lets see what we have here, If I search for the products ID I find the product,

 

This is becoming a real problem as I dont seem to be able to fin a solution

 

Any advice woul be much appeciated

 

The url is www .mobim8.com/index.php

 

Thanks in advance

 

Anthony

 

Installed RC2a

Installed (apparently) latest STS 4.5.8

 

and only see the string "Module Directory: /home/wwwwems/public_html/teststore/includes/modules/sts/" (after clicking on STS under modules in admin. next to this string on the right it says "install module" but clicking on it dose absolutely nothing.

 

Since I have a totally FRESH RC2a oscommerce version, I thought I only need to replace the files from the RC2 folder of the STS...? Is this correct or - is there a problem now since I have RC2a (SEE THE "a") oscommerce version installed. (there is absolutely nothing mentioned in my STS tutorial about any differences or so?

 

Thank you

Share this post


Link to post
Share on other sites

I did a post in another STS thread so sorry for my double post.

 

Who says you can't? Yes, you can use PHP code in any of your templates.

 

Here is a short tutorial on how to create a content template see the following post:

 

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

 

Ok I read the post you suggested but i still don't quite get it..

 

This is what I want to do (first)

 

I use a contrib that makes it posible to edit the welcome text and other infopages from admin. Therefore I can't make a template file for index.php_0.html since I don't wan't it to be static (later on I would like to change the content of some infoboxes to so I realy want to learn this).

 

Now. I want to make a content file for the startpage (homepage) and some placeholders for "welcome text" and "please login/create account" etc that you can find in the normal startpage.

 

I know I need to create placeholders in includes/modules/sts_inc/sts_user_code.php or in a separate file in this folder.

I also know I need to create a content template file in /sts_templates/myTemplate/content folder

 

But where and how do I make the index.php_0.html (i.e index.php) know how to use the content template?

Share this post


Link to post
Share on other sites

need help, dont know whats wrong

 

installed everything including sts files and admin/includes folders. have installed sts fine before in the past.

 

went into admin panel and under modules, i click sts and then click install on the right, nothing happens

 

whats wrong

Share this post


Link to post
Share on other sites

Hello Bill and everybody.

 

I'm using STS since a while discovering like every day a new possibility. I use STS version 4.5.8(23/1/2008) and everything is fine. I decided to use the product info content page option and want to have my "Additional Images" displayed there.

 

The problem is that I can not get a single additional image to be displayed. I'm cooking in includes/modules/sts_inc/product_info.php. I try to follow the steps of the installation of "Additional Images" to catalog/product_info.php. Right now I'm at following point:

 

1) I added ---p.products_image_med, p.products_image_pop, p.products_image_description --- to the product_info query, so it looks now like this:

 $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, p.products_image_med, p.products_image_pop, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . $products_id . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
$product_info = tep_db_fetch_array($product_info_query);

 

Then I defined 3 new tags, placed them in the sts_inc/product_info.php and they produce the right output on the browser

 $template_pinfo['mainimagesmall'] = tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), /*SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT,*/ 'hspace="5" vspace="5"');
 $template_pinfo['mainimagemed'] = tep_image(DIR_WS_IMAGES . $product_info['products_image_med'], addslashes($product_info['products_name']), '','','');
$template_pinfo['mainimagepop']= '<a rel="lightbox" href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image_pop']) . '" title="'. $product_info['products_name'] .' - '. $manufacturer['manufacturers_name'] .'">'.$template_pinfo['imagesmall'] . '<br>' . TEXT_CLICK_TO_ENLARGE .'</a>'."\n";

 

So far so good.

 

2) I inserted a new sql query (taken from the additional images installation) as follows

	file_exists(DIR_WS_CLASSES . 'displayimages.php'); // Additional Images Present // line commented out because not picking the main product image
	//if ($addimages) { 	
 if (!empty($_GET['imagesID'])) {
$products_query = tep_db_query( "SELECT ai.products_id, ai.images_description, ai.thumb_images, ai.medium_images, ai.popup_images, p.products_image, p.products_image_med, p.products_image_pop, p.products_image_description FROM " . TABLE_ADDITIONAL_IMAGES . " ai, " . TABLE_PRODUCTS . " p WHERE ai.products_id=p.products_id and ai.additional_images_id = '".(int)$_GET['imagesID']."'");
$selected_image = tep_db_fetch_array($products_query);
 } elseif (!empty($_GET['pID'])) {
$products_query = tep_db_query( "SELECT products_id, products_image, products_image_med, products_image_pop, products_image_description FROM " . TABLE_PRODUCTS . " WHERE products_id = '".(int)$_GET['pID']."'");
$selected_image = tep_db_fetch_array($products_query);
 }

 $imagemenu =  ( $selected_image['products_id'] );

 

When I change now the previous tag definitions to use the images of this query

  $template_pinfo['mainimagesmall'] = tep_image(DIR_WS_IMAGES . $selected_image['popup_images'], addslashes($product_info['products_name']), /*SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT,*/ 'hspace="5" vspace="5"');

 

It displays nothing

 

3) I try with an other query and definitions as follows

		$image_query = tep_db_query( "SELECT ai.medium_images, ai.images_description, ai.popup_images, p.products_image_med, p.products_image_description  FROM " .  TABLE_ADDITIONAL_IMAGES . " ai, " . TABLE_PRODUCTS . " p WHERE ai.products_id=p.products_id and ai.products_id = '".(int)$products['products_id']."'");
$selected_image = tep_db_fetch_array($image_query);
	$image = ($selected_image['medium_images'] ? $selected_image['medium_images'] : ($selected_image['products_image_med'] ? $selected_image['products_image_med'] : ($selected_image['popup_images'] ? $selected_image['popup_images'] : $products['products_image'])));

but the I don't know how to define the sts tag properly, I'm guessing in the darkness

 

Whats my final target? To have the main image displayed with a separate tag, (as I suceed to do) and all additional images in a block under it, all clickable and included in the same lightbox group (this is done already in "normal" php)

 

So, in real I need one tag definition that will include all additional images doesn't matter how many in one line.

 

In the catalog/product_info.php (that includes additional images) I found 2 lines for this "grouping"

$additional_images = new displayimages ( $product_info['products_id'] );

and then

echo $additional_images->groupoutput();

 

But how to transfer this into a sts tag?

 

I'm sorry if my doings sound ridiculous for people who know what this all mean exactly, but I hope somebody can figure out what I try to do here and give me some tips. I found that there isn't a solution for this, not here and also not in the AI forum.

Share this post


Link to post
Share on other sites
The problem is that I can not get a single additional image to be displayed.

 

People, you may not believe it, but there is really something going on. Thanks to Todd's (Surfalot) help, there are really additional images appearing on the page, in a block, single, as you like, it's amazing, I'm very excited.

 

I'll keep you all posted, hope the solution will be ready for publishing soon :)

Edited by multimixer

Share this post


Link to post
Share on other sites
People, you may not believe it, but there is really something going on. Thanks to Todd's (Surfalot) help, there are really additional images appearing on the page, in a block, single, as you like, it's amazing, I'm very excited.

 

I'll keep you all posted, hope the solution will be ready for publishing soon :)

 

 

If you decide to upload something, DO NOT UPLOAD IT TO THE STS DOWNLOAD PAGE. These types of uploads should be uploaded to the STSv4 Power Pack site only so as not to mess up the main STS download page.

 

By the way, have you tried the Ultimate Pics contribution? It is very easy to integrate into STS as well as make custom STS tags to be used in the product info template.


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
If you decide to upload something, DO NOT UPLOAD IT TO THE STS DOWNLOAD PAGE. These types of uploads should be uploaded to the STSv4 Power Pack site only so as not to mess up the main STS download page.

 

By the way, have you tried the Ultimate Pics contribution? It is very easy to integrate into STS as well as make custom STS tags to be used in the product info template.

 

Bill, do not worry, my purpose is not to mess up anything. I do not like my self contribution pages full of uploads of different "fixes", that are mostly just adjustments (or hacks) to personal needs. I'm not an expert in all this, and I would not achieve anything without the support of this community here and specially of people like you and Todd and Jack and others. So, if I figure something out, then I'm posting it, in the hope that somebody will find help in it. And I'm sorry if I sound maybe too excited about a simple thing, it was just not that simple for me.

 

I did not try the Ultimate Pics contribution, no. I searched the forum before and found that there are requests about integrating AI into the content templates of STS, and always the recommendation is to try an other contribution.

 

Since I have Additional Images installed and since the contribution works very well in every aspect, also in STS, I don't see a reason to through it away. The target for me was to make it to work, and it works.

 

It's extremely easy to integrate into the content product_info.php. There is no code replaced at all, just one single block to add. I have created tags for all possible image combinations, but it's also easy to create even more.

 

Everything will be posted in the forum first.

Share this post


Link to post
Share on other sites

Ok i did a simple code change to put the quantity selection box on the product info page instead of the shopping cart. I am using the product info templates. I want to know how i can get that quantity selection box to show in the template. How do i make a new place holder to call it?

 

i have searched everywhere. If this has been answered, can some one point me the right direction

Share this post


Link to post
Share on other sites

Im trying to make a content template for the welcome page (index.php_0.html)

 

I have created the placeholders and a template that uses them but where do I put the code that makes sts read the content insted of the code located in catalog/index.php i.e where do I put the

 

$sts->script->content_template_file = STS_TEMPLATE_DIR . "content/mypage.php.html";

 

Or do I need to make a module to get this working?

Share this post


Link to post
Share on other sites

Hi,

I want to add Newsletter & subscribers to RC2 with STS 4

 

I am not sure how to do this so the module will show.

 

I have read the documentation but it does not give examples, what syntax is used in sts_user_code.php?

 

I want to beable to show an infobox on to allow the user to sign up for a newsletter

Share this post


Link to post
Share on other sites

so I solved my previous problem. Now i would like to know if there is a way i can call each individual attribute on the product info page? Instead of calling them all at once in one block. I would like to put certain attributes in different parts of the page.

Share this post


Link to post
Share on other sites

Hello people

 

I just uploaded a modification that integrates Additional Images into the STS content pages (including lightbox of course). There are many sts tags defined that you can use directly in your content pages, also a sample product_info.php.html file included, to give you the overview. You can switch light box on or off from your admin panel.

 

You can find it here --->Additional Images for STS content pages - Version 1

 

Enjoy :)

Share this post


Link to post
Share on other sites
Hello people

 

I just uploaded a modification that integrates Additional Images into the STS content pages (including lightbox of course). There are many sts tags defined that you can use directly in your content pages, also a sample product_info.php.html file included, to give you the overview. You can switch light box on or off from your admin panel.

 

You can find it here --->Additional Images for STS content pages - Version 1

 

Enjoy :)

 

Very Cool! Thanks for the add-on! :lol:


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

Hi guys new to the site,

so take it easy lol :)

 

I was wondering can i use the STS engine to redesign my admin panel?

 

any feedback would be greatful

Share this post


Link to post
Share on other sites
Hi guys new to the site,

so take it easy lol :)

 

I was wondering can i use the STS engine to redesign my admin panel?

 

any feedback would be greatful

 

 

No, it is not setup for that. I would suggest you giving the Mindsparx Admin add-on a look.


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
Very Cool! Thanks for the add-on! :lol:

 

 

Bill, I'm sure you hear this all the time, but what a fantastic add-on. Using V4.5.8, I am not having a problem with installation, but hope you can offer advise for what I am trying to do.

 

I am trying to add content to the bottom of my category pages, but the content is duplicating to my product_info pages therefore creating duplicate content. I have installed specific category pages using $CONTENT for the main body with my additional HTML beneath. Can you offer me any suggestions to not have the additional HTML on each of the product_info pages in each respective category?

 

I appreciate your help.

 

www.doubledeedeals.com

Share this post


Link to post
Share on other sites

I have created a index.php_0.html file in the content folder. Why doesn't sts template system recognize this and use it? What do I need to do to make this work?

Share this post


Link to post
Share on other sites
I have created a index.php_0.html file in the content folder. Why doesn't sts template system recognize this and use it? What do I need to do to make this work?

 

Remove it from the content folder and place it in the root of the template folder (includes/sts_templates/*your_template_folder/index.php_0.html).


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, I'm sure you hear this all the time, but what a fantastic add-on. Using V4.5.8, I am not having a problem with installation, but hope you can offer advise for what I am trying to do.

 

I am trying to add content to the bottom of my category pages, but the content is duplicating to my product_info pages therefore creating duplicate content. I have installed specific category pages using $CONTENT for the main body with my additional HTML beneath. Can you offer me any suggestions to not have the additional HTML on each of the product_info pages in each respective category?

 

I appreciate your help.

 

www.doubledeedeals.com

 

This should not be happening unless you created a specific product_info template with the same HTML. Provide me with the list of template names that you are using and your entire template structure (folder name/template name).


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
This should not be happening unless you created a specific product_info template with the same HTML. Provide me with the list of template names that you are using and your entire template structure (folder name/template name).

 

Thank you for your response. I have included screen shots of my files, their location and the settings in Admin. I am glad to hear you say that there is a fix. I trust it is just my lack of knowledge of teh contribution. The screen shots can be found at: http://www.doubledeedeals.com/images/sts_files.xps

 

Thank you so much for your assistance with this fantastic contribution.

 

www.doubledeedeals.com

Share this post


Link to post
Share on other sites
Remove it from the content folder and place it in the root of the template folder (includes/sts_templates/*your_template_folder/index.php_0.html).

 

But it IS a content template.I have made up my own placeholders that implements the various parts of the welcome page. I have a index.php_0.html file in my root template folder and it contains a $content placeholder. Now I want it to use the ../content(index.php_0.html template. How do I do this?

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

×