Jump to content
rigadin2

[Contribution] STS v4

Recommended Posts

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

Share this post


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

 

You are not creating your links correctly.

See the following post:

http://forums.oscommerce.com/index.php?sho...p;#entry1162574

 

Also:

http://forums.oscommerce.com/index.php?sho...p;#entry1400113


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

 

 

Larry,

 

Use the "full" template folder for starters since we know it has everything in place to do what you are wanting to accomplish.

  1. Move your existing category index templates over to the "full" template folder.
  2. Edit the existing product_info template that is already inside the full/content/ folder. This will rule out any missing code that is needed in order for the product_info template to fucntion properly.
  3. Enable the default module in the admin (leave all default settings except insert "full" as the template folder and your option whether to use the infobox template feature)
  4. Enable both the index and product info modules in the admin (leave all default settings except of course for the enable-use settings)

Now, test your site and see if you are still getting the index specific content in your product info content template.

 

Note: Depending upon your custom index templates, it may be better for you to simple create a default product_info.php.html template and upload it to the same location as your index templates (full/product_info.php.html)

 

Hope this helped you out,


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
Larry,

 

Use the "full" template folder for starters since we know it has everything in place to do what you are wanting to accomplish.

  1. Move your existing category index templates over to the "full" template folder.
  2. Edit the existing product_info template that is already inside the full/content/ folder. This will rule out any missing code that is needed in order for the product_info template to fucntion properly.
  3. Enable the default module in the admin (leave all default settings except insert "full" as the template folder and your option whether to use the infobox template feature)
  4. Enable both the index and product info modules in the admin (leave all default settings except of course for the enable-use settings)

Now, test your site and see if you are still getting the index specific content in your product info content template.

 

Note: Depending upon your custom index templates, it may be better for you to simple create a default product_info.php.html template and upload it to the same location as your index templates (full/product_info.php.html)

 

Hope this helped you out,

 

Thank you for your reply. I am still having the same issue though. I wsent back and checked my product_info.php content page for accuiracy against the template and all looks to be in order. The problem with using the full/product_info.php.html is I cannot use my <?PHP> tags. I have included a copy of my coding below if you see any faults. If not, do you provide off-forum services to assist with correcting?

 

<?php DEFINE ('STS_CONTENT_END_CHAR', '$'); ?>
<head>
<style type="text/css">
.style1 {
border-width: 0;
}
.style3 {
font-size: small;
}
.style5 {
font-size: xx-small;
text-align: center;
}
.style6 {
text-align: center;
}
.style7 {
background-color: #DEC380;
}
.style9 {
border-style: solid;
border-width: 0;
}
.style10 {
font-size: x-small;
}
</style>
</head>
<table cellpadding="3" cellspacing="0" width="100%" class="style1">
 <tbody>
<tr>
  <td valign="top">
  $startform$</td>
</tr>
<tr>
  <td valign="top">
  <table style="width: 100%; text-align: left;"
cellpadding="2" cellspacing="2" class="style1">
	<tbody>
	  <tr>
		<td style="vertical-align: top; width: 110px;" class="style5">$product_popup$</td>
		<td style="vertical-align: top;">
		<table style="width: 100%">
			<tr>
				<td>
				<table style="width: 100%">
					<tr>
						<td style="width: 30px"> </td>
						<td>
						<table style="width: 100%" cellspacing="0" cellpadding="0">
							<tr>
								<td style="width: 400px" colspan="2">
								<span class="style3"><strong>$productname$</strong></span><br>
								<span class="style10">$productmodel$</span></td>
							</tr>
							<tr>
								<td style="width: 400px">
								<span class="style3">Price: $regularpricestrike$ 
								$specialprice$<br>
								</span><span class="style10">$optionheader$</span><span class="style3"><br>
								$optionchoices$</span></td>
								<td style="width: 400px">
								<a href="jewelry_sizing.php" target="_blank">
								<img src="includes/languages/english/images/buttons/cooltext430689890.png" onmouseover="this.src='includes/languages/english/images/buttons/cooltext430689890MouseOver.png';" onmouseout="this.src='includes/languages/english/images/buttons/cooltext430689890.png';" alt="Jewelry Sizing Guide, Bracelet Sizing, Ring Sizing, Necklace Sizing" class="style9" /></a></td>
							</tr>
							<tr>
								<td style="width: 400px">
								 </td>
								<td style="width: 400px">
								 </td>
							</tr>
							<tr>
								<td colspan="2">
								<table style="width: 100%" class="style7">
									<tr>
										<td class="style6">$addtocartbutton$</td>
										<td class="style6"><?php echo tep_image_submit('button_wishlist.gif', 'Add to Wishlist', 'name="wishlist" value="wishlist"'); ?></td>
										<td class="style6">
								<a href="$reviewsurl$">$reviewsbutton$</a></td>
									</tr>
								</table>
								</td>
							</tr>
						</table>
						</td>
						<td> </td>
					</tr>
				</table>
				</td>
			</tr>
		</table>
		</td>
	  </tr>
	</tbody>
  </table>
  <br>
	<span class="style3">$productdesc$</span><br>
				<span style="font-size:11.0pt;line-height:115%;
