Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Adding default text and an image to product decsription.


corkyballs

Recommended Posts

Posted

Hello to all on the forum from an absolute OSC virgin.

 

I want to include a disclaimer and a picture of a colour swatch at the bottom of every product info page.

 

When I ran the idea by a colleague he suggested calling a java script from product_info.php but he has gone on leave for 2 weeks so can't explain until he gets back. I get the general idea but have no idea on the syntax used to call a java script from deep inside product_info.php.

 

Can anyone else help or do you have any other suggestions ?

 

TIA

 

Ian

Posted

Why do you need javascript? A simple <?php echo TEXT_PRODUCT_INFO_DISCLAIMER; ?> should work for the disclaimer (once you define it in includes/languages/english/product_info.php, at least), and for the color swatch, well, it depends on how you're doing it. But putting content that doesn't change by product in the product_info page would be pretty easy.

Always BACK UP your files and your database before making any changes. Before asking questions, check out the Knowledge Base. Check out the contributions to see if your problem's solved there. Search the forums.

 

Useful threads: Store Speed Optimization How to make a horrible shop Basics for design change How to search the forums

 

Useful contributions: Easypopulate Fast, Easy Checkout Header Tag Controller

Posted

I accomplish that by putting all the code, etc.. into one product, and then Copy (duplicate not link) that product over and over and then just make the necessary small changes to the copied product.

 

Also, for popups (color swatches, etc...):

 

You can put javascript & html code in the product description.

 

I put this in my product descriptions to show the designs on clothing.

Example: Example

 

 

<script LANGUAGE="JavaScript" type="text/javascript">
 <!--
function ShowPopup(page,name,options)
{
Window = window.open(page,name,options);
}

// -->
</SCRIPT>

<TABLE BORDER=0 CELLSPACING=6 CELLPADDING=6>
<TR>
<TD align="center"> 
<a href="javascript:;" onClick="ShowPopup('http://www.thepartyfowl.com/..../onGarmentImage.jpg','popup','resizable=yes, width=480,height=640');">
<img src="http://www.thepartyfowl.com/..../onGarmentImage-Thumbnail.jpg" width="80" height="100" border="1"></a>
</TD>
<TD>
<!-- place for a second image -->
</TD>
</TR><TR>
<TD> 
<p align="center"><font face="Verdana" size="1">Design shown on a garment<BR>Click to Enlarge</font>
</TD>

<TD>
<!-- place for a second image  text-->
</TD>
</TR> 
</TABLE>

 

I believe (but I have not done it) that u can put the javascript in application_top.php so it's not duplication in each product description.

 

You can probably find thjis discussed in Tips & Tricks.

Thanks

 

Mike

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...