| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Post html instead of detailed images | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
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 |
|||||||
#2
|
|||||||
|
|||||||
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 |
|||||||
#3
|
|||||||
|
|||||||
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 |
|||||||
#4
|
|||||||
|
|||||||
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 |
|||||||
#5
|
|||||||
|
|||||||
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 |
|||||||
#6
|
|||||||
|
|||||||
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 |
|||||||
#7
|
|||||||||
|
|||||||||
Quote:
Try this instead: Code:
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart. |
|||||||||
|
|||
X-Cart forums © 2001-2020
|