pfilias Posted February 26, 2008 Share Posted February 26, 2008 Thanks to a friend of mine, locally, I think he's found the perfect merging of that code for /includes/functions/general.php. function tep_get_products_stock($products_id, $attributes=array()) { global $languages_id; global $pfs; $stock = false; if (is_object($pfs)) { $stock = $pfs->getStock($products_id); } if ($stock !== false) { return $stock; } else { $products_id = tep_get_prid($products_id); if (sizeof($attributes)>0) { $all_nonstocked = true; $attr_list=''; $options_list=implode(",",array_keys($attributes)); $track_stock_query=tep_db_query("select products_options_id, products_options_track_stock from " . TABLE_PRODUCTS_OPTIONS . " where products_options_id in ($options_list) and language_id= '" . (int)$languages_id . "order by products_options_id'"); while($track_stock_array=tep_db_fetch_array($track_stock_query)) { if ($track_stock_array['products_options_track_stock']) { $attr_list.=$track_stock_array['products_options_id'] . '-' . $attributes[$track_stock_array['products_options_id']] . ','; $all_nonstocked=false; } } $attr_list=substr($attr_list,0,strlen($attr_list)-1); } if ((sizeof($attributes)==0) | ($all_nonstocked)) { $stock_query = tep_db_query("select products_quantity as quantity from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'"); } else { $stock_query=tep_db_query("select products_stock_quantity as quantity from " . TABLE_PRODUCTS_STOCK . " where products_id='". (int)$products_id . "' and products_stock_attributes='$attr_list'"); } if (tep_db_num_rows($stock_query)>0) { $stock=tep_db_fetch_array($stock_query); $quantity=$stock['quantity']; } else { $quantity = 0; } return $quantity; } } Quote Link to comment Share on other sites More sharing options...
pfilias Posted March 2, 2008 Share Posted March 2, 2008 Hello friends. I've got QT Pro 4.3a installed on RC2a, alongside with mod that does the Quantity Price Breaks Per Product. If I have only 1 attribute for a product, the out of stock functionality that doesn't allow you to add the product to your cart is working. However, if you are on a product that has 4 sizes, for example, and some of them are out of stock, it will still let you add the out of stock products to your site. Example: S - in stock M - in stock L - out of stock XL - out of stock XXL - out of stock If you try to order the L, it will let you. On the other hand, if you have a hat that is One Size Fits All, and you have the stock set to 0, it prevents you from adding item to your cart by throwing up the JavaScript window as well as already displaying the text that you can't order the product. Here is the piece of my product_info.php that has this logic. I don't think I've missed anything: <tr class="productListing-heading"> <td colspan="2"><strong><?php echo TEXT_PRODUCT_AVAILABILITY; ?></strong></td> </tr> <tr class="productListing-even"> <td height="10" colspan="2" align="left" valign="top" class="main"> <?php if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) { echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); } else { echo TEXT_PRODUCT_AVAILABLE; } ?></td> </tr> <tr > <td class="productListing-heading"><strong><?php echo SKU; ?></strong></td> <td class="productListing-heading"><strong><?php echo PRICING; ?></strong></td> </tr> <tr class="productListing-even"> <td height="10" align="left" valign="top" class="main"><?php echo $product_info['products_model'] ?></td> <td height="10" align="left" valign="top" class="main"><?php echo $products_price; ?></td> </tr> <tr class="productListing-heading"> <td colspan="2"><strong><?php echo TEXT_PRODUCT_OPTIONS; ?></strong></td> </tr> <tr class="productListing-even"> <td height="10" colspan="2" align="left" valign="top"> <?php $products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'"); $products_attributes = tep_db_fetch_array($products_attributes_query); if ($products_attributes['total'] > 0) { //++++ QT Pro: Begin Changed code $products_id=(preg_match("/^\d{1,10}(\{\d{1,10}\}\d{1,10})*$/",$HTTP_GET_VARS['products_id']) ? $HTTP_GET_VARS['products_id'] : (int)$HTTP_GET_VARS['products_id']); require(DIR_WS_CLASSES . 'pad_' . PRODINFO_ATTRIBUTE_PLUGIN . '.php'); $class = 'pad_' . PRODINFO_ATTRIBUTE_PLUGIN; $pad = new $class($products_id); echo $pad->draw(); //++++ QT Pro: End Changed Code } ?> </td> </tr> <tr class="productListing-heading"> <td colspan="2"><strong><?php echo TEXT_ENTER_QUANTITY; ?></strong></td> </tr> <tr class="productListing-even"> <td height="10" align="center" valign="middle"><?php echo tep_draw_input_field('cart_quantity', $pf->adjustQty(1), 'size="6"'); ?></td> <td height="10" align="center" valign="middle"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td> </tr> </table> Quote Link to comment Share on other sites More sharing options...
pfilias Posted March 2, 2008 Share Posted March 2, 2008 (edited) I wonder if "attempt" to change general.php is actually breaking the way QT Pro is supposed to work. It's a few posts above, where a friend of mine helped me to get QT Pro working, but maybe it's not really working. Any help would be appreciated. NOTE: It is definitely a conflict between the Quantity Pricing contribution and QT Pro. global $pfs; $stock = false; if (is_object($pfs)) { $stock = $pfs->getStock($products_id); } if ($stock !== false) { return $stock; } else { The above code is setting a stock level before (or overtaking) the stock level that is being set by QT Pro. I need to get these to work together. :( Edited March 2, 2008 by pfilias Quote Link to comment Share on other sites More sharing options...
pfilias Posted March 2, 2008 Share Posted March 2, 2008 (edited) I was able to make this work with the following code block in includes/functions/general.php (notice bolded text): //// // Return a product's stock // TABLES: products //++++ QT Pro: Begin Changed code as well as Price Break per Quantity function tep_get_products_stock($products_id, $attributes=array()) { global $languages_id; global $pfs; $stock = false; if (is_object($pfs)) { $stock = $pfs->getStock($products_id); } // Make this work with QT Pro // if ($stock !== false) { // return $stock; // } else { $products_id = tep_get_prid($products_id); if (sizeof($attributes)>0) { $all_nonstocked = true; $attr_list=''; $options_list=implode(",",array_keys($attributes)); $track_stock_query=tep_db_query("select products_options_id, products_options_track_stock from " . TABLE_PRODUCTS_OPTIONS . " where products_options_id in ($options_list) and language_id= '" . (int)$languages_id . "order by products_options_id'"); while($track_stock_array=tep_db_fetch_array($track_stock_query)) { if ($track_stock_array['products_options_track_stock']) { $attr_list.=$track_stock_array['products_options_id'] . '-' . $attributes[$track_stock_array['products_options_id']] . ','; $all_nonstocked=false; } } $attr_list=substr($attr_list,0,strlen($attr_list)-1); } if ((sizeof($attributes)==0) | ($all_nonstocked)) { $stock_query = tep_db_query("select products_quantity as quantity from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'"); } else { $stock_query=tep_db_query("select products_stock_quantity as quantity from " . TABLE_PRODUCTS_STOCK . " where products_id='". (int)$products_id . "' and products_stock_attributes='$attr_list'"); } if (tep_db_num_rows($stock_query)>0) { $stock=tep_db_fetch_array($stock_query); $quantity=$stock['quantity']; } else { $quantity = 0; } return $quantity; // end QT Pro and Price Break per Quantity Mods } // } // End Make this work with QT Pro Edited March 2, 2008 by pfilias Quote Link to comment Share on other sites More sharing options...
PJ2006 Posted March 3, 2008 Share Posted March 3, 2008 I'm installing this at the moment and have a problem with some of the merges. //++++ QT Pro: Begin Changed code $contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id . '&action=new_product') . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id . '&action=delete_product') . '">' . tep_image_button('button_delete.gif', IMAGE_DELETE) . '</a> <a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id . '&action=move_product') . '">' . tep_image_button('button_move.gif', IMAGE_MOVE) . '</a> <a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id . '&action=copy_to') . '">' . tep_image_button('button_copy_to.gif', IMAGE_COPY_TO) . '</a><a href="' . tep_href_link("stock.php", 'product_id=' . $pInfo->products_id) . '">' . tep_image_button('button_stock.gif', "Stock") . '</a>'); //++++ QT Pro: End Changed Code in catalog\admin\categories.php I have this code already changed for ultrapics: //BOF UltraPics $contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id . '&action=new_product') . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id . '&action=delete_product') . '">' . tep_image_button('button_delete.gif', IMAGE_DELETE) . '</a> <a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id . '&action=move_product') . '">' . tep_image_button('button_move.gif', IMAGE_MOVE) . '</a> <a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id . '&action=copy_to') . '">' . tep_image_button('button_copy_to.gif', IMAGE_COPY_TO) . '</a> <a target="_blank" href="' . HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'product_info.php?products_id=' . $pInfo->products_id . '">' . tep_image_button('button_preview.gif', IMAGE_PREVIEW) . '</a>'); //EOF UltraPics Could you tell me how to merge this so both contributions work? Thanks Quote Link to comment Share on other sites More sharing options...
Andyy Posted March 4, 2008 Share Posted March 4, 2008 I have added the QTprov4.3a - But when I purchase a product it will not change the product qty or the attribute qty when I view the stock report in admin. I setup the default oscommerce-2.2rc1 and followed instructions to add the QTprov4.3a on my local computer with a clean install. When viewing the stock report page after a test purchase of one product and one attribute. I see a highlighted bar under the product name that says "Value 8mg -1 $349.99" But the product qty has not deducted by 1 and the attribute qty did not deduct by 1 as I would have expected. Does your copy work by deducting the qty of the product and attribute? Is there anything I have missed in the setup that anyone could point their finger at? Any help would be much apreciated Regards Andrew Quote Link to comment Share on other sites More sharing options...
k2tec Posted March 6, 2008 Share Posted March 6, 2008 I have added the QTprov4.3a - But when I purchase a product it will not change the product qty or the attribute qty when I view the stock report in admin. I setup the default oscommerce-2.2rc1 and followed instructions to add the QTprov4.3a on my local computer with a clean install. When viewing the stock report page after a test purchase of one product and one attribute. I see a highlighted bar under the product name that says "Value 8mg -1 $349.99" But the product qty has not deducted by 1 and the attribute qty did not deduct by 1 as I would have expected. Does your copy work by deducting the qty of the product and attribute? Is there anything I have missed in the setup that anyone could point their finger at? Any help would be much apreciated Regards Andrew I made a small mistake in the contri. '<a href="' . tep_href_link(FILENAME_STATS_LOW_STOCK, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_REPORTS_STOCK_LEVEL . '</a>'); to '<a href="' . tep_href_link(FILENAME_STOCK, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_REPORTS_STOCK_LEVEL . '</a>'); here is a other thing if you want to changes it. The prices without ( ) Changes in catalog/include/classes/pad_base.php line: $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $currencies->display_price( $show_price, tep_get_tax_rate($this->products_tax_class_id)) .') '; // note $this variable //HW: THIS WAS BROKEN - tax class ID was being used as the tax rate.. so a fixed 8 percent in my case. to $products_options_array[sizeof($products_options_array)-1]['text'] .= ' ' . $currencies->display_price( $show_price, tep_get_tax_rate($this->products_tax_class_id)) .' '; // note $this variable //HW: THIS WAS BROKEN - tax class ID was being used as the tax rate.. so a fixed 8 percent in my case. or $products_options_array[sizeof($products_options_array)-1]['text'] .= ' ' . $currencies->display_price( $show_price, tep_get_tax_rate($this->products_tax_class_id)) .' '; // note $this variable //HW: THIS WAS BROKEN - tax class ID was being used as the tax rate.. so a fixed 8 percent in my case. enjoy Tom Quote Link to comment Share on other sites More sharing options...
Andyy Posted March 6, 2008 Share Posted March 6, 2008 In your copy when a sale is made does it deduct the sale qty of the product total And does it also deduct the qty from the attribute total in stats_low_stock_attrib.php? I cannot get this to work properly? When I make a purchase of 5 products this contribution increases the product original qty total when I view stats_low_stock_attrib.php Something is seriously wrong with the code. Andrew Quote Link to comment Share on other sites More sharing options...
k2tec Posted March 7, 2008 Share Posted March 7, 2008 In your copy when a sale is made does it deduct the sale qty of the product total And does it also deduct the qty from the attribute total in stats_low_stock_attrib.php? I cannot get this to work properly? When I make a purchase of 5 products this contribution increases the product original qty total when I view stats_low_stock_attrib.php Something is seriously wrong with the code. Andrew Did you made the stock setting in configuration, true, true, true or false, ****, number low stock setting. In artikel options track stock on true. Tom Quote Link to comment Share on other sites More sharing options...
Andyy Posted March 7, 2008 Share Posted March 7, 2008 Did you made the stock setting in configuration, true, true, true or false, ****, number low stock setting.In artikel options track stock on true. Tom Hi Tom I think I am missing something? Where should I find "artikel options" to set "track stock" on "true" ?? Here are my Product Information settings from admin > configuration Here are my Stock settings from from admin > configuration And here are my Attribute Product Options settings from admin > Catalog > Products Attributes Regards Andrew Quote Link to comment Share on other sites More sharing options...
k2tec Posted March 7, 2008 Share Posted March 7, 2008 Hi TomI think I am missing something? Where should I find "artikel options" to set "track stock" on "true" ?? Here are my Product Information settings from admin > configuration Here are my Stock settings from from admin > configuration And here are my Attribute Product Options settings from admin > Catalog > Products Attributes Regards Andrew The settings are oke. do you get this for stock repport did you install the SQL oke , ones I installed the config.sql before the newinstall.sql it did not worked. I have download the contri once more and installed on a frish Osc. and it runned. I do'nt know what is wrong with yours. Tom Quote Link to comment Share on other sites More sharing options...
pfilias Posted March 7, 2008 Share Posted March 7, 2008 (edited) PJ, Are you saying you need the merged code for UltraPics and QT Pro? If so, here is that code: $contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id . '&action=new_product') . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id . '&action=delete_product') . '">' . tep_image_button('button_delete.gif', IMAGE_DELETE) . '</a> <a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id . '&action=move_product') . '">' . tep_image_button('button_move.gif', IMAGE_MOVE) . '</a> <a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id . '&action=copy_to') . '">' . tep_image_button('button_copy_to.gif', IMAGE_COPY_TO) . '</a> <a target="_blank" href="' . HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'product_info.php?products_id=' . $pInfo->products_id . '">' . tep_image_button('button_preview.gif', IMAGE_PREVIEW) . '</a> <a href="' . tep_href_link("stock.php", 'product_id=' . $pInfo->products_id) . '">' . tep_image_button('button_stock.gif', "Stock") . '</a>'); Edited March 7, 2008 by pfilias Quote Link to comment Share on other sites More sharing options...
PJ2006 Posted March 7, 2008 Share Posted March 7, 2008 PJ, Are you saying you need the merged code for UltraPics and QT Pro? If so, here is that code: $contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id . '&action=new_product') . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id . '&action=delete_product') . '">' . tep_image_button('button_delete.gif', IMAGE_DELETE) . '</a> <a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id . '&action=move_product') . '">' . tep_image_button('button_move.gif', IMAGE_MOVE) . '</a> <a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id . '&action=copy_to') . '">' . tep_image_button('button_copy_to.gif', IMAGE_COPY_TO) . '</a> <a target="_blank" href="' . HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'product_info.php?products_id=' . $pInfo->products_id . '">' . tep_image_button('button_preview.gif', IMAGE_PREVIEW) . '</a> <a href="' . tep_href_link("stock.php", 'product_id=' . $pInfo->products_id) . '">' . tep_image_button('button_stock.gif', "Stock") . '</a>'); Thank you so much, that's exactly what I needed! Quote Link to comment Share on other sites More sharing options...
miniwangja Posted March 13, 2008 Share Posted March 13, 2008 Dear Experts, SERIOUS HELP NEEDED. Gotta hunt down this trouble maker! I have tried installing 4.3 and 4.3a on RC1 both fresh and manual and tried to figure out which file is causing the problem but couln't figure it out. In both cases, the QTpro loses the attribute option when the product is added to the shopping cart. QTpro does function correctly on product_info.php showing both option and out of stock states. However, when the item is added to shopping cart, the shopping cart doesn't recognize option and adds product without option. I am using all of QTpro4.3/a included files minus language files on non-admin side to troubleshoot but it doesn't make any difference. Is it just me? .......can't be! If anybody has solution to this problem, any help will be greatly appreciated! thank you! dan Quote Link to comment Share on other sites More sharing options...
Andyy Posted March 13, 2008 Share Posted March 13, 2008 I was only able to get everything working correctly by setting up the following on a clean install osCms2 QT Pro V4.2 Ralph Day 15 Apr 2005 Quote Link to comment Share on other sites More sharing options...
Guest Posted March 14, 2008 Share Posted March 14, 2008 Dear Experts, SERIOUS HELP NEEDED. Gotta hunt down this trouble maker! I have tried installing 4.3 and 4.3a on RC1 both fresh and manual and tried to figure out which file is causing the problem but couln't figure it out. In both cases, the QTpro loses the attribute option when the product is added to the shopping cart. QTpro does function correctly on product_info.php showing both option and out of stock states. However, when the item is added to shopping cart, the shopping cart doesn't recognize option and adds product without option. I am using all of QTpro4.3/a included files minus language files on non-admin side to troubleshoot but it doesn't make any difference. Is it just me? .......can't be! If anybody has solution to this problem, any help will be greatly appreciated! thank you! dan Trying using the multiple or sequenced dropdown. I am having the same issue when using the single dropdown. Cal Quote Link to comment Share on other sites More sharing options...
miniwangja Posted March 14, 2008 Share Posted March 14, 2008 Trying using the multiple or sequenced dropdown. I am having the same issue when using the single dropdown.Cal Dear modernm Thank you so much for the somewhat odd solution! It is working correctly now! it is including attributes to cart and taking off inventory. I would have Never thought of trying that option. I almost gave up on this and i was just using oscommerce without attribute inventory system and i had a crazy thought of installing new shop with MS2.2.today. You are my hero. You saved me. Thank you Dan Quote Link to comment Share on other sites More sharing options...
Guest Posted March 14, 2008 Share Posted March 14, 2008 Dear modernm Thank you so much for the somewhat odd solution! It is working correctly now! it is including attributes to cart and taking off inventory. I would have Never thought of trying that option. I almost gave up on this and i was just using oscommerce without attribute inventory system and i had a crazy thought of installing new shop with MS2.2.today. You are my hero. You saved me. Thank you Dan No problem. The funny thing is I am not even using oSCommerce. I converted the module to ZenCart and everything works fine except that. I for the life of me could not figure it out. Figured I would check here and it looks like I am not crazy. Anyone know what is different about the single_dropdown in the way it posts to the cart? Cal Quote Link to comment Share on other sites More sharing options...
k2tec Posted March 14, 2008 Share Posted March 14, 2008 No problem. The funny thing is I am not even using oSCommerce. I converted the module to ZenCart and everything works fine except that. I for the life of me could not figure it out. Figured I would check here and it looks like I am not crazy. Anyone know what is different about the single_dropdown in the way it posts to the cart? Cal Today i had the first problem with 4.3a on a new install and made the next changes in catalog\includes\application_top.php old frish install line 360 case 'add_product' : if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) { $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+1, $HTTP_POST_VARS['id']); new //++++ QT Pro: Begin Changed code $attributes=array(); if (isset($HTTP_POST_VARS['attrcomb']) && (preg_match("/^\d{1,10}-\d{1,10}(,\d{1,10}-\d{1,10})*$/",$HTTP_POST_VARS['attrcomb']))) { $attrlist=explode(',',$HTTP_POST_VARS['attrcomb']); foreach ($attrlist as $attr) { list($oid, $oval)=explode('-',$attr); if (is_numeric($oid) && $oid==(int)$oid && is_numeric($oval) && $oval==(int)$oval) $attributes[$oid]=$oval; } } if (isset($HTTP_POST_VARS['id']) && is_array($HTTP_POST_VARS['id'])) { foreach ($HTTP_POST_VARS['id'] as $key=>$val) { if (is_numeric($key) && $key==(int)$key && is_numeric($val) && $val==(int)$val) $attributes=$attributes + $HTTP_POST_VARS['id']; } } $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $attributes))+1, $attributes); //++++ QT Pro: End Changed Code I hope this helps Tom Quote Link to comment Share on other sites More sharing options...
Guest Posted March 15, 2008 Share Posted March 15, 2008 Today i had the first problem with 4.3a on a new install and made the next changes in catalog\includes\application_top.php old frish install line 360 case 'add_product' : if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) { $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+1, $HTTP_POST_VARS['id']); new //++++ QT Pro: Begin Changed code $attributes=array(); if (isset($HTTP_POST_VARS['attrcomb']) && (preg_match("/^\d{1,10}-\d{1,10}(,\d{1,10}-\d{1,10})*$/",$HTTP_POST_VARS['attrcomb']))) { $attrlist=explode(',',$HTTP_POST_VARS['attrcomb']); foreach ($attrlist as $attr) { list($oid, $oval)=explode('-',$attr); if (is_numeric($oid) && $oid==(int)$oid && is_numeric($oval) && $oval==(int)$oval) $attributes[$oid]=$oval; } } if (isset($HTTP_POST_VARS['id']) && is_array($HTTP_POST_VARS['id'])) { foreach ($HTTP_POST_VARS['id'] as $key=>$val) { if (is_numeric($key) && $key==(int)$key && is_numeric($val) && $val==(int)$val) $attributes=$attributes + $HTTP_POST_VARS['id']; } } $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $attributes))+1, $attributes); //++++ QT Pro: End Changed Code I hope this helps Tom Can you explain the change? It would be a big help in porting the fix over to Zen Cart. Thanks, Cal Quote Link to comment Share on other sites More sharing options...
k2tec Posted March 15, 2008 Share Posted March 15, 2008 Can you explain the change? It would be a big help in porting the fix over to Zen Cart.Thanks, Cal I seen this problem after reading this topic, because I did not run over the complet site. After testing it with the shopping cart I so my fault. I will put the complet file tomorrow as contri. Sorry sorry. In my shop everything is working oke with multi pulldown and single_radioset stock is working correctly. With a lot other contri. If there are problems you can ask me. Tom Quote Link to comment Share on other sites More sharing options...
Andyy Posted March 17, 2008 Share Posted March 17, 2008 I seen this problem after reading this topic, because I did not run over the complet site. After testing it with the shopping cart I so my fault. I will put the complet file tomorrow as contri. Sorry sorry. In my shop everything is working oke with multi pulldown and single_radioset stock is working correctly. With a lot other contri. If there are problems you can ask me. Tom Tom. I have just done a complete new install of the QTPro4.3b and oaC2.2rc1. I still have the problem that when a purchase is made the system will not deduct the purchase from the product total and will not deduct the purchase from the attribute total. This is my stock result after one purchase I can only get everything working correctly by setting up the following on a clean install so I know my installation procedure is not at fault !! osCms2 QT Pro V4.2 Ralph Day 15 Apr 2005 Regards Andrew Quote Link to comment Share on other sites More sharing options...
k2tec Posted March 17, 2008 Share Posted March 17, 2008 Tom. I have just done a complete new install of the QTPro4.3b and oaC2.2rc1.I still have the problem that when a purchase is made the system will not deduct the purchase from the product total and will not deduct the purchase from the attribute total. This is my stock result after one purchase I can only get everything working correctly by setting up the following on a clean install so I know my installation procedure is not at fault !! <a href="http://downloads.sourceforge.net/tep/oscommerce-2.2ms2-060817.zip?modtime=1155775492&big_mirror=0" target="_blank">osCms2 </a> QT Pro V4.2 Ralph Day 15 Apr 2005 Regards Andrew To everybody. Do not forget to set your stock on categorie / product for every option otherwise you get the message out of stock. Tom Quote Link to comment Share on other sites More sharing options...
grazianno Posted March 17, 2008 Share Posted March 17, 2008 hi, i have installed this addons in my oscommerce and the button Update doesn't work on IE , works only on Firefix, but when i remove this code , the button work: </form><tr> <td><br><?php if (CARTSHIP_ONOFF == 'Enabled') { require(DIR_WS_MODULES . 'shipping_estimator.php'); } else {}; ?></td> </tr> url : http://216.92.94.120/shopping_cart.php thx. Quote Link to comment Share on other sites More sharing options...
grazianno Posted March 18, 2008 Share Posted March 18, 2008 wrong forum sorry. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.