Zen Cart Logo
Forums / All Other Contributions/Addons / Product Attribute Grid

Product Attribute Grid

Views: 139,350

Results 41 to 60 of 546
10 Mar 2008, 6:10 PM
#41
supersnow avatar

supersnow

Zen Follower

Join Date:
Apr 2007
Location:
California, USA
Posts:
233
Plugin Contributions:
0

Product Attribute Grid

Absolute,

When are you coming out with the update - your last post suggested that it would have been a few weeks ago.

23 Mar 2008, 5:01 AM
#42
behrtek avatar

behrtek

New Zenner

Join Date:
Mar 2008
Posts:
10
Plugin Contributions:
0

Re: Product Attribute Grid

First off let me say Zen Cart is one awesome piece of programming!

But now to my question.

I have installed the Product Attribute Grid, and can get it to work with two attributes. What I would like is to have the grid and also single attributes attached to one product.

Is this possible, and what do I need to do?

Thanks in advance!

23 Mar 2008, 11:34 PM
#43
behrtek avatar

behrtek

New Zenner

Join Date:
Mar 2008
Posts:
10
Plugin Contributions:
0

Re: Product Attribute Grid

Is there anyone who can help me with the above question?

I have a product that I would like to use the grid for size quantities, but also single attributes, like color, text, text font etc...

24 Mar 2008, 10:05 PM
#44
supersnow avatar

supersnow

Zen Follower

Join Date:
Apr 2007
Location:
California, USA
Posts:
233
Plugin Contributions:
0

Re: Product Attribute Grid

So we have recently moved hosting companies and now the product grid is not working with a min qty even with the mix set to yes. I have tried everything to try to fix this. It works fine on our old host but not on our new. I was trying to get help on a another forum post:

http://www.zen-cart.com/forum/showthread.php?t=87605&page=2

As the attribute combo quantities were not adding correctly to meet the requirement of the min set. As I said in my other forum area this problem is only on our new hosting and I worked out (with a lot of trial and error) that the only thing that is different between the two is the php version that is on the hosts. The old host (which the module and min qty works perfectly) is running php 4.4.8 and the my new host is using 5.2.5.

So maybe something needs to change in this module so that it works on php 5 as a fair number of host are changing and this is going to cause some problems for other store owners like me who needs a min qty or any qty calculations to work.

30 Mar 2008, 3:40 PM
#45
pokerdis avatar

pokerdis

New Zenner

Join Date:
Apr 2007
Posts:
20
Plugin Contributions:
0

Re: Product Attribute Grid

Hello,

First of all this mod is fantastic!!

I've been trying for quite a while and cannot figure out how to center the attribute text in the grid, put a black border or change the color of the grid header...I would like the color to match my theme. Can someone point me in the right direction...I've been editing stylesheet.css but with no luck.

Thank You,
Tom

http://www.pokerdiscount.net

Example:

http://www.pokerdiscount.net/poker-chips-1/11-5-gram-2/11-5-g-monacot-six-stripe-poker-chips-1718.html

1 Apr 2008, 5:39 AM
#46
supersnow avatar

supersnow

Zen Follower

Join Date:
Apr 2007
Location:
California, USA
Posts:
233
Plugin Contributions:
0

Re: Product Attribute Grid

pokerdis:

Hello,

First of all this mod is fantastic!!

I've been trying for quite a while and cannot figure out how to center the attribute text in the grid, put a black border or change the color of the grid header...I would like the color to match my theme. Can someone point me in the right direction...I've been editing stylesheet.css but with no luck.

Thank You,
Tom

http://www.pokerdiscount.net

Example:

http://www.pokerdiscount.net/poker-chips-1/11-5-gram-2/11-5-g-monacot-six-stripe-poker-chips-1718.html

The deveoper has put into the custom template some stylesheet defintions you will need to add these to your stylesheet and then allocate the required styles that you want. I hope this helps.

10 Apr 2008, 5:01 AM
#47
htsean avatar

htsean

New Zenner

Join Date:
Mar 2008
Posts:
50
Plugin Contributions:
0

Re: Product Attribute Grid

