Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Post html instead of detailed images

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 05-12-2004, 07:49 AM
 
KiDD KiDD is offline
 

Member
  
Join Date: Jan 2003
Location: Sturgis, SD
Posts: 23
 

Default Post html instead of detailed images

I want to post html in where the detailed images appear on the product page, instead of the images. Any idea of where to start the mod?

KiDD
http://store.sturgisrally.net (Live)
X-Cart Gold Ver. 3.3.4
Reply With Quote
  #2  
Old 05-12-2004, 08:09 AM
 
Emerson Emerson is offline
 

X-Man
  
Join Date: Mar 2004
Location: Atlanta, GA
Posts: 2,209
 

Default

You'll need to edit /modules/Detailed_Product_Images/product_images.tpl

The best bet here, in my opinion, would be to use extra fields to accomplish this.
__________________
Emerson
Total Server Solutions LLC- Quality X-Cart Hosting
Recommended X-Cart Hosting Provider - US and UK servers
Does your host backup your site? We do EVERY HOUR!!!
Shared Hosting | Managed Cloud | Dedicated Servers
Reply With Quote
  #3  
Old 05-12-2004, 09:08 AM
 
KiDD KiDD is offline
 

Member
  
Join Date: Jan 2003
Location: Sturgis, SD
Posts: 23
 

Default

Ok i modified the product_images.tpl to read

{* $Id: product_images.tpl,v 1.6 2002/05/20 06:55:24 lucky Exp $ *}
{if $images ne ""}
{capture name=dialog}
{section name=image loop=$images}
{if $images[image].avail eq "Y"}
<src="../details.php">




{/if}
{/section}
{/capture}
{if $smarty.capture.dialog ne ""}
{include file="/home/store/www/detailed_pages/16290.htm" title=Variations
content=$smarty.capture.dialog extra="width=100%"}
{/if}
{/if}

and created a file called details.php which reads

<?
# $Id: details.php, 2004/05/12
#
# Show details page by productid
#

require "./smarty.php";
require "./config.php";

$result = db_query("select image,image_type from $sql_tbl[thumbnails] where productid='$productid'");
if (db_num_rows($result))
list($image, $image_type) = db_fetch_row($result);

db_free_result($result);

if (!empty($image)) {
header("Content-type: $image_type");
echo $image;
} else {
header("Content-type: text/html");
readfile(/home/store/www/detailed_pages/16290.htm);
}
?>

made the folder detailed_pages and uploaded 16290.htm

this is working fine. How would i set the
readfile(/home/store/www/detailed_pages/16290.htm);

to call the page by {productid}.htm?

Then I could just create a product page for each item and upload it to that directory and it could call the appropriate page for the item.

Thanks in advance,

KiDD
http://store.sturgisrally.net (Live)
X-Cart Gold Ver. 3.3.4
Reply With Quote
  #4  
Old 05-12-2004, 09:32 AM
 
Emerson Emerson is offline
 

X-Man
  
Join Date: Mar 2004
Location: Atlanta, GA
Posts: 2,209
 

Default

Try {$product.productid}
__________________
Emerson
Total Server Solutions LLC- Quality X-Cart Hosting
Recommended X-Cart Hosting Provider - US and UK servers
Does your host backup your site? We do EVERY HOUR!!!
Shared Hosting | Managed Cloud | Dedicated Servers
Reply With Quote
  #5  
Old 05-12-2004, 11:10 AM
 
KiDD KiDD is offline
 

Member
  
Join Date: Jan 2003
Location: Sturgis, SD
Posts: 23
 

Default

ok most of what I was trying was not doing anything.

Modded

product_images.tpl to read simply and got rid of the details.php.


{include file="/home/store/www/detailed_pages/16290.htm"}

when I make it

{include file="/home/store/www/detailed_pages/{$product.productid}.htm"}

I get:


Parse error: parse error, expecting `'}'' in /home/store/www/templates_c/%%-15/%%-1564588823/product_images.tpl.php on line 5


When i try:

{include file="/home/store/www/detailed_pages/{'$product.productid'}.htm"}

I get:


Warning: filemtime(): Stat failed for /home/store/www/detailed_pages/{'Array.productid' (errno=2 - No such file or directory) in /home/store/www/Smarty-2.3.0/Smarty.class.php on line 1031
.htm"}

Am I writing the line wrong? Or do i need to assign a variable somehow?

Thanks in advance,

KiDD
http://store.sturgisrally.net (Live)
X-Cart Gold Ver. 3.3.4
Reply With Quote
  #6  
Old 05-12-2004, 02:02 PM
 
Emerson Emerson is offline
 

X-Man
  
Join Date: Mar 2004
Location: Atlanta, GA
Posts: 2,209
 

Default

Honestly I don't know what might be causing that problem.

Why don't you just use extra fields instead?

All you'd have to do is add {$product.param00} (or whatever extrafield it is) and that should do it for you.

You will need to enable html in extra fields which is pretty easy to do.
__________________
Emerson
Total Server Solutions LLC- Quality X-Cart Hosting
Recommended X-Cart Hosting Provider - US and UK servers
Does your host backup your site? We do EVERY HOUR!!!
Shared Hosting | Managed Cloud | Dedicated Servers
Reply With Quote
  #7  
Old 05-13-2004, 07:01 AM
  B00MER's Avatar 
B00MER B00MER is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Keller, TX (Cart-Lab.com)
Posts: 3,165
 

Default

Quote:
Originally Posted by KiDD
{include file="/home/store/www/detailed_pages/16290.htm"}

when I make it

{include file="/home/store/www/detailed_pages/{$product.productid}.htm"}

I get:

Parse error: parse error, expecting `'}'' in /home/store/www/templates_c/%%-15/%%-1564588823/product_images.tpl.php on line 5


Try this instead:

Code:
{capture name="htmldetailed"}{strip}/home/store/www/detailed_pages/{$product.productid}.htm{/strip}{/capture} {include file=$smarty.capture.htmldetailed}
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart.
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 10:17 AM.

   

 
X-Cart forums © 2001-2020