Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] STS v4


Guest

Recommended Posts

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://www.oscommerce.com/forums/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

Link to comment
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

Link to comment
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

Link to comment
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://www.oscommerce.com/forums/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?

Link to comment
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

Link to comment
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.

Link to comment
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
Link to comment
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

Link to comment
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.

Link to comment
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

Link to comment
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?

Link to comment
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

Link to comment
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.

Link to comment
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 :)

Link to comment
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

Link to comment
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

Link to comment
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

Link to comment
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

Link to comment
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

Link to comment
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

Link to comment
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?

Link to comment
Share on other sites

Im hoping someone can help me.

 

I've setup STS on a website and am really happy to have found this contrib. There is one problem however.

The site in question can be viewed here: http://www.yardbutlerstore.com/catalog2/index.php?cPath=27

 

any of the products I select do not use the product_info template, if i change the url from lets say http://www.yardbutlerstore.com/catalog2/pr.../products_id/31 to http://www.yardbutlerstore.com/catalog2/pr...?products_id=31 than it does display the new template.

 

What is going on? I've been searching for a solution for 2 days now and feel like im against a wall.

 

Wolfgang

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