Site maintenance: Tuesday 17 Nov, from 10:00 UTC, about 4–6 hours. Details

This cutover relies on some testing that is still incomplete so may be cancelled at short notice

Forums / All Other Contributions/Addons / Product Attribute Grid

Product Attribute Grid

Started by absolute on 15 Jan 2008, 5:01 PM · Views: 139,578

Results 381 to 400 of 546
21 Jun 2013, 5:11 PM
#382
barendfaber avatar

barendfaber

Zen Follower

Join Date:
Apr 2010
Posts:
263
Plugin Contributions:
0

Re: Product Attribute Grid

Hi all,

Hope someone can help me! I have re-created my site on 1.5.1, please see product page http://www.fossilandrock.co.uk/crystals/tumblestones/agate-blue-lace. When I try to add options, it does not add it to my cart at all, it just shows the product and the charge is £ 0.00. How can I fix this?

B

25 Jun 2013, 8:07 AM
#383
barendfaber avatar

barendfaber

Zen Follower

Join Date:
Apr 2010
Posts:
263
Plugin Contributions:
0

Re: Product Attribute Grid

wilt:

k,

I installed the attributes grid contribution on a stock 1.3.8 install with the most up to date Security patch file.

It does in fact stop this contribution from adding items to the cart.

The reason is, that the security patch uses a whitelist of characters that are allowed in the to be keys of the products_id array.

The attribute grid contribution uses extended product ids, as keys and these fail the whitelist test.

The fix is fairly simple.

In the security patch, there is a function called.

securityPatchSanitizePostVariableProductsId

and in this is the line

if (ereg_replace('[0-9a-zA-z_]', '', $key) != '')

