Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[contribution] STS PLUS v4


Guest

Recommended Posts

Your store is now using templates from the "test" folder, have you created your product info template inside "test/content" folder? Have you enabled the product info module in admin?

 

- Rigadin

Link to comment
Share on other sites

  • Replies 421
  • Created
  • Last Reply

Top Posters In This Topic

Your store is now using templates from the "test" folder, have you created your product info template inside "test/content" folder? Have you enabled the product info module in admin?

 

- Rigadin

 

Yes I did

 

datrunk/includes/sts_templates/test/content

 

Is this correct?

Link to comment
Share on other sites

The folder is ok. You don't have any product with ID26, so product_info.php_26.html will not be visible. Rename it product_info.php.html and be sure that the product info module is installed AND enabled in admin.

 

- Rigadin

Link to comment
Share on other sites

Hi,

 

i am quite new to oscommerce, but i found that contribution very useful already. it?s agreat help!

 

i am having one problem though:

on the first page of my shop i would like to display just the categories and the category pictures in the contant area and some txt, logo, flash bar... around it.

 

strangely i can display a page with title "Categories" and the corresponding pictures when i use a template for category 0 (index.php_0.html) and than go directly to www.myshop.com/catalog/index.php?=0.

but then when you click on a category it becomes a subcategory of category 0 and the next page is e.g. www.myshop.com/catalog/index.php?=0_21

 

so a summary :

- display category and category pictures on first page in $content

 

can please anybody help? Maybe i?m posting this in the wrong forum because it?s about changing something in th $content area?

 

thanks so much,

conte

Link to comment
Share on other sites

I am using STS Plus 4.0.7

 

Issue:

 

Where ever I put the variables:

 

$startform

$imagesmall

$productname

$productdesc

$regularprice

$addtocartbutton

$endform

 

in my .html file I get the literal names not the expected image/product name/ etc....

 

I'm new to this whole osCommerce and STS Plus stuff.

 

I'm sure this has been asked before so I'm sorry for a repeated question. Any help would be MUCH appreciated!!

Link to comment
Share on other sites

Where ever I put the variables:

 

$startform

$imagesmall

$productname

$productdesc

$regularprice

$addtocartbutton

$endform

 

in my .html file I get the literal names not the expected image/product name/ etc....

 

as much as i understand your question, you are trying to build a content template for product pages.

then try writing them likd $startform$ should work than - an example is in the product_info.php_26.html file.

Link to comment
Share on other sites

hi rigadin2

 

Unusual question but maybe you or someone else here could possibly help me please.

 

Is it possible to link a "$" command to an image so that when a user clicks on the image it loads the appropriate "$" command?

Link to comment
Share on other sites

To put a link behind an image, first build the variable in sts_user_code.php. Example:

 

$sts->template['urlmylogo'] = tep_href_link(FILENAME_MYFILENAME, '', 'SSL');

 

The corresponding placeholder to use on your template is $urlmylogo and it links to the "myfilename" page.

 

On your template, place the image and create a link using $urlmylogo as destination.

Link to comment
Share on other sites

as much as i understand your question, you are trying to build a content template for product pages.

then try writing them likd $startform$ should work than - an example is in the product_info.php_26.html file.

 

Yes, I am trying to build a product page. I tried adding the $ after, but it didn't work. If I use $content it brings up the product image, name, price and buy now. But I want to control where each element goes.

Edited by knate5000
Link to comment
Share on other sites

Yes, I am trying to build a product page. I tried adding the $ after, but it didn't work. If I use $content it brings up the product image, name, price and buy now. But I want to control where each element goes.

 

what you have to do is build a product_info.php.html template - e.g. copy the one i mentioned in the last post product_info.php_26.html which is build for product with ID 26 - and save it as product_info.php.html in the content folder (catalog/includes/sts_templates/test/content - for a fresh installation).

in that product_info.php.html file you can use all the placeholders listed in chapter 4.7 of the documentation that came with the contribution.

this will give you one template for all your product pages - if you want a template for a specific product save another copy as product_info.php_PRODUCT ID.html in the content folder.