font-family:"Calibri","sans-serif";mso-ascii-theme-font:minor-latin;mso-fareast-font-family:
Calibri;mso-fareast-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";mso-bidi-theme-font:minor-bidi;
mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA">$mopics_output$</span><p>
	$endform$</p>
	<p>
				<span style="font-size:11.0pt;line-height:115%;
font-family:"Calibri","sans-serif";mso-ascii-theme-font:minor-latin;mso-fareast-font-family:
Calibri;mso-fareast-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";mso-bidi-theme-font:minor-bidi;
mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA">
				<span style="font-size:11.0pt;line-height:115%;
font-family:"Calibri","sans-serif";mso-ascii-theme-font:minor-latin;mso-fareast-font-family:
Calibri;mso-fareast-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";mso-bidi-theme-font:minor-bidi;
mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA">$alsopurchased$</span></span><br>
  </p>
  </p>
  </td>
</tr>
 </tbody>
</table>

 

 

Thank you Bill for your assistance. It is greatly appreciates.

 

www.doubledeedeals.com

Larry

Share this post


Link to post
Share on other sites
Why not?

 

 

I received an error. I must have done something wrong too when testing the STS_Templates/Full/Product_Info.php.html as well. Below is the screen shot of what I got.

 

sshot.jpg

Share this post


Link to post
Share on other sites
I received an error. I must have done something wrong too when testing the STS_Templates/Full/Product_Info.php.html as well. Below is the screen shot of what I got.

 

sshot.jpg

 

GOT IT! I figured it out Bill. In case you have anyone else that runs into this in the forums, I kept my Product_Info.php.htlm in place in the Content folder and created another Product_Info.php.html file in the Full file with just the placeholder $Content to bring in only my HTML content page. The additional HTML text from my Index.php.html (Category Pages) no longer appears.

 

I have another unrelated quotestion. Is there anyway to integrate Lightbox into STS when using More-Pics? I see you have an add-on for the Additional Pictures con tribution, but can't fiond anything to integrate with More-Pics.

 

Thanks again Bill for all of your assistance.

Share this post


Link to post
Share on other sites
GOT IT! I figured it out Bill. In case you have anyone else that runs into this in the forums, I kept my Product_Info.php.htlm in place in the Content folder and created another Product_Info.php.html file in the Full file with just the placeholder $Content to bring in only my HTML content page. The additional HTML text from my Index.php.html (Category Pages) no longer appears.

 

I have another unrelated quotestion. Is there anyway to integrate Lightbox into STS when using More-Pics? I see you have an add-on for the Additional Pictures con tribution, but can't fiond anything to integrate with More-Pics.

 

Thanks again Bill for all of your assistance.

 

 

Lightbox is a add-on of it's own right and can easily be integrated no matter what image contribution you use. The key is replacing the call for the "click to enlarge" JavaScript with the script from whichever lightbox code you use. There is some examples in the STSv4 Power Pack site (site for all STS add-ons).


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

Hi,

 

I installed STSv4.5.8 and found this contribution (Better Product listings & Display. Ultra pics, J query, Image Controller, Product listing as list or Grid + More!

) and here is the link to this contribution. http://addons.oscommerce.com/info/6855/v,22 so I installed it. now after I installed this contribution, when I click on the images, it does not display. Now when I disable the template (set it to false from the admin site), everything works perfectly.

 

Here is the link http://cottonil.limewebs.com/product_info....;products_id=28

 

I really need as much help as possible. I really like using the STS and hoping to get some help on how to integrate both the STS and contribution above together..

 

Thank you in advance

Share this post


Link to post
Share on other sites

Has anyone worked with "Search Box Anywhere" contribution? I'm trying to get a search bar in my header working, and it seems to only work if I don't use a custom image.

