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

How to Place Sku# in Dialog instead of Product Id

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 11-09-2002, 12:37 PM
 
fusionartstamps fusionartstamps is offline
 

Senior Member
  
Join Date: Oct 2002
Posts: 124
 

Default How to Place Sku# in Dialog instead of Product Id

Hi there,

I want to be able to replace the product id# that shows on the heading of each product description with the sku# from the product. I think it should be fairly simple, but not sure what the code would be.

Amy
Reply With Quote
  #2  
Old 11-27-2002, 06:44 AM
 
ryan ryan is offline
 

Advanced Member
  
Join Date: Sep 2002
Location: Philly
Posts: 38
 

Default

Just find the following line in the file config.php:
Code:
$product["producttitle"]="$product[product] $product[brand] $product[model] #$product[productid]";

and replace it with the following line:
Code:
$product["producttitle"]="$product[product] #$product[productcode]";

I am using the older version of xcart.
Reply With Quote
  #3  
Old 11-27-2002, 07:38 AM
 
fusionartstamps fusionartstamps is offline
 

Senior Member
  
Join Date: Oct 2002
Posts: 124
 

Default

Ryan,

I looked in the config.php file and didn't find any of the code you referenced. I'm using 3.2.1 Part of the info you gave me did help though. I believe this is the code I need to edit in product.tpl

Quote:
{include file="dialog.tpl" title=$product.producttitle content=$smarty.capture.dialog extra="width=100%"}

If I change it to:

Quote:
{include file="dialog.tpl" title=$product.product content=$smarty.capture.dialog extra="width=100%"}

this removes the product number reference, which I don't need.

I tried this code:

Quote:
{include file="dialog.tpl" title=$product.productcode content=$smarty.capture.dialog extra="width=100%"}

and it just puts the sku number in the dialog. I guess I need a combination of $product.product and $product.productcode but I'm not sure how to write it. Any suggestions?

Amy
Reply With Quote
  #4  
Old 11-27-2002, 12:49 PM
  leed's Avatar 
leed leed is offline
 

Senior Member
  
Join Date: Nov 2002
Location: England (UK)
Posts: 128
 

Default

Amy

We're running 3.2.1 and have done this too ...

Ryan is correct with the method, just not the code location for 3.2.1. You'll find the code to replace (as in his quote) in func.php which can be found in xcart/include

Just find the following line in the file func.php:
Code:
$product["producttitle"]="$product[product] $product[brand] $product[model] #$product[productid]";

and replace it with the following line:
Code:
$product["producttitle"]="$product[product] #$product[productcode]";

If you then look at the detailed product page, you'll see the product description including the SKU ...

Best of luck

LeeD
__________________
Why a mouse when it spins ......
X-Cart Gunslingers - For Hire!!
http://forum.x-cart.com/viewtopic.php?t=8615
Reply With Quote
  #5  
Old 11-27-2002, 02:39 PM
 
fusionartstamps fusionartstamps is offline
 

Senior Member
  
Join Date: Oct 2002
Posts: 124
 

Default

Leed,

Got it fixed! Works great now! Thanks!!

Amy
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 05:34 PM.

   

 
X-Cart forums © 2001-2020