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

Manufacturer name in from of Product name

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #21  
Old 08-05-2009, 12:50 AM
 
Mark Orbit Mark Orbit is offline
 

Newbie
  
Join Date: May 2009
Posts: 8
 

Default 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.
__________________
X-Cart Gold version: 4.2.2
Apache version: 2.2.11
PHP version: 5.2.9-2
phpMyAdmin: 3.1.1

MYSQL version: 5.0.51a
Operating system: Windows Vista Ultimate
Reply With Quote
  #22  
Old 08-05-2009, 12:54 AM
  ADDISON's Avatar 
ADDISON ADDISON is offline
 

X-Man
  
Join Date: Jan 2008
Posts: 2,613
 

Default 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?
__________________
X-Cart Next: Business 5.2 (learning and testing)
X-Cart Classic: Gold and Gold Plus 4.7
Lots of Modules and Customizations
OS in use: Red Hat Enterprise, Fedora, CentOS, Debian, Ubuntu, Linux Mint, Kali Linux
Ideas for Server configuration (basicaly): Nginx/Pound (reverse proxy), Apache/Nginx (webserver), Squid/Varnish (cache server), HHVM or (PHP-FPM + PHP 5.6 + opcache), MariaDB/Percona MySQL Server, Redis (storing sessions)

You can catch my ideas here: http://ideas.x-cart.com
Reply With Quote
  #23  
Old 08-05-2009, 12:55 AM
  ADDISON's Avatar 
ADDISON ADDISON is offline
 

X-Man
  
Join Date: Jan 2008
Posts: 2,613
 

Default 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
__________________
X-Cart Next: Business 5.2 (learning and testing)
X-Cart Classic: Gold and Gold Plus 4.7
Lots of Modules and Customizations
OS in use: Red Hat Enterprise, Fedora, CentOS, Debian, Ubuntu, Linux Mint, Kali Linux
Ideas for Server configuration (basicaly): Nginx/Pound (reverse proxy), Apache/Nginx (webserver), Squid/Varnish (cache server), HHVM or (PHP-FPM + PHP 5.6 + opcache), MariaDB/Percona MySQL Server, Redis (storing sessions)

You can catch my ideas here: http://ideas.x-cart.com
Reply With Quote
  #24  
Old 08-05-2009, 03:11 AM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default 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
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #25  
Old 08-05-2009, 04:32 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default 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
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #26  
Old 08-05-2009, 05:18 AM
 
Mark Orbit Mark Orbit is offline
 

Newbie
  
Join Date: May 2009
Posts: 8
 

Default 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.
__________________
X-Cart Gold version: 4.2.2
Apache version: 2.2.11
PHP version: 5.2.9-2
phpMyAdmin: 3.1.1

MYSQL version: 5.0.51a
Operating system: Windows Vista Ultimate
Reply With Quote
  #27  
Old 08-05-2009, 05:34 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default 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
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #28  
Old 08-05-2009, 05:37 AM
 
Mark Orbit Mark Orbit is offline
 

Newbie
  
Join Date: May 2009
Posts: 8
 

Default 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.
__________________
X-Cart Gold version: 4.2.2
Apache version: 2.2.11
PHP version: 5.2.9-2
phpMyAdmin: 3.1.1

MYSQL version: 5.0.51a
Operating system: Windows Vista Ultimate
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 03:36 PM.

   

 
X-Cart forums © 2001-2020