Post: http://forums.oscommerce.com/index.php?sho...t&p=1430792

Thread: http://forums.oscommerce.com/index.php?sho...56945&st=60

Contribution Page: http://www.oscommerce.com/community/contributions,3295

 

Granted the code from that contribution is really old now, and it could be the issue. I was just wondering if anyone knows how to work around it.

Share this post


Link to post
Share on other sites
Has anyone worked with "Search Box Anywhere" contribution? I'm trying to get a search bar in my header working, and it seems to only work if I don't use a custom image.

Post: http://forums.oscommerce.com/index.php?sho...t&p=1430792

Thread: http://forums.oscommerce.com/index.php?sho...56945&st=60

Contribution Page: http://www.oscommerce.com/community/contributions,3295

 

Granted the code from that contribution is really old now, and it could be the issue. I was just wondering if anyone knows how to work around it.

 

I've used that code numerous times with no issues.


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
Has anyone worked with "Search Box Anywhere" contribution? I'm trying to get a search bar in my header working, and it seems to only work if I don't use a custom image.

Post: http://forums.oscommerce.com/index.php?sho...t&p=1430792

Thread: http://forums.oscommerce.com/index.php?sho...56945&st=60

Contribution Page: http://www.oscommerce.com/community/contributions,3295

 

Granted the code from that contribution is really old now, and it could be the issue. I was just wondering if anyone knows how to work around it.

Just use the box that you want and add it directly to your template page.


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
I've used that code numerous times with no issues.

 

Any idea what would cause a "Fatal error: Call to a member function image_button() on a non-object in /catalog/includes/functions/html_output.php on line 129"?

Techinically speaking the output actually had the systems location of the file e.g. /srv/http/test/ ... if that helps any.

 

It only happens if I use the search code with a custom image. The version with a normal submit button works perfectly. Note that I got the issue regardless of how the I used the code, in my custom function, or just copy/paste. Of course for more info my post linked above has the full details

 

The only moidification to OSCommerce 2.2.rc2a is STS 4.5.8, and I copied the files directly into a blank store. I'm hoping someone else can reproduce the issue since I really have no idea what's causing it.

Share this post


Link to post
Share on other sites
Just use the box that you want and add it directly to your template page.

 

Sorry, my above post bugged out and I can't seem to edit it.

 

I'm currently customizing a clean install of OSC 2.2rc2a, with the only module being STS 4.5.8. When adding the Search Bar code to the STS Template there are some issues. Options 1,3,4 and 6 all function perfectly, however 2 and 5 give me the following error: "Fatal error: Call to a member function image_button() on a non-object in /srv/http/osc2/includes/functions/html_output.php on line 129"

 

Any option that uses the default search image button causes that error, and I do not know why. (I haven not tried this on a clean OSC2.2rc2a to see what happens.)

 

As mentioned above, I am wondering if someone will please try a clean store with just STS 4.5.8 installed to let me know if it works for them ok, or if its just me.

 

Sorry for the double post, as I mentioned for some reason it all bugged out when I tried to simply edit my above post.

Share this post


Link to post
Share on other sites
Sorry, my above post bugged out and I can't seem to edit it.

 

I'm currently customizing a clean install of OSC 2.2rc2a, with the only module being STS 4.5.8. When adding the Search Bar code to the STS Template there are some issues. Options 1,3,4 and 6 all function perfectly, however 2 and 5 give me the following error: "Fatal error: Call to a member function image_button() on a non-object in /srv/http/osc2/includes/functions/html_output.php on line 129"

 

Any option that uses the default search image button causes that error, and I do not know why. (I haven not tried this on a clean OSC2.2rc2a to see what happens.)

 

As mentioned above, I am wondering if someone will please try a clean store with just STS 4.5.8 installed to let me know if it works for them ok, or if its just me.

 

Sorry for the double post, as I mentioned for some reason it all bugged out when I tried to simply edit my above post.

 

This does not have anything to do with STS.

It's most likely that you do not have your image in the correct directory and therefore the error message.


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
This does not have anything to do with STS.

It's most likely that you do not have your image in the correct directory and therefore the error message.

 

I wanted to make sure I wasn't just doing something stupid, so I went ahead and tried the various search boxes on a clean OSC2.2rc2a install. Everying was functioning properly.

 

