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)
-   -   Manufacturer name in from of Product name (https://forum.x-cart.com/showthread.php?t=48976)

Mark Orbit 08-05-2009 12:50 AM

Re: Manufacturer name in from of Product name
 
Quote:

Originally Posted by carpeperdiem
$product.manufacturer


Doesn't work for me I'm afraid. I tried both these options in post #17. Is bringing in the manufacturer more involved than modifying this bit of code? Thanks.

ADDISON 08-05-2009 12:54 AM

Re: Manufacturer name in from of Product name
 
Quote:

Originally Posted by Mark Orbit
Doesn't work for me I'm afraid. I tried both these options in post #17. Is bringing in the manufacturer more involved than modifying this bit of code? Thanks.


Use post #14. Then you should edit some tpl files. And replace $product.product and $producttitle with your new variable. For the future I will insert an check box in Admin and make some if statements. For example: Do you want Manufacturer name in front of product name?

ADDISON 08-05-2009 12:55 AM

Re: Manufacturer name in from of Product name
 
One more soft question. What is the difference between $product.product and $product.producttitle? Are they the same? Maybe they have same values, using different queries.

Cheers

carpeperdiem 08-05-2009 03:11 AM

Re: Manufacturer name in from of Product name
 
Quote:

Originally Posted by Mark Orbit
Doesn't work for me


$product.manufacturer is a valid variable in product.tpl

cflsystems 08-05-2009 04:32 AM

Re: Manufacturer name in from of Product name
 
Quote:

Originally Posted by am2003
One more soft question. What is the difference between $product.product and $product.producttitle? Are they the same? Maybe they have same values, using different queries.

Cheers


$product.product is the value of product field in products table. In func.product.php we find
Code:

$product["producttitle"] = $product['product'];
which make $product.producttitle same as $product.product
What's the reason? I don't know maybe to make it more obvious that this is the product name

Mark Orbit 08-05-2009 05:18 AM

Re: Manufacturer name in from of Product name
 
Quote:

Originally Posted by carpeperdiem
$product.manufacturer is a valid variable in product.tpl


Does that mean it should work in products_list.tpl (line 29). Is that what you're saying?

Because when I alter:
HTML Code:

{$product.product|escape}
to
HTML Code:

{$product.manufacturer|escape}
it displays nothing at all.

If need be I'll try the method described in #14 but I got the impression that it was not best practice.

cflsystems 08-05-2009 05:34 AM

Re: Manufacturer name in from of Product name
 
product.tpl and products_list.tpl are different templates and $product.manufacturer is not be available in products_list.tpl
You need to edit the php file responsible for populating the products array for products_list.tpl to include manufacturer description in the query

Mark Orbit 08-05-2009 05:37 AM

Re: Manufacturer name in from of Product name
 
Quote:

Originally Posted by cflsystems
product.tpl and products_list.tpl are different templates and $product.manufacturer is not be available in products_list.tpl
You need to edit the php file responsible for populating the products array for products_list.tpl to include manufacturer description in the query


Thanks very much Steve. That makes sense. I'll see how I get on doing that.


All times are GMT -8. The time now is 07:38 PM.

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