Re: Product Attribute Grid
If you don't get any responses here, perhaps you could consider posting a request in the Commercial forum
Quote:
Originally Posted by
mrgtih2
Thanks to thomasharding's post and some PM his code inserted into the file absolute_products_with_attributes.php in the includes/extra_cart_actions/ folder we now have the uploads working but with a glitch. It doesn't add the attribute to the cart so it would be hard for the owner of the site to know that someone added an upload.
I am reaching out to the devs or anyone else for some help to get this to work.
Here is the code that was used ,
##########BEGIN UPLOAD HACK#############
$real_ids = isset($_POST['id']) ? $_POST['id'] : "";
if (isset($_GET['number_of_uploads']) && $_GET['number_of_uploads'] > 0) {
/**
* Need the upload class for attribute type that allows user uploads.
*
*/
include(DIR_WS_CLASSES . 'upload.php');
for ($i = 1, $n = $_GET['number_of_uploads']; $i <= $n; $i++) {
if (zen_not_null($_FILES['id']['tmp_name'][TEXT_PREFIX . $_POST[UPLOAD_PREFIX . $i]]) and ($_FILES['id']['tmp_name'][TEXT_PREFIX . $_POST[UPLOAD_PREFIX . $i]] != 'none')) {
$products_options_file = new upload('id');
$products_options_file->set_destination(DIR_FS_UPLOADS);
$products_options_file->set_output_messages('session');
if ($products_options_file->parse(TEXT_PREFIX . $_POST[UPLOAD_PREFIX . $i])) {
$products_image_extension = substr($products_options_file->filename, strrpos($products_options_file->filename, '.'));
//Arch 04/2007 - to add product name to uploaded file
$prod_image_name = substr($products_options_file->filename, 0,-4);
//eof
if ($_SESSION['customer_id']) {
$db->Execute("insert into " . TABLE_FILES_UPLOADED . " (sesskey, customers_id, files_uploaded_name) values('" . zen_session_id() . "', '" . $_SESSION['customer_id'] . "', '" . zen_db_input($products_options_file->filename) . "')");
} else {
$db->Execute("insert into " . TABLE_FILES_UPLOADED . " (sesskey, files_uploaded_name) values('" . zen_session_id() . "', '" . zen_db_input($products_options_file->filename) . "')");
}
$insert_id = $db->Insert_ID() . $prod_image_name ;
$real_ids[TEXT_PREFIX . $_POST[UPLOAD_PREFIX . $i]] = $insert_id . ". " . $products_options_file->filename;
$products_options_file->set_filename("$insert_id" . $products_image_extension);
if (!($products_options_file->save())) {
break;
}
} else {
break;
}
} else { // No file uploaded -- use previous value
$real_ids[TEXT_PREFIX . $_POST[UPLOAD_PREFIX . $i]] = $_POST[TEXT_PREFIX . UPLOAD_PREFIX . $i];
}
}
//$this->add_cart($_POST['products_id'], $this->get_quantity(zen_get_uprid($_POST['products_id'], $real_ids))+($new_qty), $real_ids);
}
##########END UPLOAD HACK#############
If someone has any Ideas please let us know, Thanks!
Re: Product Attribute Grid
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/ha...erimeter-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/ha...rimeter-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/ha...rimeter-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..
Re: Product Attribute Grid - Remove stock level from attribute
Hi There
Forgive me is this has been asked before, I can't find it though! How can I remove the "xxx in stock" beneath every attribute on the grid? Been trying everything but not winning.
Thanks
Cliff
Re: Product Attribute Grid - Remove stock level from attribute
It took me a while but I found it!
Quote:
Originally Posted by
cliffvt
How can I remove the "xxx in stock" beneath every attribute on the grid?
In the file /includes/languages/english/extra_definitions/absolute_attribute_grid.php
I changed the line:
Code:
define('TEXT_ATTRIBUTE_GRID_IN_STOCK', '%s in stock' ); //MUST CONTAIN %s AS THIS IS REPLACED WITH STOCK LEVEL
to
Code:
define('TEXT_ATTRIBUTE_GRID_IN_STOCK', 'Qty/Amt?' );
In this case it now displays the input box with the words "Qty/Amt?" underneath, which is acutally quite nifty!
http://choirtickets.co.uk/images/qty.gif
Cheers
Cliff
Re: Product Attribute Grid
I am creating a zen cart site for a coin selling company.
I am using the latest zencart/addon versions.
The addons I am having problems with are Product Attribute Grid and Stock by Attributes.
The problem is this:
They sell coins of different years in different conditions.
So, a products attributes might look like this...
------Good Fine
1857 ____ ____
1860 ____ ____
Now how do I price each attribute generated by the grid in a unique price? Pricing by the year and condition values, will not work because the prices are not consistent across the grid.
Thank you for your help.
Re: Product Attribute Grid
Forgot to also ask:
Is it possible to have multiple attribute grids per product?
Example:
------Good Fine
1857 ____ ____
1860 ____ ____
------Cent Rolls
1857 ____
1860 ____
Re: Product Attribute Grid
I've been using this mod for sometime and love it, I have a quick question, I sell shirts, I have the sizes on the top rows and the colors on the sides, some of my shirts have 27 colors, if you scroll to the bottom colors you have to scroll back up to find the row with your size.
my question is there a way to make the top header row repeat say every 10th row?
thank you again for your help.
Re: Product Attribute Grid
Sorry for a newbie question...I am trying to integrate the latest version of this mod (1.1.1) into my ZC (1.3.8a) as per 'INSTALL README.txt', but I still do not see the grid when I visit a product that has different colors and sizes as its attributes. Here is the list of files that I installed:
YOUR_TEMPLATE = arch_shoppe
includes/templates/arch_shoppe/templates/tpl_modules_attributes.php
includes/templates/arch_shoppe/templates/tpl_product_info_display.php
*** I did not have includes/modules/arch_shoppe dir, so created one ***
includes/modules/arch_shoppe/attributes.php
includes/templates/template_default/buttons/english/attribute_out_of_stock.gif
includes/languages/english/extra_definitions/absolute_attribute_grid.php
includes/extra_cart_actions/absolute_products_with_attributes.php
Would appreciate any help.
Thanks,
Nishi
Re: Product Attribute Grid
Ok I am setting up Zen Cart for a Cafe and I have a problem with this mod. I installed it successfully and got the quantity boxes to appear. I am using it for a bagel by the dozen product. I have two attributes, a drop down to choose from 1/2 dozen and dozen with the price for each. The second attribute is the type and quantities for the bagels. In other words how many plain, raisin, and so on.
The problem is that when you put a number in the quantity box and then add to cart, it adds 2 1/2 dozen for example. Is there any way to work around this. I just want the customer to be able to choose how many of each bagel. Am I using the mod wrong?
Any help would be greatly appreciated.
Re: Product Attribute Grid