Jump to content
Sign in to follow this  
Kingdom3D

1 template for all product info content

Recommended Posts

I've spend 4 hours trying to accomplish what I know should be a simple task according to the pdf manual for this contribution (which I greatly appreciate!). Should be an easy answer . . .

 

I've installed STS v4 and HeaderTagController contrib. All three levels of templates are enabled in the Admin>Modules>STS panel. I'm using a single template for the store and only need 1 template to format the product info content for all the products (small shop right now).

Here's where I've placed my index template files:

Index Template: sts_tempates/store/index.php.html, sts_templates/store/sts_template.html

Product Info Template: sts_templates/store/Content/product_info.php.html

Here are my settings for each of the 3 levels in the sts module in the admin panel:

Default: Default template (v1.0.5)

Use Templates? true

Code for debug output: debug

Files for normal template: sts_user_code.php;headertags.php

Template folder: store

Default template file: sts_template.html

Use template for infoboxes: false

Index: Index template (v1.0.3)

Use template for index page: true

Files for index.php template: sts_user_code.php;headertags.php

Check parent templates: true

Products info: Product info templates and content templates (v1.0.6)

Use template for product info page: true

Enable STS3 compatibility mode: false

Files for normal template: sts_user_code.php;headertags.php

Files for content template: sts_user_code.php;product_info.php.html

The index and default templates work, the product_info content template does not display. Where have I gone wrong? I know I could manually just edit the actual product_info.php in the cart directory, but then I'm stuck with one product_info layout forever.

 

Any Help is very much appreciated.


Tim Cole

 

Kingdom Resource Group

Living out of the Box!

Share this post


Link to post
Share on other sites
I've spend 4 hours trying to accomplish what I know should be a simple task according to the pdf manual for this contribution (which I greatly appreciate!). Should be an easy answer . . .

 

I've installed STS v4 and HeaderTagController contrib. All three levels of templates are enabled in the Admin>Modules>STS panel. I'm using a single template for the store and only need 1 template to format the product info content for all the products (small shop right now).

Here's where I've placed my index template files:

Index Template: sts_tempates/store/index.php.html, sts_templates/store/sts_template.html

Product Info Template: sts_templates/store/Content/product_info.php.html

Here are my settings for each of the 3 levels in the sts module in the admin panel:

Default: Default template (v1.0.5)

Use Templates? true

Code for debug output: debug

Files for normal template: sts_user_code.php;headertags.php

Template folder: store

Default template file: sts_template.html

Use template for infoboxes: false

Index: Index template (v1.0.3)

Use template for index page: true

Files for index.php template: sts_user_code.php;headertags.php

Check parent templates: true

Products info: Product info templates and content templates (v1.0.6)

Use template for product info page: true

Enable STS3 compatibility mode: false

Files for normal template: sts_user_code.php;headertags.php

Files for content template: sts_user_code.php;product_info.php.html

The index and default templates work, the product_info content template does not display. Where have I gone wrong? I know I could manually just edit the actual product_info.php in the cart directory, but then I'm stuck with one product_info layout forever.

 

Any Help is very much appreciated.

Use the "product_info.php_26.html" as an example and then rename it "product_info.php.html". You appear to have everything setup correctly so I would assume the problem lies within the template itself. Do you have the Character Set defined at the top of the template? Do you have the $startform$ and $endform$ tags in the 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
Use the "product_info.php_26.html" as an example and then rename it "product_info.php.html". You appear to have everything setup correctly so I would assume the problem lies within the template itself. Do you have the Character Set defined at the top of the template? Do you have the $startform$ and $endform$ tags in the template?

 

Thanks for the quick reply. I started with the "product_info.php_26.html" example, made my custimizations and saved it as "product_info.php.html". As for the Character Set, I checked the sample index.php.html as well as mine, and neither have it defined in the header.

 

The html for my "product_index.php.html is short so here it is: (I've highlighed the template tag in red)

 

-----------------------------------------------------------------

