Jump to content
rigadin2

[Contribution] STS v4

Recommended Posts

Re1: The naming of the templates doesn't change, doesn't matter if you have SEO url's installed or not. You name the templates as per instructions, no change

Re2: No you can not. Apart it would be senseless since the tags of sts_inc/product_info.php refer to content that is supposed to be displayed on the product info page. But you can create as many tags as you like to use and place them into sts_inc/sts_user_code.php

Re3: You need to make separate templates per category (or subcategory) only in case you want them to be different than the "main" index.php.html template, for example to show other boxes, or to have an other color etc

 

To change the product listing way, the best is you instal the product listing addon.

 

Thanks for the quick answer. Guess STS doesn't support this directly, so I'll have to do it the hard way.

Share this post


Link to post
Share on other sites

Hi everybody,

 

I've spent like 4 desperate days in oscommerce , contributions and STS forums...

So, here is my quetions,

I want to use http://themeforest.net/item/software-ecommerce-site-full-01/full_screen_preview/19941 as an oscommerce design.

What I'm trying to find out is how much of this design could be transcribed into Oscommerce via the tags/templates used in STS?

I have read STS docs, and the beginner tutorial so I'm not entirely shooting in the dark.

 

(Please note that I have searched the forums as best as I can but since I don't know if I'm looking for a piece of code to paste into oscommerce pages, or a module, or something else I really don't know what to search for. I'd appreciate a link to appropriate thread/post for my questions instead of just saying "that has been answwered on the forums")

 

1- I have read on this very thread that ul_categories contribution lets you style the categories menu via CSS. Is there a way to do that via STS?

2- When you login to default oscommerce installation there is a product list table (or whatever you name it) . I really don't like that and want to modify it as I please. I want to make it more like the product list http://themeforest.net/item/software-ecommerce-site-full-01/full_screen_preview/19941 or something totally different. Is there a way to do something like that via STS ? If NOT, could you at least direct me to a STS friendly contribution or a tutorial for modifying the "look" of the product lists? (ul_categories for instance works great job styling the categories menu)

3- I am quite good at css/xhtml so I think STS is the right tool for me to come up with unique looking oscommerce sites without worrying too much about os_commerce code. Or am I wrong ?

 

Thank you in advance,

 

Greg Wee - Could you please share your template with me?

Share this post


Link to post
Share on other sites

What do you mean?

 

Means I'll have to either:

1. create additional tags in STS and then create a template to display the products in a "Grid" or

2. Install the Product Listings Enhancement Addon you linked me to in the previous post.

 

How do you create additional tags for STS? Any tutorials or step by step guide on how to do this?

Share this post


Link to post
Share on other sites

Means I'll have to either:

1. create additional tags in STS and then create a template to display the products in a "Grid" or

2. Install the Product Listings Enhancement Addon you linked me to in the previous post.

 

How do you create additional tags for STS? Any tutorials or step by step guide on how to do this?

I would instal the addon

 

To learn how to create tags, the best is you read the documentation and study the files in the includes/modules/sts_inc folder.There are also many examples in the forum here, like this

Share this post


Link to post
Share on other sites

It's a licensed web template. I can not send it. Sorry.

 

It's alright. I downloaded the free copy. How do I remove that flower on the main page?

Share this post


Link to post
Share on other sites

It's alright. I downloaded the free copy. How do I remove that flower on the main page?

 

I think, you are talking to the wrong person

Share this post


Link to post
Share on other sites

Greg Wee - how do i remove that flower?

 

 

Why are you asking this question in the STS support thread? If you can't figure it out on your own, then you should contact the author of the template.

 

thumbsup.gif TIP: Did you try editing the actual template file to remove the flower image? Seems to me that if the template was created to be used in STS, that would be the first place I would be looking.


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

Hello all!

 