I just noticed that the Product Attribute Grid does not hide prices even when 'Customer Shop Status - View Shop and Prices' is set to 'May browse but no prices unless logged in'.

Anyone know of how to hide the prices that display in the attribute grid until logged in?

10 Apr 2008, 7:48 PM
#48
htsean avatar

htsean

New Zenner

Join Date:
Mar 2008
Posts:
50
Plugin Contributions:
0

Re: Product Attribute Grid

I think i've narrowed down my experimenting on what needs to be changed to get 'hiding prices until logged in' to work with the Product Attribute Grid. In attributes.php, I think the default code for hiding prices until logged in is this at around line 108:

                  if (((CUSTOMERS_APPROVAL == '2' and $_SESSION['customer_id'] == '') or (STORE_STATUS == '1')) or ((CUSTOMERS_APPROVAL_AUTHORIZATION == '1' or CUSTOMERS_APPROVAL_AUTHORIZATION == '2') and $_SESSION['customers_authorization'] == '') or (CUSTOMERS_APPROVAL == '2' and $_SESSION['customers_authorization'] == '2') or (CUSTOMERS_APPROVAL_AUTHORIZATION == '2' and $_SESSION['customers_authorization'] != 0) ) {

                    $new_attributes_price = '';
                    $new_options_values_price = 0;
                    $products_options_display_price = '';
                    $price_onetime = '';
                  }

Now, I figured this is the section where the Product Attribute Grid sets up the 'price' variable that displays in the grid at around line 80 of the attribute grid's attributes.php file:

	  $grid_records[$rd]['options'][] = array(	'id'			=>	$products_options->fields['products_options_values_id'],
	  											'name'			=>	$products_options->fields['products_options_values_name'],
												'price'			=>	$products_options->fields['options_values_price'],
												'price_prefix'	=>	$products_options->fields['price_prefix'],
												'weight'		=>	$products_options->fields['products_attributes_weight'],
												'weight_prefix'	=>	$products_options->fields['products_attributes_weight_prefix'],
												'discounted'	=>	$products_options->fields['attributes_discounted'],
												'image'			=>	$products_options->fields['attributes_image'],
												'base_price'	=>	$products_options->fields['attributes_base_price_included'],
												'required'		=>	$products_options->fields['attributes_required'],
												'display'		=>	$products_options->fields['display_only']
											);

If I comment out the 'price' variable of the array, then it gets rid of the price completely. I'd like the prices to reappear when logged in..

13 Apr 2008, 3:47 AM
#49
htsean avatar

htsean

New Zenner

Join Date:
Mar 2008
Posts:
50
Plugin Contributions:
0

Re: Product Attribute Grid

to anyone that cares, i figured out how to get the prices inside the attribute tables to hide when not logged in. In includes/modules/your_template/attributes.php at around line 47:

