How to add Attributes into List view ?

Mackiee

No avatar

2007-10-10 14:35

Hi all,

I am trying to figure out how to add one of the attributes in list of products (not detail). Should by something like $aList[sAttribute][1] but that doesn§t work.

Can anybody help me, please?

» Quick.Cart v2.x

Mackiee

No avatar

2007-10-10 15:51

So i finally make it!

I added into file core/products.php this code:

<?php
$attributes = throwAttributesLightProduct( $aList['iProduct'] ); // Get attributes for the product
$aList['iCustomAttribute'] = attributes[5]; // Take Attribut id 5

?>
So i can use $aList['iCustomAttribute'] in productlist template.

Hope somebody find this useful.

cuteuser

Avatar: cuteuser

2015-02-24 21:49

Cool, This is Good.

But it is painful every time i have to made custom attribute variable for each attribute ID.

there is must be simple solution so we can put variable with there attribute ID for displaying it. (without making any custom attribute ?)

Yea Something like this $aList[sAttribute][1] , as you describe in your post.

So we don't have to made custom attribute for each attribute, every time.

Anyone can help in this issue ?

Thanks

cuteuser

Avatar: cuteuser

2015-02-26 02:22

i get Parse error: syntax error, unexpected '[' in producst.php , when i add following code.

<?php
$attributes = throwAttributesLightProduct( $aList['iProduct'] ); // Get attributes for the product
$aList['iCustomAttribute'] = attributes[5]; // Take Attribut id 5

?>

Where i have to add above code in /core/producst.php ????

add only following 2 line code ? but where in producst.php file ?

$attributes = throwAttributesLightProduct( $aList['iProduct'] ); // Get attributes for the product
$aList['iCustomAttribute'] = attributes[5]; // Take Attribut id 5

please help!!!

cuteuser

Avatar: cuteuser

2015-03-03 13:49

uzyskać Parse error: syntax error , unexpected '[' w producst.php , kiedy dodać następujący kod .

Ktoś mi pomóc

Aby przeczytać moje pytanie ,
Proszę korzystać z Google Translate



Gdzie mam dodać wyżej kod w /core/producst.php ????

tylko dodać po 2 kod linii ? ale gdzie w producst.php pliku?


<?phphttp://opensolution.org/forum/?iTopic=4527#
$attributes = throwAttributesLightProduct( $aList['iProduct'] ); // Get attributes for the product
$aList['iCustomAttribute'] = attributes[5]; // Take Attribut id 5 ?>

Back to top
about us | contact