I have a quick question regarding UltraPics and STS with the product info content template activated in STS. Right now when I activate the content template UltraPics won't work (the extra images won't show up), if I deactivate the product info content template, UltraPics works again. In this thread(http://forums.oscommerce.com/topic/301023-sts-v458-htc/page__p__1243219entry1243219) bkellum wrote:

 

UltraPics also works great with STS. The issues arise if you decide to use the product info content template feature in STS. It is really not an issue but more of an extra step. If you want to use content templates as well as UltraPics, you will need to modify the sts_inc/product_info.php file. The modifications that are made to the stock product_info.php file need to be duplicated in the sts_inc/product_info.php file.

 

Do anyone know what I need to modify to make UltraPics work together with STS (I also use Lightbox, but that is working fine with STS product info content template activated, UltraPics is not working)?

Share this post


Link to post
Share on other sites

Do anyone know what I need to modify to make UltraPics work together with STS (I also use Lightbox, but that is working fine with STS product info content template activated, UltraPics is not working)?

 

What you need to do is to create $tags for the extra images. I did this for addon "additional images", you can take a look and do something similar for ultrapics

Share this post


Link to post
Share on other sites

What you need to do is to create $tags for the extra images. I did this for addon "additional images", you can take a look and do something similar for ultrapics

 

Sadly my knowledge is basic in this area so I don't know how I should do this. I tried looking over what you had created in the past but no lightbulb lit up for me. If I only could find the solution somehow, because I'm pretty sure this question has been asked before.

Edited by Maxiimilian

Share this post


Link to post
Share on other sites

Sadly my knowledge is basic in this area so I don't know how I should do this. I tried looking over what you had created in the past but no lightbulb lit up for me. If I only could find the solution somehow, because I'm pretty sure this question has been asked before.

 

I'm sorry but I never used ultrapics so I have no idea what it needs to create tags for this. I just had the idea that it could be very similar to additional images. What you need to do is to search the forum, the best via google site:forums.oscommerce.com [Contribution] STS v4 ultrapics or something like this

Share this post


Link to post
Share on other sites

Hi multimixer, do you have a few pointers for me regarding my post on the previous page ? I2m still banging my head to the wall.

Share this post


Link to post
Share on other sites

I want to use http //themeforest.net/item/software-ecommerce-site-full-01/full_screen_preview/19941 as an oscommerce design.

What I'm trying to find out is how much of this design could be transcribed into Oscommerce via the tags/templates used in STS?

.

.

1- I have read on this very thread that ul_categories contribution lets you style the categories menu via CSS. Is there a way to do that via STS?

2- When you login to default oscommerce installation there is a product list table (or whatever you name it) . I really don't like that and want to modify it as I please. I want to make it more like the product list http //themeforest.net/item/software-ecommerce-site-full-01/full_screen_preview/19941 or something totally different. Is there a way to do something like that via STS ? If NOT, could you at least direct me to a STS friendly contribution or a tutorial for modifying the "look" of the product lists? (ul_categories for instance works great job styling the categories menu)

3- I am quite good at css/xhtml so I think STS is the right tool for me to come up with unique looking oscommerce sites without worrying too much about os_commerce code. Or am I wrong ?

 

You can do exactly the same, or even better, it depends on your design skills. You will need to get some addons to implement the additional functions, from there on you "wrap"the functions into tags that you can use in the templates

 

re1: I would recommend the "dynamenu" addon, you have a variety of display choices, you can change the menu type via admin and you can also use it for articles if you have that addon. It's 100% css based

re2: Use the "product listing" addon by sam (spooks). You also have many listing choices and it's independed from sts, so no conflicts. Even the listings there are still in tables, you can replace the <tr> etc stuff with <div>, make some more css definitions and control it also exclusively via css

re3: You are right

Share this post


Link to post
Share on other sites

Is there a way to do this in the current version?

 

 

In catalog/includes/classes/sts.php, find the following code:

// If script name contains "popup" then turn off templates and display the normal output
 // This is required to prevent display of standard page elements (header, footer, etc) from the template and allow javascript code to run properly
 // Do not add pages here unless it is from the standard osC and really should be there. If you have a special page that you don't want with template,
 // Create a module sts_mypagename.php that returns an empty string as template filename, it will automatically switch off STS for this page.
if (strstr($scriptbasename, "popup")|| strstr($scriptbasename, "info_shopping_cart")) {
  $this->display_template_output = false;
  return;
}

Add the additional scriptname that you need STS to ingore so it will not add the header, footer, etc. For example: Your code would end up looking like this if you wanted STS to ignore the login.php script file:

	if (strstr($scriptbasename, "popup")|| strstr($scriptbasename, "login")|| strstr($scriptbasename, "info_shopping_cart")) {
  $this->display_template_output = false;
  return;
}

You can also add any other filenames if needed.

Hope this has helped,

Bill Kellum

 

Inside function sts I tried

 

    if (strstr($scriptbasename, "checkout")) {
	 $this->display_template_output = false;
} else if ((MODULE_STS_DEFAULT_STATUS == 'true') || ($this->display_debug_output == true))

     $this->display_template_output = true;

  else { 

    $this->display_template_output = false;

    return;

  }

 

But that didn't work.

 

TIA

Edited by Analog

Share this post


Link to post
Share on other sites

thank you very much for the answers multimixer,

if and when I do create a stunning STS template I'll make sure to add it as a contribution.

I reall am good at design but really bad at php stuff :(

Share this post


Link to post
Share on other sites

Hello all!

 

I have a quick question regarding UltraPics and STS with the product info content template activated in STS. Right now when I activate the content template UltraPics won't work (the extra images won't show up), if I deactivate the product info content template, UltraPics works again. In this thread(http://forums.oscomm...9entry1243219) bkellum wrote:

 

 

 

Do anyone know what I need to modify to make UltraPics work together with STS (I also use Lightbox, but that is working fine with STS product info content template activated, UltraPics is not working)?

 

 

You need to do a couple of things...

 

 

 

Update your includes/modules/sts_inc/product_info.php file by modifying the SQL querry to include the new image names like so:

// Get product information from products_id parameter

$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, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id, p.products_image_med, p.products_image_lrg, p.products_image_sm_1, p.products_image_xl_1, p.products_image_sm_2, p.products_image_xl_2, p.products_image_sm_3, p.products_image_xl_3, p.products_image_sm_4, p.products_image_xl_4, p.products_image_sm_5, p.products_image_xl_5, p.products_image_sm_6, p.products_image_xl_6 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);

 

Also, add the following line of code to the same file above (includes/modules/sts_inc/product_info.php):

include(DIR_WS_MODULES . 'sts_inc/sts_additional_images.php');

 

Then, create a new PHP page that creates each of the new tags needed for your template. You should name this file sts_additional_images.php and upload it to includes/modules/sts_inc/ :

 

<?php

if (($product_info['products_image_sm_1'] != '') && ($product_info['products_image_xl_1'] == '')) {

$template_pinfo['products_image_sm_1'] =tep_image(DIR_WS_IMAGES . $product_info['products_image_sm_1'], $product_info['products_name'], ULT_THUMB_IMAGE_WIDTH, ULT_THUMB_IMAGE_HEIGHT, 'hspace="1" vspace="1"');



}elseif(($product_info['products_image_sm_1'] != '') && ($product_info['products_image_xl_1'] != '')) {

$template_pinfo['products_image_sm_1'] ='<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image_xl_1']) . '" rel="lightbox[product_images]">' . tep_image(DIR_WS_IMAGES . $product_info['products_image_sm_1'], $product_info['products_name'], ULT_THUMB_IMAGE_WIDTH, ULT_THUMB_IMAGE_HEIGHT, 'hspace="1" vspace="1"') . '<br>' . tep_image_button('image_enlarge.gif', TEXT_CLICK_TO_ENLARGE) . '</a>';



}elseif(($products_info['products_image_sm_1'] == '') && ($product_info['products_image_xl_1'] != '')) {

$template_pinfo['products_image_sm_1'] =tep_image(DIR_WS_IMAGES . $product_info['products_image_xl_1'], $product_info['products_name'], LARGE_IMAGE_WIDTH, LARGE_IMAGE_HEIGHT, 'hspace="1" vspace="1"');



} else {

 	$template_pinfo['products_image_sm_1'] ='';

 } 