the template will replace the $content area of your index.php.html or sts_template.php.html file

 

that?s it - see also chapter 3.9.2 in the documentation

 

this will only work for product information as far as i know

Link to comment
Share on other sites

what you have to do is build a product_info.php.html template - e.g. copy the one i mentioned in the last post product_info.php_26.html which is build for product with ID 26 - and save it as product_info.php.html in the content folder (catalog/includes/sts_templates/test/content - for a fresh installation).

in that product_info.php.html file you can use all the placeholders listed in chapter 4.7 of the documentation that came with the contribution.

this will give you one template for all your product pages - if you want a template for a specific product save another copy as product_info.php_PRODUCT ID.html in the content folder.

the template will replace the $content area of your index.php.html or sts_template.php.html file

 

that?s it - see also chapter 3.9.2 in the documentation

 

this will only work for product information as far as i know

 

I think it's starting to click in my head now. What about if I want a template for a specific category?

Link to comment
Share on other sites

I think it's starting to click in my head now. What about if I want a template for a specific category?

 

make a template for the specific category or subcatagory called index.php_CATEGORY ID_SUBCATEGORY ID.html

 

see chapter 3.7 of the documentation there is an example for category 11-22-33 - so this is subcategory 33, from subcategory 22 from category 11

this will only replace the standard template for this exact category - the $content area comes from osc - need to read how to change texts or layouts there.

 

and a quick advise: read the documentation ;)

once you got the grip of how sts plus works, it?s quite simple

Link to comment
Share on other sites

make a template for the specific category or subcatagory called index.php_CATEGORY ID_SUBCATEGORY ID.html

 

see chapter 3.7 of the documentation there is an example for category 11-22-33 - so this is subcategory 33, from subcategory 22 from category 11

this will only replace the standard template for this exact category - the $content area comes from osc - need to read how to change texts or layouts there.

 

and a quick advise: read the documentation ;)

once you got the grip of how sts plus works, it?s quite simple

 

I've tried index.php_CATID and product_info.php_PROD# but to no avail!! It's driving me CrAzY!!!! :wacko:

 

This is the way I want the web page to look (Manually coded for visual purpose only)

http://www.directhealthnutrition.com/demo/dh_original.html

 

This is what I am getting:

http://directhealthnutrition.com/cart/index.php?cPath=23

 

how do I edit the $content?

Link to comment
Share on other sites

hello,

 

how can i display prices from the database table products

i.e. products_ship_price_one

 

in STS 3 i use this code, but in 4.1 i cant display the data in product_info

 

<?php echo $currencies->format($products_ship_price_one /116*100); ?>

 

 

how must i modify the code to show the results ?

 

thanks in advance

 

bg

Michael

Link to comment
Share on other sites

problem gone.

 

i put the needed tables to the product query in /includes/modules/sts_inc/product_info.php

 

$products_ship_price_one = $currencies->display_price($product_info['products_ship_price_one'], tep_get_tax_rate($product_info['products_tax_class_id']));

$products_ship_price_two = $currencies->display_price($product_info['products_ship_price_two'], tep_get_tax_rate($product_info['products_tax_class_id']));

$products_ship_price_three = $currencies->display_price($product_info['products_ship_price_three'], tep_get_tax_rate($product_info['products_tax_class_id']));

$products_ship_price_four = $currencies->display_price($product_info['products_ship_price_four'], tep_get_tax_rate($product_info['products_tax_class_id']));

 

with this text i have made the placholders.

 

 

bg

Michael

Link to comment
Share on other sites

I've tried index.php_CATID and product_info.php_PROD# but to no avail!! It's driving me CrAzY!!!! :wacko:

 

This is the way I want the web page to look (Manually coded for visual purpose only)

http://www.directhealthnutrition.com/demo/dh_original.html

 

This is what I am getting:

http://directhealthnutrition.com/cart/index.php?cPath=23

 

how do I edit the $content?

 

the links you provided lead to a category page. you can not change the $content area of this page with STS plus - you need to do the changes in the osc php files.

how you do that exactly, i don?t know in the moment - i will do changes to the shop i work on during the next week - so when i find out, i let you know in this forum - sorry