if ($check_attributes_fields == true) { 

I noticed Absolute added his entire Attribute Grid code (for this .php file, anyways) in this function. So I created a

if ($_SESSION['customer_id']){
}

function while just inside the $check_attributes_fields statement and enclosed whatever was inside. I then copied that entire code into an else{} statement, but this time commented out this line, around line 88:

'price'			=>	$products_options->fields['options_values_price'],

Commenting out the 'price' variable in the $grid_records[$rd]['options'][] array gets rid of the prices that display in the grid.

So the basic layout of my coding solution is that if a user is logged in, the attribute grid performs normally. But, if the user is not logged in, then the attribute grid performs with the price display manually disabled through commenting out the 'price' variable.

I'm sure there is a much easier way of getting this done. It feels like there is a quick one line code method of being able to get 'hide prices until logged in' functionality with the attribute grid, but my programming knowledge is limited.

16 Apr 2008, 2:08 AM
#50
pokerdis avatar

pokerdis

New Zenner

Join Date:
Apr 2007
Posts:
20
Plugin Contributions:
0

Re: Product Attribute Grid

supersnow:

The deveoper has put into the custom template some stylesheet defintions you will need to add these to your stylesheet and then allocate the required styles that you want. I hope this helps.

Snow,

Can you give me a little more specific information if possible on how to do this...I'm really struggling with this. I want to center the attributes text in the table and also change the background color of the table....except the quantity boxes

http://www.pokerdiscount.net/sopranos-141/soprano-10g-clay-striped-casino-chip-9-color-choices-1704.html

Thanks in advance.

Tom

16 Apr 2008, 7:16 AM
#51
htsean avatar

htsean

New Zenner

Join Date:
Mar 2008
Posts:
50
Plugin Contributions:
0

Re: Product Attribute Grid

pokerdis:

Snow,

Can you give me a little more specific information if possible on how to do this...I'm really struggling with this. I want to center the attributes text in the table and also change the background color of the table....

Tom

In your \includes\templates\your_template\css\stylesheet.css, add this code somewhere:

.attrib-grid-cell {text-align:center;}
.attrib-grid-hHeader {text-align:center;}
.attrib-grid-table {background-color: #cacaca;}

.attrib-grid-cell is for the qty. box alignment
.attrib-grid-hHeader is the text at the top, dunno if you want to align that too.
.attrib-grid-table is the whole table

16 Apr 2008, 11:21 PM
#52
pokerdis avatar

pokerdis

New Zenner

Join Date:
Apr 2007
Posts:
20
Plugin Contributions:
0

Re: Product Attribute Grid

HTsean:

In your \includes\templates\your_template\css\stylesheet.css, add this code somewhere:

.attrib-grid-cell {text-align:center;}
.attrib-grid-hHeader {text-align:center;}
.attrib-grid-table {background-color: #cacaca;}

>  
> .attrib-grid-cell is for the qty. box alignment
> .attrib-grid-hHeader is the text at the top, dunno if you want to align that too.
> .attrib-grid-table is the whole table
 
 
HTSean,
 
Thank you very much.....the attrib text above the qty box now is centered. I see no change though in either the top header alignment or the background color.
 
Thanks Again,
Tom
17 Apr 2008, 3:42 AM
#53
htsean avatar

htsean

New Zenner

Join Date:
Mar 2008
Posts:
50
Plugin Contributions:
0

Re: Product Attribute Grid

sorry about the table, i just got the name of the class from firefox's developer tool..

as for the header, i dunno. that line did it for me.. maybe we were having different alignment issues.

30 Apr 2008, 4:03 AM
#54
stefanico avatar

stefanico

New Zenner

Join Date:
May 2006
Posts:
14
Plugin Contributions:
0

Re: Product Attribute Grid

HTsean:

to anyone that cares, i figured out how to get the prices inside the attribute tables to hide when not logged in. In includes/modules/your_template/attributes.php at around line 47:

if ($check_attributes_fields == true) {

> 
> I noticed Absolute added his entire Attribute Grid code (for this .php file, anyways) in this function.  So I created a
> 
> ```php
if ($_SESSION['customer_id']){
}

function while just inside the $check_attributes_fields statement and enclosed whatever was inside. I then copied that entire code into an else{} statement, but this time commented out this line, around line 88:

'price' => $products_options->fields['options_values_price'],

> 
> Commenting out the 'price' variable in the $grid_records[$rd]['options'][] array gets rid of the prices that display in the grid.
> 
> So the basic layout of my coding solution is that if a user is logged in, the attribute grid performs normally.  But, if the user is not logged in, then the attribute grid performs with the price display manually disabled through commenting out the 'price' variable.
> 
> I'm sure there is a much easier way of getting this done.  It feels like there is a quick one line code method of being able to get 'hide prices until logged in' functionality with the attribute grid, but my programming knowledge is limited.
HTsean,

This is actually important for my cart too.
unfortunately I can't manage to edit the attributes.php without errors.
I have tried to follow your post's steps, but I think I am having problem placing the Else Statement.
I have added the if ($_SESSION['customer_id']){  after Line 47. But I am stuck as to where to place the Else statement from there, I have tried a few logical place without success.
Could you please point me as to what portion of code should I enclose in the If statement and where to place the Else part?
I actualy want to hide the table altogether if not logged in, so an Empty Else statement should do?

Ideally if you could just quote your attributes.php in full I could work it out from there ;)

Thanks a mil!
Stephane
30 Apr 2008, 4:53 AM
#55
jalaco avatar

jalaco

New Zenner

Join Date:
Apr 2008
Location:
Geneva, IL
Posts:
13
Plugin Contributions:
0

Re: Product Attribute Grid

Has anyone figured out a way to have additional single attributes work along with the attribute grid?

All I need is one additional product attribute outside the grid -- a radio button or checkbox would do it.

30 Apr 2008, 6:29 PM
#56
htsean avatar

htsean

New Zenner

Join Date:
Mar 2008
Posts:
50
Plugin Contributions:
0

Re: Product Attribute Grid

Here it goes, this is my personally edited attributes.php with the only update being that 'hide prices until logged in' now functions with Absolute's Product Attribute Grid.

The 'hiding' prices part must be done through the zen-cart's options:

Configuration->Customer Details->Customer Shop Status - View Shop and Prices'..

is set to 'May browse but no prices unless logged in' (option 2). After setting that, the attributes.php file that you will need to modify is in:

/includes/modules/YOUR_TEMPLATE/attributes.php

Actually, I cannot copy and paste on this message because it is too long so I saved it as a text file on my server. Here's the link:

http://www.halftonebodyworks.com/showroom/attributes.txt

Btw, I probably won't have this txt file on the server for more than a few weeks.

30 Apr 2008, 11:50 PM
#57
stefanico avatar

stefanico

New Zenner

Join Date:
May 2006
Posts:
14
Plugin Contributions:
0

Re: Product Attribute Grid

Thanks HTsean,

works a treat you legend !

also I noticed another little glitch on the contribution.
When using only 1 Option Name as column heading, or 1 as row heading you end up with the Title of the columns off set to the left of the table and starting above the Row Heading of the other Option name.

I have fixed this by updating the Attribute.php from Line 107 so the Col or row span is always 2 and will nicely sit as it should above it's column.

if (($grh_size > 1) || zen_not_null($grid_records['H']['options'][$grh]['name'])) {
$top_rowspan = 2;
} else {
$top_rowspan = 2;
}
if (($grv_size > 1) || zen_not_null($grid_records['V']['options'][$grv]['name'])) {
$top_colspan = 2;
} else {
$top_colspan = 2;
}

Stephane

12 May 2008, 6:23 PM
#58
jacdesigner avatar

jacdesigner

Zen Follower

Join Date:
Jun 2005
Location:
Austin, Texas, US
Posts:
205
Plugin Contributions:
0

Re: Product Attribute Grid

For those of you trying to style the table to look a bit more attractive, you can locate this line in the /modules/yourtemplatename/attributes.php:

$attrib_grid = '<table id="attrib-grid-table" cellpadding="3" border="1">'."\n" .

Personally I changed the border to 0.

You can also append your stylesheet by adding the following classes and ids (style however you wish)...

.attrib-grid-cell {text-align:center;border:0;vertical-align: top;}
.attrib-grid-vHeader {border: 0;}
.attrib-grid-opt-nameH {border: 0;}
#attrib-grid-hHeader { }
#attrib-grid-opt-nameH {}
#productAttributes {}

29 May 2008, 3:10 AM
#59
supersnow avatar

supersnow

Zen Follower

Join Date:
Apr 2007
Location:
California, USA
Posts:
233
Plugin Contributions:
0

Re: Product Attribute Grid

How is the update going so that you can exclude certain combos that are either out of stock or not available i.e a red shirt in size XXL. I saw that you were working on something like that a few months back Absolute but haven't heard from you in a while. Are you still supporting this module/thread?

Thanks again for a great module.

29 May 2008, 5:35 PM
#60
jacdesigner avatar

jacdesigner

Zen Follower

Join Date:
Jun 2005
Location:
Austin, Texas, US
Posts:
205
Plugin Contributions:
0

Re: Product Attribute Grid

supersnow:

How is the update going so that you can exclude certain combos that are either out of stock or not available i.e a red shirt in size XXL. I saw that you were working on something like that a few months back Absolute but haven't heard from you in a while. Are you still supporting this module/thread?

Thanks again for a great module.

Supers have you by chance already tried the additional module for Attributes By Stock? I haven't been using it directly in conjunction with this grid module yet but I believe it will accomplish what your goal of hiding options that are unavailable.