if (($product_info['products_image_sm_2'] != '') && ($product_info['products_image_xl_2'] == '')) {

 $template_pinfo['products_image_sm_2'] =tep_image(DIR_WS_IMAGES . $product_info['products_image_sm_2'], $product_info['products_name'], ULT_THUMB_IMAGE_WIDTH, ULT_THUMB_IMAGE_HEIGHT, 'hspace="1" vspace="1"');



} elseif(($product_info['products_image_sm_2'] != '') && ($product_info['products_image_xl_2'] != '')) {

 $template_pinfo['products_image_sm_2'] ='<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image_xl_2']) . '" rel="lightbox[product_images]">' . tep_image(DIR_WS_IMAGES . $product_info['products_image_sm_2'], $product_info['products_name'], ULT_THUMB_IMAGE_WIDTH, ULT_THUMB_IMAGE_HEIGHT, 'hspace="1" vspace="1"') . '<br>' . tep_image_button('image_enlarge.gif', TEXT_CLICK_TO_ENLARGE) . '</a>';

} elseif

 	(($products_info['products_image_sm_2'] == '') && ($product_info['products_image_xl_2'] != '')) {

 	 $template_pinfo['products_image_sm_2'] =tep_image(DIR_WS_IMAGES . $product_info['products_image_xl_2'], $product_info['products_name'], LARGE_IMAGE_WIDTH, LARGE_IMAGE_HEIGHT, 'hspace="1" vspace="1"');

}else{

 $template_pinfo['products_image_sm_2'] ='';

}