$content templates only work for product info pages (when you click on one of the products on the category page)

Link to comment
Share on other sites

the links you provided lead to a category page. you can not change the $content area of this page with STS plus - you need to do the changes in the osc php files.

how you do that exactly, i don?t know in the moment - i will do changes to the shop i work on during the next week - so when i find out, i let you know in this forum - sorry

$content templates only work for product info pages (when you click on one of the products on the category page)

 

 

Thanks a lot Conte! I appreciate the help!

Link to comment
Share on other sites

here is a tricky question for all the php gurus out there:

 

i posted earlier on the subject of integrating UltraPics contribution into a product_info.php.html template.

here is how far i came:

 

i copied what MaxiDVD changes for UltraPics in the original product_info.php file to the one that comes with sts 4.

replacing 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, 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 = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");

 

with the right query for UltraPics 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_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, 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 = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");

 

here all the additional images are also loaded into the $product_info_array.

 

now i declare a new variable like this:

 

if (ULTIMATE_ADDITIONAL_IMAGES == 'enable') {

$template_pinfo['ultrapics']=include(DIR_WS_MODULES . 'additional_images.php') ;

}

 

where the 'additional_images.php' file is a file from the UltraPics contribution that parses the pictures and gives it back in an HTML table layout.

 

finally i place the so created $ultrapics$ placeholder in a table in my product_info.php.html file

 

This works just fine, with one major error: the 'additional_images.php' file gets included at the top of the template file and not in the table wher it should be. Where it should be, i just get "1" - probably stating that the include was a success.

 

i think this would be a very interesting question to be answered, because so one could use the UltraPics contibution in ones content templates from STS 4.

 

I was searching the forum for hours, before i tried to do this, but found no answer to any question about to implement these two contributions and use ultrapics in a content template.

 

i will this also post in the UltraPics contribution support hoping that someone might come up with a solution.

 

thanks a lot for any answer how to implement this!

Link to comment
Share on other sites

Hi Guys!!

 

I have installed Latest STS 4.1 and configured Admin.

STS_Admin.png

 

Index looks great, however on Product_info using same template as before with STS 3 all i see is the code:

Product_info.png

 

Any suggestions what might be wrong, why my Product_info template dont work!?

 

Thanks!!

Link to comment
Share on other sites

Hi, I'm trying to create a template for one of my category pages.

 

I have read the documentation on this but still a little confused.

 

I have named the file index.php_21.html and saved it to includes/sts_templates/test

 

Do I then need to set the index template to include this file from the admin?

 

I tried this but get errors on tha catalog:

 

Warning: main(includes/modules/sts_inc/index.php_21.html): failed to open stream: No such file or directory in /homepages/4/d71/htdocs/catalog/includes/modules/sts_inc/sts_display_output.php on line 21

 

Warning: main(): Failed opening 'includes/modules/sts_inc/index.php_21.html' for inclusion (include_path='.:/usr/local/lib/php') in /homepages/4/d71/htdocs/catalog/includes/modules/sts_inc/sts_display_output.php on line 21

 

so I guess this must be wrong thing to do as it's looking for my file in sts_inc

 

so how do I do it? I am using headertags if that's of relevance.

 

Thanks,

Natalie

Edited by nat8100
Link to comment
Share on other sites

Also, simple question I think - how do I use the $sid varible. I want to use it for graphic links. What should the link be? I tried account.php$sid

 

Ok solved this one now... still confused how to create category templates though so appreciate anyone's input. Thanks.

Link to comment
Share on other sites

Hi I just installed STS4.0.3 working fine so far, now 2 questions:

 

1. Where do I save the files for just the index layout and the products layout after activating the modules for the different layouts? I can just read about .php files for the index and products and nothing about where to put the html files...

 

2. I will eventually install Header Tags Controller but I saw that other people had a hard time to do so, but mainly because they used the STSPlus version and I have STS4. Sorry for this stupid question, but is it easier to add HTC to STS4 or is it the same pain as for STSPlus? If there is a procedure for HTC + STS4 and/or could you point me there?

 

Thanks so much in advance!

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