Jump to content

king_of_comedy

Members
  • Content count

    15
  • Joined

  • Last visited

2 Followers

About king_of_comedy

  • Birthday 11/09/1980

Profile Information

  • Real Name
    Chris
  • Gender
    Male
  • Location
    germany
  1. This is the support thread for Different Supplier prices for each Product http://addons.oscommerce.com/info/2801 About this Contrib: I was looking for a contrib to enter multiple vendors and their Informations for each Product. All other contribs didn´t fit my needs an so i tried to bild this one. For every of your Vendor / Supplier you can add Informations like: - Price - Model No. - Minimum order Qty - Qty Blocks - direct URL for the Product at your vendors Homepage - Comment for each Product seperatly. This contrib is based on SPPC and New Improved OrderList. Both can still be used beside this contrib. CHANGELOG V2.2a Fixed some bugs (categories & language files) V2.2 Updated suppliers.php to enter more Informations from your Vendor (Adress, Tel, Fax, mail, etc) V 2.1 Changed New Improved OrderList to build a Report like Supplier / Vendor Orderlist. English language added. Screenshot included. To Do - Feature to add checkboxes and Qty Input fields to the orderlist to select the vender you will order The Products from. - At the end it should generate for each Vendor a Orderlist (txt or PDF). - For Products without a supplier there should be a vendor selection dropdown with qty input to order them manualy.
  2. I just try to fit this contributen for my needs an need some help. Actual I´m displaying the Product Attributes in the shop as a list with a Quantity Boxes - some kind of add multiple products to cart at once. I want the same for the QTpro contrib but now i´m stuck. I´m using the QT stock table display to get this to work. Inserting a model Number for each attribute combination wasnßt that difficult but trying to get quantity Boxes to bulk buy the attributes is a bit different :blush: This is the code to add multiple attributes with quantity to cart in application_top: case 'add_mult' : if (is_array($HTTP_POST_VARS['a'])){ reset($HTTP_POST_VARS['quantity']); reset($HTTP_POST_VARS['a']); $x=0; if (is_array($HTTP_POST_VARS['a'])){ foreach(($HTTP_POST_VARS['a']) as $key => $value){ $c = array((int)$HTTP_POST_VARS['b'] => (int)$value); if (is_array($HTTP_POST_VARS['quantity'])){ $qty = (int)$HTTP_POST_VARS['quantity'][$x]; $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], ($c)))+($qty),($c)); $x++; } } } } else { 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']); } } tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters))); break; and in the product_info: <?php echo $products_options['products_options_values_name']; echo tep_draw_hidden_field('a[]', $products_options['products_options_values_id']); echo tep_draw_hidden_field('b',$products_options_name['products_options_id']); ?> ... but to get it work with QTpro i have to merge it with this: case 'add_product' : if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) { //++++ 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 } tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters))); break; Has onyone an idea how to merge these codes?
  3. king_of_comedy

    show only subcategories

    Try this: function show_subcategories($counter) { global $fooa, $subcategories_string, $id, $HTTP_GET_VARS; $cPath_new = 'cPath=' . $fooa[$counter]['path']; $subcategories_string .= '<table border="0" cellspacing="1" cellpadding="1" width="100%"><tr><td nowrap class="boxTextc' . $fooa[$counter]['level'] . '"> '; $subcategories_string .= '<a class="boxTextd' . $fooa[$counter]['level'] . '" href="'; $subcategories_string .= tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">'; // display category name $subcategories_string .= $fooa[$counter]['name']; $subcategories_string .= '</a> '; if ($fooa[$counter]['next_id']) { $subcategories_string .= '</td></tr></table>'; show_subcategories($fooa[$counter]['next_id']); }else{ $subcategories_string .= '</td></tr></table>'; } } ?> <!-- categories //--> <tr> <td> <?php if ($cPath) { $subcategories_string = ''; $new_path = ''; $id = split('_', $cPath); reset($id); while (list($key, $value) = each($id)) { unset($prev_id); unset($first_id); $subcategories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . $value . "' and c.categories_id = cd.categories_id and cd.language_id='" . $languages_id ."' order by sort_order, cd.categories_name"); $subcategory_check = tep_db_num_rows($subcategories_query); if ($subcategory_check > 0) { $new_path .= $value; while ($row = tep_db_fetch_array($subcategories_query)) { $fooa[$row['categories_id']] = array( 'name' => $row['categories_name'], 'parent' => $row['parent_id'], 'level' => $key+1, 'path' => $new_path . '_' . $row['categories_id'], 'next_id' => false ); if (isset($prev_id)) { $fooa[$prev_id]['next_id'] = $row['categories_id']; } $prev_id = $row['categories_id']; if (!isset($first_id)) { $first_id = $row['categories_id']; } $last_id = $row['categories_id']; } $fooa[$last_id]['next_id'] = $fooa[$value]['next_id']; $fooa[$value]['next_id'] = $first_id; $new_path .= '_'; } else { break; } } } if ($id[0] != ''){ show_subcategories($id[0]); echo $subcategories_string; }else{ echo " "; } ?> </td> </tr> <!-- categories_eof //-->
  4. king_of_comedy

    McGrath's Attributes Sorter Copier Install

    Hello, just a question. Could it be possible to integrate a Tabmenue for the product attributes when inserting a product in the admin/categories.php? Something like this: I tried it with a js Script but that hasn't worked. He showed me the tabs but still among themselves. How culd it be realized? I Think that would be very usefull if you have a lot of attributes and dont want to scoll down hours and hours. Bye Christian
×