> 
> this should be changed to 
> 
> ```php
if (ereg_replace('[0-9a-zA-z_:]', '', $key) != '')

We will look to release an updated patch (probably this weekend)

Our apologies for the inconvenience, however we took the position that using a whitelist was more secure than relying on a simple blacklist.

Hi everyone,

I have asked a few days ago for some help as my products are simply not added to the cart, just worried support on this thread is now non-existent as no one seems to want to reply. Using version 1.5.1, https://www.fossilandrock.co.uk.

From the above, I found /includes/extra_configures/security_patch_v138_20080919.php. On this I cannot find the above, only at the bottom if (preg_replace('/[0-9a-zA-z_:.]/', '', $key) != ''). This does not quite match the above, but could this be the culprit that prevents my products to be added to the cart?

B

26 Jun 2013, 8:41 AM
#384
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Product Attribute Grid

The rewritten preg_replace you quoted is newer and compatible with contemporary versions of PHP. The old ereg_replace was for PHP 4, and is now obsolete.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

26 Jun 2013, 8:50 AM
#385
barendfaber avatar

barendfaber

Zen Follower

Join Date:
Apr 2010
Posts:
263
Plugin Contributions:
0

Re: Product Attribute Grid

DrByte:

The rewritten preg_replace you quoted is newer and compatible with contemporary versions of PHP. The old ereg_replace was for PHP 4, and is now obsolete.

Hi DrByte. Thanks for the reply. What else could be happening as my attributes are not sent to my cart?

B

26 Jun 2013, 9:57 AM
#386
barendfaber avatar

barendfaber

Zen Follower

Join Date:
Apr 2010
Posts:
263
Plugin Contributions:
0

Re: Product Attribute Grid

Hi,

I hope someone can help me. I am using version 1.5.1, www.fossilandrock.co.uk. I have Product Attribute Grid installed, as we offer products that are available in different sizes and we would like customers to add multiple options to their cart (here is an example http://www.fossilandrock.co.uk/crystals/tumblestones/agate-blue-lace?products_id=92:d4cac87d72fdf05d8a43d45368ab0abd). However, what I have found is that when I click "Add to cart", the attributes are not added, and the product shows up as £ 0.00. I just wanted to confirm, is Fast and Easy Checkout compatible with the Product Attribute Grid and Stock by Attributes?

B

26 Jun 2013, 11:31 PM
#387
wilt avatar

wilt

Oji-san

Join Date:
Jun 2003
Location:
Newcastle UK
Posts:
1,945
Plugin Contributions:
3

Re: Product Attribute Grid

Hi,

I took a quick look at your site. The problem does not seem to stem from parameter sanitization (as per your post http://www.zen-cart.com/showthread.php?85649-Product-Attribute-Grid&p=1208642#post1208642)

Looking at the page source, there appears to be missing hidden fields on the page, that the attribute need to process when adding the product to the cart.
Not sure why that is happening though. I will try and do a integration on a clean v1.5 to see if that sheds any light.
Also given that it is the product page that is the problem, it's unlikely to be anything related to fast & easy.

27 Jun 2013, 7:21 AM
#388
barendfaber avatar

barendfaber

Zen Follower

Join Date:
Apr 2010
Posts:
263
Plugin Contributions:
0

Re: Product Attribute Grid

Hi developers,

I could not make this module work at all, and found this morning that the module is actually broken.

What I have done:

  1. Installed fresh version of 1.5.1 on https://www.torfarm.retailjunction.co.uk
  2. Installed 1.5.1 version template of bentley_classic
  3. Installed Stock by attributes (as this was a fresh install I allowed simple overwrite of files) (latest version loaded by kuroi on 03 Jan 2013)
  4. Installed Product Attribute Grid 1.2 (updated by Absolute on 02 Nov 2012)

My attributes are not added to the cart, same as with my main site, please test. I have compared and have noticed from your version for 1.3.9, two files are missing from the 1.5 version, tpl_product_info_display.php and tpl_modules_attributes.php. Were these really unnecessary files? Could you please have a re-look at this module and fix? Your help here is greatly appreciated.

Kind regards

B

27 Jun 2013, 7:23 AM
#389
barendfaber avatar

barendfaber

Zen Follower

Join Date:
Apr 2010
Posts:
263
Plugin Contributions:
0

Re: Product Attribute Grid

Just PM'd Absolute but mailbox full....

27 Jun 2013, 7:31 AM
#390
barendfaber avatar

barendfaber

Zen Follower

Join Date:
Apr 2010
Posts:
263
Plugin Contributions:
0

Re: Product Attribute Grid

While you're at it, could I ask another favour? The module is a bit "broken" in Firefox. It displays correctly in Chrome and Internet Explorer, however in Firefox the heading "size" is displayed on the left hand side, next to the attribute options, and I have tried all variations of CSS but cannot seem to move the "size" to above the options, so that "size" and "quantity" is displayed in one line, each above their own column.

Thanks!

27 Jun 2013, 10:47 AM
#391
barendfaber avatar

barendfaber

Zen Follower

Join Date:
Apr 2010
Posts:
263
Plugin Contributions:
0

Re: Product Attribute Grid

Hi,

I have noticed it sends the product to the cart, not the cost. So it shows 2 items in cart - £ 0.00. Is this an issue with the Product Attribute Grid, or Stock by Attributes module?

B

28 Jun 2013, 7:50 AM
#392
barendfaber avatar

barendfaber

Zen Follower

Join Date:
Apr 2010
Posts:
263
Plugin Contributions:
0

Re: Product Attribute Grid

Hi,

Shame on the mod developers for still not getting back to help us Zenners!

OK, I fixed it! They seem to have forgotten that one of their "unneccessary" files was actually neccessary! For anyone with version 1.5.1., wanting to use this module, in order for your attribute stock to show up on the cart, please check the previous version's tpl_product_info_display.php. Under the section "Add to cart", there is a piece of code missing which will allow the attributes to be sent to the cart.

Replace:

<!--bof Add to Cart Box --> <?php if (CUSTOMERS_APPROVAL == 3 and TEXT_LOGIN_FOR_PRICE_BUTTON_REPLACE_SHOWROOM == '') { // do nothing } else { ?>
        <?php
$display_qty = (($flag_show_product_info_in_cart_qty == 1 and $_SESSION['cart']->in_cart($_GET['products_id'])) ? '<p>' . PRODUCTS_ORDER_QTY_TEXT_IN_CART . $_SESSION['cart']->get_quantity($_GET['products_id']) . '</p>' : '');
        if ($products_qty_box_status == 0 or $products_quantity_order_max== 1) {
          // hide the quantity box and default to 1
          $the_button = '<input type="hidden" name="cart_quantity" value="1" />' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
        } else {
          // show the quantity box
$the_button = PRODUCTS_ORDER_QTY_TEXT . '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($_GET['products_id'])) . '" maxlength="6" size="4" /><br />' . zen_get_products_quantity_min_units_display((int)$_GET['products_id']) . '<br />' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
        }
$display_button = zen_get_buy_now_button($_GET['products_id'], $the_button);

?>

<?php if ($display_qty != '' or $display_button != '') { ?>
<div id="cartAdd">
<?php
  echo $display_qty;
  echo $display_button;
        ?>
      </div>
<?php } // display qty and button ?> <?php } // CUSTOMERS_APPROVAL == 3 ?> <!--eof Add to Cart Box-->

with:

<!--bof Add to Cart Box --> <?php if (CUSTOMERS_APPROVAL == 3 and TEXT_LOGIN_FOR_PRICE_BUTTON_REPLACE_SHOWROOM == '') { // do nothing } else { ?>
        <?php
$display_qty = (($flag_show_product_info_in_cart_qty == 1 and $_SESSION['cart']->in_cart($_GET['products_id'])) ? '<p>' . PRODUCTS_ORDER_QTY_TEXT_IN_CART . $_SESSION['cart']->get_quantity($_GET['products_id']) . '</p>' : '');
        if ($products_qty_box_status == 0 or $products_quantity_order_max== 1) {
          // hide the quantity box and default to 1
          $the_button = '<input type="hidden" name="cart_quantity" value="1" />' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
        } else {
          // show the quantity box
$the_button = PRODUCTS_ORDER_QTY_TEXT . '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($_GET['products_id'])) . '" maxlength="6" size="4" /><br />' . zen_get_products_quantity_min_units_display((int)$_GET['products_id']) . '<br />' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
        }
if (isset($attrib_grid)) {
  $the_button = zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
}            
$display_button = zen_get_buy_now_button($_GET['products_id'], $the_button);

?>

<?php if ($display_qty != '' or $display_button != '') { ?>
<div id="cartAdd">
<?php
  echo $display_qty;
  echo $display_button;
        ?>
      </div>
<?php } // display qty and button ?> <?php } // CUSTOMERS_APPROVAL == 3 ?> <!--eof Add to Cart Box-->

And it adds the attributes to the cart!

28 Jun 2013, 7:54 AM
#393
barendfaber avatar

barendfaber

Zen Follower

Join Date:
Apr 2010
Posts:
263
Plugin Contributions:
0

Re: Product Attribute Grid

wilt:

Hi,

I took a quick look at your site. The problem does not seem to stem from parameter sanitization (as per your post http://www.zen-cart.com/showthread.php?85649-Product-Attribute-Grid&p=1208642#post1208642)

Looking at the page source, there appears to be missing hidden fields on the page, that the attribute need to process when adding the product to the cart.
Not sure why that is happening though. I will try and do a integration on a clean v1.5 to see if that sheds any light.
Also given that it is the product page that is the problem, it's unlikely to be anything related to fast & easy.

Hi,

Thanks for the reply. I apologise for messing you about, it seems the module Product Attribute Grid has been released with it being an incomplete module. They removed some code from the 1.3.9 version, I have re-added this code into the 1.5.1 and this has fixed the issue! My shop is now working as it should. Thanks for taking the time on this.

Kind regards

B

28 Jun 2013, 8:17 AM
#394
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Product Attribute Grid

Thanks for posting back with the solution to your problem.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

11 Jul 2013, 12:20 AM
#395
treblesand avatar

treblesand

New Zenner

Join Date:
Jun 2012
Posts:
9
Plugin Contributions:
0

Re: Product Attribute Grid

I have a question I'm hoping someone can help me with. I sell downloadable products that I also offer a printing service for. I'm using this to offer customers the choice to have one or more copies of a product printed with various options. I'd like to make it so that the printing choices are optional and do not have to be selected for a person to order the digital download.

So either, I need these to behave like check boxes and be ignored if they are set to zero, allowing someone to put the digital product in their cart, OR I need to set one of the qty boxes to a default of 1 instead of 0 so I can have it automatically selected to "NO PRINTING -- Digital download only". Or perhaps there is some other solution to this that I haven't thought of yet? I'm including a URL to a product that has this issue: The customer MUST choose a qty where before they were able to just click ADD TO CART. If they don't make a choice, they end up adding nothing to the cart.

http://www.littlelearninglovies.com/LZenCart/index.php?main_page=product_info&cPath=115_143&products_id=460

Thank you very much for any help you can offer on this issue! :)

24 Jul 2013, 7:06 PM
#396
maladi3 avatar

maladi3

New Zenner

Join Date:
Jul 2013
Posts:
9
Plugin Contributions:
0

Re: Product Attribute Grid

Great plugin. I was asked if it was possible to add up everything on the product page that is entered in the grid. But make it dynamic. Any ideas on how to capture the input without hitting add to cart.

Color:
Blue - 10
Black - 0
Green - 10

Total - 20

24 Jul 2013, 7:22 PM
#397
maladi3 avatar

maladi3

New Zenner

Join Date:
Jul 2013
Posts:
9
Plugin Contributions:
0

Re: Product Attribute Grid

Also is there a way to get the grid to have several colloums. I have about 10 different colors and I want to do 5 and 5. Thank you.

7 Aug 2013, 7:10 AM
#398
marc5477 avatar

marc5477

New Zenner

Join Date:
May 2013
Posts:
1
Plugin Contributions:
0

Re: Product Attribute Grid

Hey fellas,

Just a heads up, I am still having the add to cart problem listed by many users previously. im running 1.5.1 and plugin version 1.2.

When I attempt to change the tpl_product_info_display.php file in my andover_modern template it messes up the cart significantly. What happens now is any quantity added to the grid during check out becomes the quantity for the entire item not just the attribute addon. So for example, if the item is $50 and the attribute option is just $1 each; if I went to the cart and added 10 of the $1 attribute in the grid, then my cart wants $500 for 10 of the entire product.

Further, the same product does not work at all when you try to add it to cart if I leave the grid attributes blank. It just goes back to the main page instead. Other items that dont use grid still work as intended.

Thanks in advance for any help.
Mark

26 Oct 2013, 4:13 PM
#399
moesoap avatar

moesoap

Zen Follower

Join Date:
Mar 2010
Posts:
258
Plugin Contributions:
0

Re: Product Attribute Grid

DivaVocals:

I've search the thread but don't see an answer for this. My apologies if it has been posted and I missed it.. I think I've found a bug with this mod.

See this product:
http://clients.overthehillweb.com/hairisle/Stock-Lace-Wigs/Indian-Remy-Soft-Fro-Partial-Lace-Perimeter-Large

This product has two option names: color & wig length. Color has two option values, and wig length has only one. Though BOTH attributes are set up with the grid type, when I add wig lenth to the product the attribute not only shows up as part of the grid, but also as a radiobutton too. I doubled checked that there is only have ONE option name called "Wig Length", and I double checked that there is only ONE 16" value added to this product.

This product had the same issue. To double check that this is indeed a bug, I added an additional option value to the wig length. Once I did that, the radiobutton disappeared.
http://clients.overthehillweb.com/hairisle/Stock-Lace-Wigs/Chinese-Remy-Brazilian-Curl-Full-Lace-Perimeter-Medium

Also I see that the issue is only a problem if there is one value on the right side of the grid. Products which have only one option value across the top of the grid do not display this behavior:
http://clients.overthehillweb.com/hairisle/Stock-Lace-Wigs/Indian-Remy-Vixen-Curl-Full-Lace-Perimeter-Medium

I could use some help as to HOW to fix this..:smile: Obviously the workaround is to add another option value to the right side of the grid, but I'd like to not HAVE to do this..

I am encountering the same issue on my site. Does anyone have a solution?

7 Apr 2014, 1:27 PM
#400
avansant avatar

avansant

Zen Follower

Join Date:
Aug 2004
Posts:
122
Plugin Contributions:
0

Re: Product Attribute Grid

The attribute grid seems to be working fine, but in the admin I am getting the message "Warning: Absolute's Product Attribute Grid was detected, however the Product Option Type for Attribute Grid was not fully installed in the database. Temporarily configuring PRODUCTS_OPTIONS_TYPE_ATTRIBUTE_GRID = 23997" whenever we go to the "orders" area in the admin. I tried reinstalling it. The version I had didn't have a database option to install (no SQL file). I suspect it has something to do with this being an upgraded cart (from 1.3.8 to 1.5.1) and maybe the OLD installation left some DB table that shouldn't be there? But I can't find it. Can you help?