if (($product_info['products_image_sm_3'] != '') && ($product_info['products_image_xl_3'] == '')) {

 $template_pinfo['products_image_sm_3'] =tep_image(DIR_WS_IMAGES . $product_info['products_image_sm_3'], $product_info['products_name'], ULT_THUMB_IMAGE_WIDTH, ULT_THUMB_IMAGE_HEIGHT, 'hspace="1" vspace="1"');



} elseif

  	(($product_info['products_image_sm_3'] != '') && ($product_info['products_image_xl_3'] != '')) {

  	 $template_pinfo['products_image_sm_3'] ='<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image_xl_3']) . '" rel="lightbox[product_images]">' . tep_image(DIR_WS_IMAGES . $product_info['products_image_sm_3'], $product_info['products_name'], ULT_THUMB_IMAGE_WIDTH, ULT_THUMB_IMAGE_HEIGHT, 'hspace="1" vspace="1"') . '<br>' . tep_image_button('image_enlarge.gif', TEXT_CLICK_TO_ENLARGE) . '</a>';

} elseif

 	(($products_info['products_image_sm_3'] == '') && ($product_info['products_image_xl_3'] != '')) {

 	 $template_pinfo['products_image_sm_3'] =tep_image(DIR_WS_IMAGES . $product_info['products_image_xl_3'], $product_info['products_name'], LARGE_IMAGE_WIDTH, LARGE_IMAGE_HEIGHT, 'hspace="1" vspace="1"');

}else{

    $template_pinfo['products_image_sm_3'] =''; 

}	 





if (($product_info['products_image_sm_4'] != '') && ($product_info['products_image_xl_4'] == '')) {

 $template_pinfo['products_image_sm_4'] =tep_image(DIR_WS_IMAGES . $product_info['products_image_sm_4'], $product_info['products_name'], ULT_THUMB_IMAGE_WIDTH, ULT_THUMB_IMAGE_HEIGHT, 'hspace="1" vspace="1"'); 

} elseif

  	(($product_info['products_image_sm_4'] != '') && ($product_info['products_image_xl_4'] != '')) {

  	 $template_pinfo['products_image_sm_4'] ='<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image_xl_4']) . '" rel="lightbox[product_images]">' . tep_image(DIR_WS_IMAGES . $product_info['products_image_sm_4'], $product_info['products_name'], ULT_THUMB_IMAGE_WIDTH, ULT_THUMB_IMAGE_HEIGHT, 'hspace="1" vspace="1"') . '<br>' . tep_image_button('image_enlarge.gif', TEXT_CLICK_TO_ENLARGE) . '</a>'; 

} elseif

 	(($products_info['products_image_sm_4'] == '') && ($product_info['products_image_xl_4'] != '')) {

 	 $template_pinfo['products_image_sm_4'] =tep_image(DIR_WS_IMAGES . $product_info['products_image_xl_4'], $product_info['products_name'], LARGE_IMAGE_WIDTH, LARGE_IMAGE_HEIGHT, 'hspace="1" vspace="1"'); 

}else{

 $template_pinfo['products_image_sm_4'] ='';

} 