<?php DEFINE ('STS_CONTENT_END_CHAR', '$'); ?>

 

<table border="0" cellpadding="3" cellspacing="0" width="100%">

<tbody>

<tr>

<td valign="top">

$startform$

<table style="width: 100%; text-align: left;" border="0" cellpadding="6" cellspacing="2">

<tbody>

<tr>

<td style="vertical-align: top;">$productname$<br />

$productmodel$</td>

<td width="200" style="vertical-align: top;"><div align="center"> $regularprice$</div></td>

</tr>

<tr>

<td style="vertical-align: top;">$productdesc$</td>

<td width="200" style="vertical-align: top;"><div align="center">

<p>$imagesmall$</p>

<p>$optionchoices$</p>

<p>$addtocartbutton$</p>

</div></td>

</tr>

<tr>

<td colspan="2" style="vertical-align: top;"> <div align="center">$imagelarge$</div></td>

</tr>

<tr>

<td colspan="2" style="vertical-align: top;"><div align="center">$optionchoices$?????$addtocartbutton$</div></td>

</tr>

</tbody>

</table>

$endform$

</td>

</tr>

</tbody>

</table>

-----------------------------------------------------------------


Tim Cole

 

Kingdom Resource Group

Living out of the Box!

Share this post


Link to post
Share on other sites
Thanks for the quick reply. I started with the "product_info.php_26.html" example, made my custimizations and saved it as "product_info.php.html". As for the Character Set, I checked the sample index.php.html as well as mine, and neither have it defined in the header.
Check to make sure you have catalog\includes\modules\sts_inc\product_info.php and catalog\includes\modules\sts\product_info.php

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
Check to make sure you have catalog\includes\modules\sts_inc\product_info.php and catalog\includes\modules\sts\product_info.php

I've got the catalog/includes/modules/sts_inc/product_info.php.

I don't have the one in the /modules/sts/ folder. The closest one there by name is sts_product_info.php.


Tim Cole

 

Kingdom Resource Group

Living out of the Box!

Share this post


Link to post
Share on other sites
I've got the catalog/includes/modules/sts_inc/product_info.php.

I don't have the one in the /modules/sts/ folder. The closest one there by name is sts_product_info.php.

Yeah, you are good there. Do you have any other contributions installed? Do a file comparison using Beyond Compare or WinMerge to find any missing code.

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
Yeah, you are good there. Do you have any other contributions installed? Do a file comparison using Beyond Compare or WinMerge to find any missing code.

I'll do a compare to see what turns up. Only 2 other contribs installed - HeaderTag and PayPay IPN.


Tim Cole

 

Kingdom Resource Group

Living out of the Box!

Share this post


Link to post
Share on other sites
I'll do a compare to see what turns up. Only 2 other contribs installed - HeaderTag and PayPay IPN.
Check out the new STSv4.3 service pack 1. This has fixed a problem with the product ID tag.

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
Thanks - I'll download the new service pack and give it a try.

 

Hello!

Did the update work out?

I am using STS 4.5, which should contain all the bugfixed (hopefully), but have got exactly the same probs that you described above.

 

Any advice very welcome - tankx a lot!

 

Cheers

jogi

Share this post


Link to post
Share on other sites
Hello!

Did the update work out?

I am using STS 4.5, which should contain all the bugfixed (hopefully), but have got exactly the same probs that you described above.

 

Any advice very welcome - tankx a lot!

 

Cheers

jogi

jogi, version 4.5.2 has all of the latest known bug fixes to date.

Things to check for:

  • product content templates need to be located in "template_folder/content", where template_folder is the name of the folder that is configured in the STS Module in the admin.
  • product content templates should follow the example of the template that is provided in the content folder that came with the STS contribution:
     
    Pay close attention to how you use the $startform$ and $endform$ tags. The code posted above did not use these tags correctly. I suggest placing them in HTML brackets as below:
     
    <p>$endform$</p>


Hope this has helped you out. If not, please ask in the STS Forums (see links in my signature below).


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

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
Sign in to follow this  

×