X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   How to Place Sku# in Dialog instead of Product Id (https://forum.x-cart.com/showthread.php?t=599)

fusionartstamps 11-09-2002 12:37 PM

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

ryan 11-27-2002 06:44 AM

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.

fusionartstamps 11-27-2002 07:38 AM

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

leed 11-27-2002 12:49 PM

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

fusionartstamps 11-27-2002 02:39 PM

Leed,

Got it fixed! Works great now! Thanks!!

Amy


All times are GMT -8. The time now is 08:06 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.