Guest Posted April 28, 2006 Share Posted April 28, 2006 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 Quote Link to comment Share on other sites More sharing options...
thatsright Posted April 28, 2006 Share Posted April 28, 2006 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? Quote Link to comment Share on other sites More sharing options...
Guest Posted April 29, 2006 Share Posted April 29, 2006 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 Quote Link to comment Share on other sites More sharing options...
thatsright Posted April 29, 2006 Share Posted April 29, 2006 I did that and it isn't working. :-( Quote Link to comment Share on other sites More sharing options...
conte Posted May 3, 2006 Share Posted May 3, 2006 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 Quote Link to comment Share on other sites More sharing options...
knate5000 Posted May 4, 2006 Share Posted May 4, 2006 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!! Quote Link to comment Share on other sites More sharing options...
conte Posted May 4, 2006 Share Posted May 4, 2006 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. Quote Link to comment Share on other sites More sharing options...
CGhoST Posted May 4, 2006 Share Posted May 4, 2006 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? Quote Link to comment Share on other sites More sharing options...
Guest Posted May 5, 2006 Share Posted May 5, 2006 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. Quote Link to comment Share on other sites More sharing options...
knate5000 Posted May 5, 2006 Share Posted May 5, 2006 (edited) 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 May 5, 2006 by knate5000 Quote Link to comment Share on other sites More sharing options...
conte Posted May 5, 2006 Share Posted May 5, 2006 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 Quote Link to comment Share on other sites More sharing options...
knate5000 Posted May 5, 2006 Share Posted May 5, 2006 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? Quote Link to comment Share on other sites More sharing options...
conte Posted May 5, 2006 Share Posted May 5, 2006 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 Quote Link to comment Share on other sites More sharing options...
knate5000 Posted May 5, 2006 Share Posted May 5, 2006 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? Quote Link to comment Share on other sites More sharing options...
Guest Posted May 5, 2006 Share Posted May 5, 2006 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 Quote Link to comment Share on other sites More sharing options...
Guest Posted May 5, 2006 Share Posted May 5, 2006 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 Quote Link to comment Share on other sites More sharing options...
irishtxboy Posted May 6, 2006 Share Posted May 6, 2006 I just installed STS 4.1 and when I go to modules/STS I see the install button and when I click on it nothing happens. I have a fresh install of OS Quote Link to comment Share on other sites More sharing options...
conte Posted May 6, 2006 Share Posted May 6, 2006 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) Quote Link to comment Share on other sites More sharing options...
knate5000 Posted May 6, 2006 Share Posted May 6, 2006 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! Quote Link to comment Share on other sites More sharing options...
conte Posted May 9, 2006 Share Posted May 9, 2006 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! Quote Link to comment Share on other sites More sharing options...
R.E.D Posted May 10, 2006 Share Posted May 10, 2006 Hi Guys!! I have installed Latest STS 4.1 and configured Admin. Index looks great, however on Product_info using same template as before with STS 3 all i see is the code: Any suggestions what might be wrong, why my Product_info template dont work!? Thanks!! Quote Link to comment Share on other sites More sharing options...
nat8100 Posted May 11, 2006 Share Posted May 11, 2006 (edited) 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 May 11, 2006 by nat8100 Quote Link to comment Share on other sites More sharing options...
nat8100 Posted May 11, 2006 Share Posted May 11, 2006 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 Quote Link to comment Share on other sites More sharing options...
nat8100 Posted May 14, 2006 Share Posted May 14, 2006 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. Quote Link to comment Share on other sites More sharing options...
badboo Posted May 17, 2006 Share Posted May 17, 2006 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! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.