I then tried it on a OSC2.2rc2a install, with STS 4.5.8 which was installed by copying the RC2 files. Not working. Same error as I got on my own template. "Fatal error: Call to a member function image_button() on a non-object in /srv/http/sts_man/includes/functions/html_output.php on line 129".

 

At this point I decided to make absolutely sure the path/name was correct. I literally copied the name of the image, and its complete directory structure. I tried every structure that made any logical sense. None of them worked at all. I decided to check the file permissions, set them all to make sure the http server could read/write/execute them just to be safe. Then tried checking the name/locations again. Still nothing.

 

I further went on to manually install STS 4.5.8, just to make sure this wasn't some crazy oncflict with RC2 and RC2a. Had the exact same error. Afterwards, decided to undo the changes made to "/includes/functions/html_output.php" ... and the button displayed just fine. I put the changes back in again, and I got the error again. I tried it multiple times just to make sure. Further meddling conluded the following section of code to be the issue.

 

It the code where you find:

$image_submit = '<input type="image" src=

 

Add Before:

// START STS v4.4:
global $sts;
$src = $sts->image_button($image,$language); // this is line 129 in my html_output.php
if ($src!='')
 $image_submit = '<input type="image" src="' . tep_output_string($src) . '" border="0" alt="' . tep_output_string($alt) . '"';
else 
// END STS v4.4

 

Commenting out that chunk of code made the submit buttons work properly. Of course, it is not inheriting the button from the template directory anymore, but at least it is not causing a fatal error.

 

My knowledge of PHP is limited, as is my knowledge of OSC's innards, so I have no idea why that line is causing me issues, and why it is causing only me to have issues, and apparently nobody else. Any help figuring out why this is happening is certainly appreciated.

Share this post


Link to post
Share on other sites

 

STS is still not to blame here.

 

Check your positioning of the new code. See the following link regarding a similar issue in earlier versions of osCommerce:

http://forums.oscommerce.com/index.php?s=&...t&p=1058282

 

Hope this helped you out,


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
STS is still not to blame here.

 

Check your positioning of the new code. See the following link regarding a similar issue in earlier versions of osCommerce:

http://forums.oscommerce.com/index.php?s=&...t&p=1058282

 

Hope this helped you out,

 

Thanks for the links. I checked just to see if those were causing the problems, but it doesn't appear to be the case.

 

Bottom of the application_top.php

  // START STS 4.5.8
 require (DIR_WS_CLASSES.'sts.php');
 $sts= new sts();
 $sts->start_capture();
 // END STS 4.5.8

// initialize the message stack for output messages
 require(DIR_WS_CLASSES . 'message_stack.php');
 $messageStack = new messageStack;

// set which precautions should be checked
 define('WARN_INSTALL_EXISTENCE', 'true');
 define('WARN_CONFIG_WRITEABLE', 'true');
 define('WARN_SESSION_DIRECTORY_NOT_WRITEABLE', 'true');
 define('WARN_SESSION_AUTO_START', 'true');
 define('WARN_DOWNLOAD_DIRECTORY_NOT_READABLE', 'true');

 

section of sts_default.php

  function find_template ($scriptbasename){
 // Return an html file to use as template
// Check if there is a template for this script

// 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"))
  return ''; // We don't use template for these scripts

$check_file = STS_TEMPLATE_DIR .$scriptbasename . ".html";
if (file_exists($check_file)) return $check_file;

// No template for this script, returns the default template
return STS_DEFAULT_TEMPLATE;
 } // End function

 

Both seem to have the fixes from earlier versions already installed. I'm curious, could it have something to do my version of php (5.2.10)?

Share this post


Link to post
Share on other sites

I'm changing the template in oscommerce. I have STS version 4 installed. I copied the old template files in a new folder. Then changed them.

But when I click on the main page of the site I do not see the product images. I don't remember if I had this problem with the previous template.

The previous is working fine.

 

What can I do to fix this?

 

This is the site: www.detstvomoe.com The main page doesn't show images. If you click on Catalog - everything is fine.

 

I think that Oscommerse doesn't have something (cookies) with the information and takes the images from wrong directory.

 

I don't know where to read about it. I searched the forum and google but without results.

Share this post


Link to post
Share on other sites
Lightbox is a add-on of it's own right and can easily be integrated no matter what image contribution you use. The key is replacing the call for the "click to enlarge" JavaScript with the script from whichever lightbox code you use. There is some examples in the STSv4 Power Pack site (site for all STS add-ons).

 