if (($product_info['products_image_sm_5'] != '') && ($product_info['products_image_xl_5'] == '')) {

 $template_pinfo['products_image_sm_5']= tep_image(DIR_WS_IMAGES . $product_info['products_image_sm_5'], $product_info['products_name'], ULT_THUMB_IMAGE_WIDTH, ULT_THUMB_IMAGE_HEIGHT, 'hspace="1" vspace="1"');

} elseif

  	(($product_info['products_image_sm_5'] != '') && ($product_info['products_image_xl_5'] != '')) {

  	 $template_pinfo['products_image_sm_5'] ='<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image_xl_5']) . '" target="_blank" rel="lightbox[product_images]">' . tep_image(DIR_WS_IMAGES . $product_info['products_image_sm_5'], $product_info['products_name'], ULT_THUMB_IMAGE_WIDTH, ULT_THUMB_IMAGE_HEIGHT, 'hspace="1" vspace="1"') . '<br>' . tep_image_button('image_enlarge.gif', TEXT_CLICK_TO_ENLARGE) . '</a>';

} elseif

 	(($products_info['products_image_sm_5'] == '') && ($product_info['products_image_xl_5'] != '')) {

 	 $template_pinfo['products_image_sm_5'] =tep_image(DIR_WS_IMAGES . $product_info['products_image_xl_5'], $product_info['products_name'], LARGE_IMAGE_WIDTH, LARGE_IMAGE_HEIGHT, 'hspace="1" vspace="1"');

}else{

 $template_pinfo['products_image_sm_5'] ='';

}





if (($product_info['products_image_sm_6'] != '') && ($product_info['products_image_xl_6'] == '')) {

 $template_pinfo['products_image_sm_6'] =tep_image(DIR_WS_IMAGES . $product_info['products_image_sm_6'], $product_info['products_name'], ULT_THUMB_IMAGE_WIDTH, ULT_THUMB_IMAGE_HEIGHT, 'hspace="1" vspace="1"');



} elseif

  	(($product_info['products_image_sm_6'] != '') && ($product_info['products_image_xl_6'] != '')) {

  	 $template_pinfo['products_image_sm_6'] ='<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image_xl_6']) . '" target="_blank" rel="lightbox[product_images]">' . tep_image(DIR_WS_IMAGES . $product_info['products_image_sm_6'], $product_info['products_name'], ULT_THUMB_IMAGE_WIDTH, ULT_THUMB_IMAGE_HEIGHT, 'hspace="1" vspace="1"') . '<br>' . tep_image_button('image_enlarge.gif', TEXT_CLICK_TO_ENLARGE) . '</a>';



} elseif

 	(($products_info['products_image_sm_6'] == '') && ($product_info['products_image_xl_6'] != '')) {

 	 $template_pinfo['products_image_sm_6'] =tep_image(DIR_WS_IMAGES . $product_info['products_image_xl_6'], $product_info['products_name'], LARGE_IMAGE_WIDTH, LARGE_IMAGE_HEIGHT, 'hspace="1" vspace="1"');



}else{

 $template_pinfo['products_image_sm_6'] ='';

}

?>

 

thumbsup.gif Then, in your content template (template_folder/content/product_info.php.html), add your new STS tags where you want them: For example:

$products_image_sm_1$

 

 


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

Hello, elementary question here:

 

If I want my products to appear in tiled boxes each with its own "details" and "buy now" button, is the installation of STS the best way to get there?

 

Thankyou please thankyou.

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

×