Bill, I am still having difficulty figuring out what PHP files and code changes are required for Lightbox to work with STS. I turned off STS for my Product_Info page to confirm that Lightbox is working and it is. Any further direction you can give me would be appreciated.

 

Thank you

Larry

www.doubledeedeals.com

Share this post


Link to post
Share on other sites
I'm changing the template in oscommerce. I have STS version 4 installed. I copied the old template files in a new folder. Then changed them.

But when I click on the main page of the site I do not see the product images. I don't remember if I had this problem with the previous template.

The previous is working fine.

 

What can I do to fix this?

 

This is the site: www.detstvomoe.com The main page doesn't show images. If you click on Catalog - everything is fine.

 

I think that Oscommerse doesn't have something (cookies) with the information and takes the images from wrong directory.

 

I don't know where to read about it. I searched the forum and google but without results.

 

I just went to your site and see you now have images. I guess you got it working. :rolleyes:


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
Bill, I am still having difficulty figuring out what PHP files and code changes are required for Lightbox to work with STS. I turned off STS for my Product_Info page to confirm that Lightbox is working and it is. Any further direction you can give me would be appreciated.

 

Thank you

Larry

www.doubledeedeals.com

 

Larry,

  1. Install Lightbox just as you would any non-STS shop per the instructions provided
  2. Add any links (.js .css) directly within your template pages
  3. Test your shop without using the product_info content template feature in STS. The outcome of this test will ensure you have Lightbox installed correctly and that it is being pulled into your templates.
  4. If you are using product_info content templates, be sure to replace the click to enlarge code within sts/sts_inc/product_info.php file with the new Lightbox code.

Try the above and let me know how it goes. I have serveral sites using STS & Lightbox with no issues at all so hang in there. <_<


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 for the links. I checked just to see if those were causing the problems, but it doesn't appear to be the case.

 

Both seem to have the fixes from earlier versions already installed. I'm curious, could it have something to do my version of php (5.2.10)?

 

No (to the PHP 5.2.10-this is good),

 

To clarify this a little more...

 

To add the search function to your template, you could simply add the actual form:

 

<form name="advanced_search" action="advanced_search_result.php" method="get">

<td bgcolor="anycolor">

<table width="100%" cellpadding="0" cellspacing="0"><tr><td class="navigation">Search ;</td>

<td align="center"><input type="hidden" name="search_in_description" value="1"><input type="hidden" name="inc_subcat" value="1" 1><input type="text" name="keywords" size="10" maxlength="30" class="searchForm" style="width: 95px"></td><td align="center"> <input type="image" src="$templatedir/images/gobutton.gif" border="0" alt="Search" title=" Search "></td></tr></table>

</td></form>

 

The above code can be used anywhere in your template and can be styled anyway you desire. The items in bold need to be changed to your liking.


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
1. Special Pricing

I have two tags to use for pricing in my product template. Regular Price: $regularprice$ and Special Price: $specialprice$

 

The problem is, I only have a select few products on special at any given time. So if I set it up like this:

 

Regular Price: $regularprice$

Special Price: $specialprice$

 

Then most items end up looking like this:

 

Regular Price: $54.99

Special Price:

 

That just looks like a missing price. What's the solution to this?

 

I noticed that without STS, when you put a product on special it strikes out the "Regular" price and adds the "Special" price. How do I get that functionality with STS?

 

Hello Boom, did you finally find a solutio for this issue ? I have the same problem.

 

thanks for your answer

cheers.

Olivier


STS 4.5.8

Share this post


Link to post
Share on other sites
Hello Boom, did you finally find a solutio for this issue ? I have the same problem.

 

For sure ou have this code in your sts_inc/product_info.php

	$template_pinfo['regularprice'] = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id']));
if ($new_price = tep_get_products_special_price($product_info['products_id'])) {
  $template_pinfo['regularpricestrike'] = "<s>" . $template_pinfo['regularprice'] . "</s>";
  $template_pinfo['specialprice'] = $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id']));
} else {
  $template_pinfo['specialprice'] = '';
  $template_pinfo['regularpricestrike'] = $template_pinfo['regularprice'];
}

 

Use the tags $regularpricestrike$ and $specialprice$ in your template.

 

Then, instead of writing the text "regular rice" and "special price" directly into the template (where it appears always), make a text definition like TEXT_SPECIAL_PRICE, define this text in the language file and add it into the code like

	  $template_pinfo['specialprice'] = . TEXT_SPECIAL_PRICE .  $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id']));

 

Same for regular price

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

×