Jump to content

nervens?ge

Members
  • Content count

    53
  • Joined

  • Last visited

Everything posted by nervens?ge

  1. nervens?ge

    Master Products - MS2

    fsk 18 contrieb orginal: case 'PRODUCT_LIST_BUY_NOW': $lc_align = 'center'; //FSK 18 if ($listing['products_fsk_18'] == '1') { $lc_text = tep_image_button('fsk18.gif', ''); if (tep_session_is_registered('customer_id')) { if ($customer['customers_fsk_18'] == 1) { $lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> '; } } } else { $lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> '; } //FSK 18 EOF break; orginal master 1.1.5 case 'PRODUCT_LIST_BUY_NOW': $lc_align = 'center'; //Master Products if ($listing['products_master_status'] != '1' && $listing['products_master'] == '0') { $lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> '; } elseif ($listing['products_master'] != '0') { $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_master']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> '; } else { $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> '; } //Master Products EOF break; my test: case 'PRODUCT_LIST_BUY_NOW': $lc_align = 'center'; //Master Products if ($listing['products_master_status'] != '1' && $listing['products_master'] == '0') { //FSK 18 if ($listing['products_fsk_18'] == '1') { $lc_text = tep_image_button('fsk18.gif', ''); if (tep_session_is_registered('customer_id')) { if ($customer['customers_fsk_18'] == 1) { $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_master']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> '; } } } else { $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_master']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> '; } //FSK 18 EOF } else { //FSK 18 if ($listing['products_fsk_18'] == '1') { $lc_text = tep_image_button('fsk18.gif', ''); if (tep_session_is_registered('customer_id')) { if ($customer['customers_fsk_18'] == 1) { $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> '; } } } else { $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> '; } //FSK 18 EOF } //Master Products EOF break; fsk 18 works, masterproduct works but the normal products works not, i became product ID = 0 whats wrong ( i am from germany and my english is bad )
  2. nervens?ge

    NEW! Complete Order Editing Tool!

    is the same error :-(
  3. nervens?ge

    NEW! Complete Order Editing Tool!

    I use oscommerce with joomla/mambo and all my variable are $_REQUEST in my store this is the way to my order.php http://localhost/xampp/testseiten/joomla/administrator/index2.php?option=com_oscommerce&osMod=orders // Step 1: Choose Category echo '<tr class="dataTableRow"><form action=' . $_SERVER['PHP_SELF'] .'?oID=' . $_GET['oID'] . '&action=' . $_GET['action'] . ' method="POST">' . "\n"; this is the way to my edit_orders.php http://localhost/xampp/testseiten/joomla/administrator/index2.php?oID=6&option=com_escommerce&osMod=edit_orders but when i will add a product in step 3 of the edit_orders.php, so i have this way and its wrong: http://localhost/xampp/testseiten/joomla/administrator/index2.php?oID=6&action=add_product&step=1 the error is here: <form action=' . $_SERVER['PHP_SELF'] .'?oID=' .
  4. can someone me say what can i do to insert a textfield ? i will have a option for my customers, than he can say i will this t-shirt with this text. the contrieb optionstype-feature 1.7.1 have this.
  5. nervens?ge

    Multi-Stores Multiple Shops Support

    i use a store with mutch contriebs (creloaded 6.15 with SPPC/Hide-Products/Price-Break). Now i will add the multistore contrieb in my store but in the mutistore 1.7.1 is to many features insert. ( i have some features in my store ) can i add a basic-version of multistore, i will have only the multistore feature.
  6. nervens?ge

    Seperate Pricing Per Customer v3.5

    i have this code: my problem is after the TABLE_CUSTOMERS $customers_query_raw = "select c.customers_id, c.customers_lastname, c.customers_firstname, c.customers_email_address, a.entry_country_id from " . TABLE_CUSTOMERS . " c, " . TABLE_ADDRESS_BOOK . " a where a.customers_id = c.customers_id and a.address_book_id = c.customers_default_address_id " . $search . $sortorder; // EOM mod and this is the new from sppc 4.11 // BOF customer_sort_admin_v1 adapted for Separate Pricing Per Customer $customers_query_raw = "select c.customers_id, c.customers_lastname, c.customers_firstname, c.customers_email_address, c.customers_group_id, c.customers_group_ra, a.entry_country_id, a.entry_company, cg.customers_group_name from " . TABLE_CUSTOMERS . " c left join " . TABLE_ADDRESS_BOOK . " a on c.customers_id = a.customers_id and c.customers_default_address_id = a.address_book_id left join customers_groups cg on c.customers_group_id = cg.customers_group_id " . $search . " order by $order"; // c.customers_lastname, c.customers_firstname"; this is my idea, is this o.k. ? $customers_query_raw = "select c.customers_id, c.customers_lastname, c.customers_firstname, c.customers_email_address, a.entry_country_id from " . TABLE_CUSTOMERS . " c, " . TABLE_ADDRESS_BOOK . " a where a.customers_id = c.customers_id and a.address_book_id = c.customers_default_address_id " . $search . $sortorder; can one create the new line,please ?
  7. nervens?ge

    Multi-Stores Multiple Shops Support

    I have a big problem i will use your Multi-Stores multiple shop system http://www.oscommerce.com/community/contributions,1730 with the BTS-Design http://www.oscommerce.com/community/contributions,1263 now i will controll my designs in my admin: URL1: www.test1.com is design A or Owner URL2: www.test2.com is design B or Owner have you any ideas ? I am from germany and my english is not so good.
  8. this is a snippet from the applican_top.php orginal $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']); this is the from your contrieb $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 my with sppc-pricebreake //SPPC PRICEBREAK BOF $cart->add_cart($HTTP_POST_VARS['products_id'],$cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'],$HTTP_POST_VARS['id']))+$HTTP_POST_VARS['cart_quantity'], $HTTP_POST_VARS['id']); //SPPC PRICEBREAK EOF what is the right code ?
  9. nervens?ge

    Seperate Pricing Per Customer v3.5

    this is an snippet of my catalog/index.php with the FSK18/SPPC/Hideproduct-Contriebs in this code. //FSK 18 sppc if ($customer['customers_fsk_18'] == 1) { // show the products of a specified manufacturer if (isset($HTTP_GET_VARS['manufacturers_id'])) { if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) { // We are asked to show only a specific category // BOF Separate Pricing Per Customer if ($status_product_prices_table == true) { $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, tmp_pp.products_price, p.products_fsk_18, p.products_fsk_18_hidden, p.products_tax_class_id, IF(tmp_pp.status, tmp_pp.specials_new_products_price, NULL) as specials_new_products_price, IF(tmp_pp.status, tmp_pp.specials_new_products_price, tmp_pp.products_price) as final_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd left join " . $product_prices_table . " as tmp_pp using(products_id), " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "'"; } else { // either retail or no need to get correct special prices $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_fsk_18, p.products_fsk_18_hidden, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS_RETAIL_PRICES . " s on p.products_id = s.products_id where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "'"; } // end else { // either retail... war mal } else { // EOF Separate Pricing Per Customer // We show them all // BOF Separate Pricing Per Customer if ($status_product_prices_table == true) { $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, tmp_pp.products_price, p.products_fsk_18, p.products_fsk_18_hidden, p.products_tax_class_id, IF(tmp_pp.status, tmp_pp.specials_new_products_price, NULL) as specials_new_products_price, IF(tmp_pp.status, tmp_pp.specials_new_products_price, tmp_pp.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . $product_prices_table . " as tmp_pp using(products_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'"; } else { // either retail or no need to get correct special prices $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_fsk_18, p.products_fsk_18_hidden, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m left join " . TABLE_SPECIALS_RETAIL_PRICES . " s on p.products_id = s.products_id where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'"; } // end else { // either retail... // EOF Separate Pricing Per Customer } } else { // show the products in a given categorie if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) { // We are asked to show only specific catgeory // BOF Separate Pricing Per Customer if ($status_product_prices_table == true) { $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, tmp_pp.products_price, p.products_fsk_18, p.products_fsk_18_hidden, p.products_tax_class_id, IF(tmp_pp.status, tmp_pp.specials_new_products_price, NULL) as specials_new_products_price, IF(tmp_pp.status, tmp_pp.specials_new_products_price, tmp_pp.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . $product_prices_table . " as tmp_pp using(products_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'"; } else { // either retail or no need to get correct special prices $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_fsk_18, p.products_fsk_18_hidden, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS_RETAIL_PRICES . " s using(products_id) where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'"; } // end else { // either retail... // EOF Separate Pricing Per Customer } else { // We show them all // BOF Separate Pricing Per Customer if ($status_product_prices_table == true) { $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, tmp_pp.products_price, p.products_fsk_18, p.products_fsk_18_hidden, p.products_tax_class_id, IF(tmp_pp.status, tmp_pp.specials_new_products_price, NULL) as specials_new_products_price, IF(tmp_pp.status, tmp_pp.specials_new_products_price, tmp_pp.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd left join " . $product_prices_table . " as tmp_pp using(products_id), " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'"; } else { // either retail or no need to get correct special prices $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_fsk_18, p.products_fsk_18_hidden, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS_RETAIL_PRICES . " s on p.products_id = s.products_id where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'"; } // end else { // either retail... // EOF Separate Pricing per Customer } } } else { // show the products of a specified manufacturer if (isset($HTTP_GET_VARS['manufacturers_id'])) { if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) { // We are asked to show only a specific category // BOF Separate Pricing Per Customer if ($status_product_prices_table == true) { $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, tmp_pp.products_price, p.products_fsk_18, p.products_tax_class_id, IF(tmp_pp.status, tmp_pp.specials_new_products_price, NULL) as specials_new_products_price, IF(tmp_pp.status, tmp_pp.specials_new_products_price, tmp_pp.products_price) as final_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd left join " . $product_prices_table . " as tmp_pp using(products_id), " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.products_fsk_18_hidden = '0' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "'"; } else { // either retail or no need to get correct special prices $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_fsk_18, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS_RETAIL_PRICES . " s on p.products_id = s.products_id where p.products_status = '1' and p.products_fsk_18_hidden = '0' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "'"; } // end else { // either retail... // EOF Separate Pricing Per Customer } else { // We show them all // BOF Separate Pricing Per Customer if ($status_product_prices_table == true) { $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, tmp_pp.products_price, p.products_fsk_18, p.products_tax_class_id, IF(tmp_pp.status, tmp_pp.specials_new_products_price, NULL) as specials_new_products_price, IF(tmp_pp.status, tmp_pp.specials_new_products_price, tmp_pp.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . $product_prices_table . " as tmp_pp using(products_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and p.products_fsk_18_hidden = '0' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'"; } else { // either retail or no need to get correct special prices $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_fsk_18, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m left join " . TABLE_SPECIALS_RETAIL_PRICES . " s on p.products_id = s.products_id where p.products_status = '1' and p.products_fsk_18_hidden = '0' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'"; } // end else { // either retail... // EOF Separate Pricing Per Customer } } else { // show the products in a given categorie if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) { // We are asked to show only specific catgeory // BOF Separate Pricing Per Customer if ($status_product_prices_table == true) { $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, tmp_pp.products_price, p.products_fsk_18, p.products_tax_class_id, IF(tmp_pp.status, tmp_pp.specials_new_products_price, NULL) as specials_new_products_price, IF(tmp_pp.status, tmp_pp.specials_new_products_price, tmp_pp.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . $product_prices_table . " as tmp_pp using(products_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.products_fsk_18_hidden = '0' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'"; } else { // either retail or no need to get correct special prices $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_fsk_18, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS_RETAIL_PRICES . " s using(products_id) where p.products_status = '1' and p.products_fsk_18_hidden = '0' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'"; } // end else { // either retail... // EOF Separate Pricing Per Customer } else { // We show them all // BOF Separate Pricing Per Customer if ($status_product_prices_table == true) { $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, tmp_pp.products_price, p.products_fsk_18, p.products_tax_class_id, IF(tmp_pp.status, tmp_pp.specials_new_products_price, NULL) as specials_new_products_price, IF(tmp_pp.status, tmp_pp.specials_new_products_price, tmp_pp.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd left join " . $product_prices_table . " as tmp_pp using(products_id), " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1'and p.products_fsk_18_hidden = '0' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'"; } else { // either retail or no need to get correct special prices $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_fsk_18, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS_RETAIL_PRICES . " s on p.products_id = s.products_id where p.products_status = '1'and p.products_fsk_18_hidden = '0' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'"; } // end else { // either retail... // EOF Separate Pricing per Customer } } } //FSK 18 EOF sppc evtl } // BOF Hide products from groups $listing_sql .= " and find_in_set('".$customer_group_id."', products_hide_from_groups) = 0 "; // EOF hide products from group And i will add this, its the Enable+Disable-Categories-Contrieb // show the products of a specified manufacturer if (isset($HTTP_GET_VARS['manufacturers_id'])) { if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) { // We are asked to show only a specific category // ################## Added Enable Disable Categorie ################# // $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "'"; $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id left join " . TABLE_CATEGORIES . " c on p2c.categories_id = c.categories_id where c.categories_status = '1' and p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "'"; } else { // We show them all // ################## Added Enable Disable Categorie ################# // $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'"; $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id left join " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c on p.products_id = p2c.products_id left join " . TABLE_CATEGORIES . " c on p2c.categories_id = c.categories_id where c.categories_status = '1' and p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'"; } } else { // show the products in a given categorie if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) { // We are asked to show only specific catgeory // ################## Added Enable Disable Categorie ################# // $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'"; $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id left join " . TABLE_CATEGORIES . " c on c.categories_id = p2c.categories_id where c.categories_status = '1' and p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'"; } else { // We show them all // ################## Added Enable Disable Categorie ################# // $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'"; $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id left join " . TABLE_CATEGORIES . " c on c.categories_id = p2c.categories_id where c.categories_status = '1' and p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'"; } } I have a little problem with this code to insert this.
  10. nervens?ge

    Seperate Pricing Per Customer v3.5

    can you transform the contrieb for the ms3 ? I have read the release is in 2 weeks.
  11. i have php5 on my server and i have this bug in the categories-edit-porduct Warning: array_merge() [function.array-merge]: Argument #1 is not an array in D:\apachefriends1.4.9\xampp\xampp\htdocs\xampp\testseiten\aca\admin\includes\classes\products.php on line 203 Warning: array_merge() [function.array-merge]: Argument #1 is not an array in D:\apachefriends1.4.9\xampp\xampp\htdocs\xampp\testseiten\aca\admin\includes\classes\products.php on line 203 Warning: Invalid argument supplied for foreach() in D:\apachefriends1.4.9\xampp\xampp\htdocs\xampp\testseiten\aca\admin\includes\categories_edit_product.php on line 89
  12. can i use the QTpro 4.2a with attribute features 1.7.1 and with the pizza_contrib ?
  13. nervens?ge

    Seperate Pricing Per Customer v3.5

    I have insert in my store SPPC and now i will ad Hide products for SPPC. But i have a big problem, this is my includes/column_right ( i have infobox-admin-contrieb) <?php /* $Id: column_right.php,v 1.1.1.1 2004/03/04 23:40:37 ccwjr Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2002 osCommerce Released under the GNU General Public License */ $column_query = tep_db_query('select display_in_column as cfgcol, infobox_file_name as cfgtitle, infobox_display as cfgvalue, infobox_define as cfgkey, box_heading, box_template, box_heading_font_color from ' . TABLE_INFOBOX_CONFIGURATION . ' where template_id = ' . TEMPLATE_ID . ' and infobox_display = "yes" and display_in_column = "right" order by location'); while ($column = tep_db_fetch_array($column_query)) { if ( file_exists(DIR_WS_TEMPLATES . TEMPLATE_NAME . '/boxes/' . $column['cfgtitle'])) { define($column['cfgkey'],$column['box_heading']); $infobox_define = $column['box_heading']; $infobox_template = $column['box_template']; $font_color = $column['box_heading_font_color']; $infobox_class = $column['box_template']; require(DIR_WS_TEMPLATES . TEMPLATE_NAME . '/boxes/' . $column['cfgtitle']); } } ?> and this i must do, but i have not this code . catalog/includes/column_right.php Line 3 ***AFTER*** $Id: column_right.php,v 1.17 2003/06/09 22:06:41 hpdl Exp $ ***ADD*** adapted for Separate Pricing Per Customer v4.1, Hide products from groups mod 2005/03/30 Line 15-41 ***REPLACE*** if (isset($HTTP_GET_VARS['products_id'])) include(DIR_WS_BOXES . 'manufacturer_info.php'); if (tep_session_is_registered('customer_id')) include(DIR_WS_BOXES . 'order_history.php'); if (isset($HTTP_GET_VARS['products_id'])) { if (tep_session_is_registered('customer_id')) { $check_query = tep_db_query("select count(*) as count from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . (int)$customer_id . "' and global_product_notifications = '1'"); $check = tep_db_fetch_array($check_query); if ($check['count'] > 0) { include(DIR_WS_BOXES . 'best_sellers.php'); } else { include(DIR_WS_BOXES . 'product_notifications.php'); } } else { include(DIR_WS_BOXES . 'product_notifications.php'); } } else { include(DIR_WS_BOXES . 'best_sellers.php'); } if (isset($HTTP_GET_VARS['products_id'])) { if (basename($PHP_SELF) != FILENAME_TELL_A_FRIEND) include(DIR_WS_BOXES . 'tell_a_friend.php'); } else { include(DIR_WS_BOXES . 'specials.php'); } require(DIR_WS_BOXES . 'reviews.php'); with this code // BOF Separate Pricing Per Customer v4.1, Hide products from groups mod if(!tep_session_is_registered('sppc_customer_group_id')) { $customer_group_id = '0'; } else { $customer_group_id = $sppc_customer_group_id; } global $hide_product; // is set in application_top.php if (isset($HTTP_GET_VARS['products_id']) && $hide_product == false) include(DIR_WS_BOXES . 'manufacturer_info.php'); if (tep_session_is_registered('customer_id')) include(DIR_WS_BOXES . 'order_history.php'); if (isset($HTTP_GET_VARS['products_id'])) { if (tep_session_is_registered('customer_id')) { $check_query = tep_db_query("select count(*) as count from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . (int)$customer_id . "' and global_product_notifications = '1'"); $check = tep_db_fetch_array($check_query); if ($check['count'] > 0) { include(DIR_WS_BOXES . 'best_sellers.php'); } else { (($hide_product == false )? include(DIR_WS_BOXES . 'product_notifications.php') : ''); } } else { (($hide_product == false)? include(DIR_WS_BOXES . 'product_notifications.php') : ''); } } else { include(DIR_WS_BOXES . 'best_sellers.php'); } if (isset($HTTP_GET_VARS['products_id'])) { if (basename($PHP_SELF) != FILENAME_TELL_A_FRIEND && $hide_product == false) { include(DIR_WS_BOXES . 'tell_a_friend.php'); } // end if (basename($PHP_SELF) != FILENAME_TELL_A_FRIEND && $hide_product == false) } else { include(DIR_WS_BOXES . 'specials.php'); } // end if (isset($HTTP_GET_VARS['products_id'])) if ($hide_product == false) { require(DIR_WS_BOXES . 'reviews.php'); } // EOF Separate Pricing Per Customer v4.1, Hide products from groups mod
  14. nervens?ge

    Seperate Pricing Per Customer v3.5

    I have on my catalog/product_info.php PWA 0.82 insert and SPPC and now i will add Price Break 1.11.3 but i have this code : <?php //logic for displaying incart button or test message if (PRICES_LOGGED_IN == 'false') $submit_button = tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); if ( (PRICES_LOGGED_IN == 'true') && (!tep_session_is_registered('customer_id'))) { $submit_button = '<a href="' . tep_href_link(FILENAME_LOGIN, '','SSL') . '">' . PRICES_LOGGED_IN_SUBMIT . '</a> '; $submit_product_quant = ''; } else { $submit_button = tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); } //####################################### ?> And zhis i must do : SPPC Price Break 1.11.3 mod ***REPLACE*** <td class="main" align="right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td> ***WITH*** <!-- BOF price-break-1.11.3 <td class="main" align="right"><?php // echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td> --> <td class="main" align="right"> <table border="0" align="right"> <tr><td align="center"> <?php echo TEXT_ENTER_QUANTITY . ":" . tep_draw_input_field('cart_quantity', $pf->adjustQty(1), 'size="6"'); ?> </td></tr> <tr><td align="center"> <?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> </td> <!-- EOF price-break-1.11.3 -->
  15. nervens?ge

    Seperate Pricing Per Customer v3.5

    I have build in my shop the Pr?ix contrieb an it works on all pages but the admin/costumers.php i became this error. database_tables.php define('TABLE_CUSTOMERS_GROUPS', DB_TABLE_PREFIX . 'customers_groups'); 1146 - Table 'xoops.customers_groups' doesn't exist select count(*) as total from es_esc_customers c left join es_esc_address_book a on c.customers_id = a.customers_id and c.customers_default_address_id = a.address_book_id left join customers_groups cg on c.customers_group_id = cg.customers_group_id <?php/* $Id: customers.php,v 1.82 2003/06/30 13:54:14 dgw_ Exp $ adapted for Separate Pricing Per Customer v4 2005/03/04 customer_sort_admin_v1 http://www.oscommerce.com/community/contributions,223'>http://www.oscommerce.com/community/contributions,223 added osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); $action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : ''); $error = false; $processed = false; if (tep_not_null($action)) { switch ($action) { case 'update': $customers_id = tep_db_prepare_input($HTTP_GET_VARS['cID']); $customers_firstname = tep_db_prepare_input($HTTP_POST_VARS['customers_firstname']); $customers_lastname = tep_db_prepare_input($HTTP_POST_VARS['customers_lastname']); $customers_email_address = tep_db_prepare_input($HTTP_POST_VARS['customers_email_address']); $customers_telephone = tep_db_prepare_input($HTTP_POST_VARS['customers_telephone']); $customers_fax = tep_db_prepare_input($HTTP_POST_VARS['customers_fax']); $customers_newsletter = tep_db_prepare_input($HTTP_POST_VARS['customers_newsletter']); // BOF Separate Pricing per Customer $customers_group_id = tep_db_prepare_input($HTTP_POST_VARS['customers_group_id']); $customers_group_ra = tep_db_prepare_input($HTTP_POST_VARS['customers_group_ra']); $entry_company_tax_id = tep_db_prepare_input($HTTP_POST_VARS['entry_company_tax_id']); if ($HTTP_POST_VARS['customers_payment_allowed'] && $HTTP_POST_VARS['customers_payment_settings'] == '1') { $customers_payment_allowed = tep_db_prepare_input($HTTP_POST_VARS['customers_payment_allowed']); } else { // no error with subsequent re-posting of variables $customers_payment_allowed = ''; if ($HTTP_POST_VARS['payment_allowed'] && $HTTP_POST_VARS['customers_payment_settings'] == '1') { while(list($key, $val) = each($HTTP_POST_VARS['payment_allowed'])) { if ($val == true) { $customers_payment_allowed .= tep_db_prepare_input($val).';'; } } // end while $customers_payment_allowed = substr($customers_payment_allowed,0,strlen($customers_payment_allowed)-1); } // end if ($HTTP_POST_VARS['payment_allowed']) } // end else ($HTTP_POST_VARS['customers_payment_allowed'] if ($HTTP_POST_VARS['customers_shipment_allowed'] && $HTTP_POST_VARS['customers_shipment_settings'] == '1') { $customers_shipment_allowed = tep_db_prepare_input($HTTP_POST_VARS['customers_shipment_allowed']); } else { // no error with subsequent re-posting of variables $customers_shipment_allowed = ''; if ($HTTP_POST_VARS['shipping_allowed'] && $HTTP_POST_VARS['customers_shipment_settings'] == '1') { while(list($key, $val) = each($HTTP_POST_VARS['shipping_allowed'])) { if ($val == true) { $customers_shipment_allowed .= tep_db_prepare_input($val).';'; } } // end while $customers_shipment_allowed = substr($customers_shipment_allowed,0,strlen($customers_shipment_allowed)-1); } // end if ($HTTP_POST_VARS['shipment_allowed']) } // end else ($HTTP_POST_VARS['customers_shipment_allowed'] // EOF Separate Pricing per Customer $customers_gender = tep_db_prepare_input($HTTP_POST_VARS['customers_gender']); $customers_dob = tep_db_prepare_input($HTTP_POST_VARS['customers_dob']); $default_address_id = tep_db_prepare_input($HTTP_POST_VARS['default_address_id']); $entry_street_address = tep_db_prepare_input($HTTP_POST_VARS['entry_street_address']); $entry_suburb = tep_db_prepare_input($HTTP_POST_VARS['entry_suburb']); $entry_postcode = tep_db_prepare_input($HTTP_POST_VARS['entry_postcode']); $entry_city = tep_db_prepare_input($HTTP_POST_VARS['entry_city']); $entry_country_id = tep_db_prepare_input($HTTP_POST_VARS['entry_country_id']); $entry_company = tep_db_prepare_input($HTTP_POST_VARS['entry_company']); $entry_state = tep_db_prepare_input($HTTP_POST_VARS['entry_state']); if (isset($HTTP_POST_VARS['entry_zone_id'])) $entry_zone_id = tep_db_prepare_input($HTTP_POST_VARS['entry_zone_id']); if (strlen($customers_firstname) < ENTRY_FIRST_NAME_MIN_LENGTH) { $error = true; $entry_firstname_error = true; } else { $entry_firstname_error = false; } if (strlen($customers_lastname) < ENTRY_LAST_NAME_MIN_LENGTH) { $error = true; $entry_lastname_error = true; } else { $entry_lastname_error = false; } if (ACCOUNT_DOB == 'true') { if (checkdate(substr(tep_date_raw($customers_dob), 4, 2), substr(tep_date_raw($customers_dob), 6, 2), substr(tep_date_raw($customers_dob), 0, 4))) { $entry_date_of_birth_error = false; } else { $error = true; $entry_date_of_birth_error = true; } } if (strlen($customers_email_address) < ENTRY_EMAIL_ADDRESS_MIN_LENGTH) { $error = true; $entry_email_address_error = true; } else { $entry_email_address_error = false; } if (!tep_validate_email($customers_email_address)) { $error = true; $entry_email_address_check_error = true; } else { $entry_email_address_check_error = false; } if (strlen($entry_street_address) < ENTRY_STREET_ADDRESS_MIN_LENGTH) { $error = true; $entry_street_address_error = true; } else { $entry_street_address_error = false; } if (strlen($entry_postcode) < ENTRY_POSTCODE_MIN_LENGTH) { $error = true; $entry_post_code_error = true; } else { $entry_post_code_error = false; } if (strlen($entry_city) < ENTRY_CITY_MIN_LENGTH) { $error = true; $entry_city_error = true; } else { $entry_city_error = false; } if ($entry_country_id == false) { $error = true; $entry_country_error = true; } else { $entry_country_error = false; } if (ACCOUNT_STATE == 'true') { if ($entry_country_error == true) { $entry_state_error = true; } else { $zone_id = 0; $entry_state_error = false; $check_query = tep_db_query("select count(*) as total from " . TABLE_ZONES . " where zone_country_id = '" . (int)$entry_country_id . "'"); $check_value = tep_db_fetch_array($check_query); $entry_state_has_zones = ($check_value['total'] > 0); if ($entry_state_has_zones == true) { $zone_query = tep_db_query("select zone_id from " . TABLE_ZONES . " where zone_country_id = '" . (int)$entry_country_id . "' and zone_name = '" . tep_db_input($entry_state) . "'"); if (tep_db_num_rows($zone_query) == 1) { $zone_values = tep_db_fetch_array($zone_query); $entry_zone_id = $zone_values['zone_id']; } else { $error = true; $entry_state_error = true; } } else { if ($entry_state == false) { $error = true; $entry_state_error = true; } } } } if (strlen($customers_telephone) < ENTRY_TELEPHONE_MIN_LENGTH) { $error = true; $entry_telephone_error = true; } else { $entry_telephone_error = false; } $check_email = tep_db_query("select customers_email_address from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($customers_email_address) . "' and customers_id != '" . (int)$customers_id . "'"); if (tep_db_num_rows($check_email)) { $error = true; $entry_email_address_exists = true; } else { $entry_email_address_exists = false; } if ($error == false) { $sql_data_array = array('customers_firstname' => $customers_firstname, 'customers_lastname' => $customers_lastname, 'customers_email_address' => $customers_email_address, 'customers_telephone' => $customers_telephone, 'customers_fax' => $customers_fax, 'customers_newsletter' => $customers_newsletter, // BOF Separate Pricing per Customer 'customers_group_id' => $customers_group_id, 'customers_group_ra' => $customers_group_ra, 'customers_payment_allowed' => $customers_payment_allowed, 'customers_shipment_allowed' => $customers_shipment_allowed); // EOF Separate Pricing per Customer if (ACCOUNT_GENDER == 'true') $sql_data_array['customers_gender'] = $customers_gender; if (ACCOUNT_DOB == 'true') $sql_data_array['customers_dob'] = tep_date_raw($customers_dob); tep_db_perform(TABLE_CUSTOMERS, $sql_data_array, 'update', "customers_id = '" . (int)$customers_id . "'"); tep_db_query("update " . TABLE_CUSTOMERS_INFO . " set customers_info_date_account_last_modified = now() where customers_info_id = '" . (int)$customers_id . "'"); if ($entry_zone_id > 0) $entry_state = ''; $sql_data_array = array('entry_firstname' => $customers_firstname, 'entry_lastname' => $customers_lastname, 'entry_street_address' => $entry_street_address, 'entry_postcode' => $entry_postcode, 'entry_city' => $entry_city, 'entry_country_id' => $entry_country_id); // BOF Separate Pricing Per Customer if (ACCOUNT_COMPANY == 'true') { $sql_data_array['entry_company'] = $entry_company; $sql_data_array['entry_company_tax_id'] = $entry_company_tax_id; } // EOF Separate Pricing Per Customer if (ACCOUNT_SUBURB == 'true') $sql_data_array['entry_suburb'] = $entry_suburb; if (ACCOUNT_STATE == 'true') { if ($entry_zone_id > 0) { $sql_data_array['entry_zone_id'] = $entry_zone_id; $sql_data_array['entry_state'] = ''; } else { $sql_data_array['entry_zone_id'] = '0'; $sql_data_array['entry_state'] = $entry_state; } } tep_db_perform(TABLE_ADDRESS_BOOK, $sql_data_array, 'update', "customers_id = '" . (int)$customers_id . "' and address_book_id = '" . (int)$default_address_id . "'"); tep_redirect(tep_href_link(FILENAME_CUSTOMERS, tep_get_all_get_params(array('cID', 'action')) . 'cID=' . $customers_id)); } else if ($error == true) { $cInfo = new objectInfo($HTTP_POST_VARS); $processed = true; } break; case 'deleteconfirm': $customers_id = tep_db_prepare_input($HTTP_GET_VARS['cID']); if (isset($HTTP_POST_VARS['delete_reviews']) && ($HTTP_POST_VARS['delete_reviews'] == 'on')) { $reviews_query = tep_db_query("select reviews_id from " . TABLE_REVIEWS . " where customers_id = '" . (int)$customers_id . "'"); while ($reviews = tep_db_fetch_array($reviews_query)) { tep_db_query("delete from " . TABLE_REVIEWS_DESCRIPTION . " where reviews_id = '" . (int)$reviews['reviews_id'] . "'"); } tep_db_query("delete from " . TABLE_REVIEWS . " where customers_id = '" . (int)$customers_id . "'"); } else { tep_db_query("update " . TABLE_REVIEWS . " set customers_id = null where customers_id = '" . (int)$customers_id . "'"); } // BOF Separate Pricing Per Customer // Once all customers with a specific customers_group_id have been deleted from // the table customers, the next time a customer is deleted, all entries in the table products_groups // that have the (now apparently obsolete) customers_group_id will be deleted! // If you don't want that, leave this section out, or comment it out // Note that when customers groups are deleted from the table customers_groups, all the // customers with that specific customer_group_id will be changed to customer_group_id = '0' (default/Retail) $multiple_groups_query = tep_db_query("select customers_group_id from " . TABLE_CUSTOMERS_GROUPS . " "); while ($group_ids = tep_db_fetch_array($multiple_groups_query)) { $multiple_customers_query = tep_db_query("select distinct customers_group_id from " . TABLE_CUSTOMERS . " where customers_group_id = " . $group_ids['customers_group_id'] . " "); if (!($multiple_groups = tep_db_fetch_array($multiple_customers_query))) { tep_db_query("delete from " . TABLE_PRODUCTS_GROUPS . " where customers_group_id = '" . $group_ids['customers_group_id'] . "'"); } } // EOF Separate Pricing Per Customer tep_db_query("delete from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$customers_id . "'"); tep_db_query("delete from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$customers_id . "'"); tep_db_query("delete from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . (int)$customers_id . "'"); tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET . " where customers_id = '" . (int)$customers_id . "'"); tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where customers_id = '" . (int)$customers_id . "'"); tep_db_query("delete from " . TABLE_WHOS_ONLINE . " where customer_id = '" . (int)$customers_id . "'"); tep_redirect(tep_href_link(FILENAME_CUSTOMERS, tep_get_all_get_params(array('cID', 'action')))); break; default: // BOF Separate Pricing Per Customer $customers_query = tep_db_query("select c.customers_id, c.customers_gender, c.customers_firstname, c.customers_lastname, c.customers_dob, c.customers_email_address, a.entry_company, a.entry_company_tax_id, a.entry_street_address, a.entry_suburb, a.entry_postcode, a.entry_city, a.entry_state, a.entry_zone_id, a.entry_country_id, c.customers_telephone, c.customers_fax, c.customers_newsletter, c.customers_group_id, c.customers_group_ra, c.customers_payment_allowed, c.customers_shipment_allowed, c.customers_default_address_id from " . TABLE_CUSTOMERS . " c left join " . TABLE_ADDRESS_BOOK . " a on c.customers_default_address_id = a.address_book_id where a.customers_id = c.customers_id and c.customers_id = '" . (int)$HTTP_GET_VARS['cID'] . "'"); $module_directory = DIR_FS_CATALOG_MODULES . 'payment/'; $ship_module_directory = DIR_FS_CATALOG_MODULES . 'shipping/'; $file_extension = substr($PHP_SELF, strrpos($PHP_SELF, '.')); $directory_array = array(); if ($dir = @dir($module_directory)) { while ($file = $dir->read()) { if (!is_dir($module_directory . $file)) { if (substr($file, strrpos($file, '.')) == $file_extension) { $directory_array[] = $file; // array of all the payment modules present in includes/modules/payment } } } sort($directory_array); $dir->close(); } $ship_directory_array = array(); if ($dir = @dir($ship_module_directory)) { while ($file = $dir->read()) { if (!is_dir($ship_module_directory . $file)) { if (substr($file, strrpos($file, '.')) == $file_extension) { $ship_directory_array[] = $file; // array of all shipping modules present in includes/modules/shipping } } } sort($ship_directory_array); $dir->close(); } $existing_customers_query = tep_db_query("select customers_group_id, customers_group_name from " . TABLE_CUSTOMERS_GROUPS . " order by customers_group_id "); // EOF Separate Pricing Per Customer $customers = tep_db_fetch_array($customers_query); $cInfo = new objectInfo($customers); // BOF Separate Pricing Per Customer // $shipment_allowed = explode (";",$cInfo->customers_shipment_allowed); // EOF Separate Pricing Per Customer } } ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <title><?php echo TITLE; ?></title> <link rel="stylesheet" type="text/css" href="includes/stylesheet.css"> <script language="javascript" src="includes/general.js"></script> <?php if ($action == 'edit' || $action == 'update') { ?> <script language="javascript"><!-- function check_form() { var error = 0; var error_message = "<?php echo JS_ERROR; ?>"; var customers_firstname = document.customers.customers_firstname.value; var customers_lastname = document.customers.customers_lastname.value; <?php if (ACCOUNT_COMPANY == 'true') echo 'var entry_company = document.customers.entry_company.value;' . "\n"; ?> <?php if (ACCOUNT_DOB == 'true') echo 'var customers_dob = document.customers.customers_dob.value;' . "\n"; ?> var customers_email_address = document.customers.customers_email_address.value; var entry_street_address = document.customers.entry_street_address.value; var entry_postcode = document.customers.entry_postcode.value; var entry_city = document.customers.entry_city.value; var customers_telephone = document.customers.customers_telephone.value; <?php if (ACCOUNT_GENDER == 'true') { ?> if (document.customers.customers_gender[0].checked || document.customers.customers_gender[1].checked) { } else { error_message = error_message + "<?php echo JS_GENDER; ?>"; error = 1; } <?php } ?> if (customers_firstname == "" || customers_firstname.length < <?php echo ENTRY_FIRST_NAME_MIN_LENGTH; ?>) { error_message = error_message + "<?php echo JS_FIRST_NAME; ?>"; error = 1; } if (customers_lastname == "" || customers_lastname.length < <?php echo ENTRY_LAST_NAME_MIN_LENGTH; ?>) { error_message = error_message + "<?php echo JS_LAST_NAME; ?>"; error = 1; } <?php if (ACCOUNT_DOB == 'true') { ?> if (customers_dob == "" || customers_dob.length < <?php echo ENTRY_DOB_MIN_LENGTH; ?>) { error_message = error_message + "<?php echo JS_DOB; ?>"; error = 1; } <?php } ?> if (customers_email_address == "" || customers_email_address.length < <?php echo ENTRY_EMAIL_ADDRESS_MIN_LENGTH; ?>) { error_message = error_message + "<?php echo JS_EMAIL_ADDRESS; ?>"; error = 1; } if (entry_street_address == "" || entry_street_address.length < <?php echo ENTRY_STREET_ADDRESS_MIN_LENGTH; ?>) { error_message = error_message + "<?php echo JS_ADDRESS; ?>"; error = 1; } if (entry_postcode == "" || entry_postcode.length < <?php echo ENTRY_POSTCODE_MIN_LENGTH; ?>) { error_message = error_message + "<?php echo JS_POST_CODE; ?>"; error = 1; } if (entry_city == "" || entry_city.length < <?php echo ENTRY_CITY_MIN_LENGTH; ?>) { error_message = error_message + "<?php echo JS_CITY; ?>"; error = 1; } <?php if (ACCOUNT_STATE == 'true') { ?> if (document.customers.elements['entry_state'].type != "hidden") { if (document.customers.entry_state.value == '' || document.customers.entry_state.value.length < <?php echo ENTRY_STATE_MIN_LENGTH; ?> ) { error_message = error_message + "<?php echo JS_STATE; ?>"; error = 1; } } <?php } ?> if (document.customers.elements['entry_country_id'].type != "hidden") { if (document.customers.entry_country_id.value == 0) { error_message = error_message + "<?php echo JS_COUNTRY; ?>"; error = 1; } } if (customers_telephone == "" || customers_telephone.length < <?php echo ENTRY_TELEPHONE_MIN_LENGTH; ?>) { error_message = error_message + "<?php echo JS_TELEPHONE; ?>"; error = 1; } if (error == 1) { alert(error_message); return false; } else { return true; } } //--></script> <?php } ?> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF" onload="SetFocus();"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="2" cellpadding="2"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <?php if ($action == 'edit' || $action == 'update') { $newsletter_array = array(array('id' => '1', 'text' => ENTRY_NEWSLETTER_YES), array('id' => '0', 'text' => ENTRY_NEWSLETTER_NO)); ?> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> <td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr><?php echo tep_draw_form('customers', FILENAME_CUSTOMERS, tep_get_all_get_params(array('action')) . 'action=update', 'post', 'onSubmit="return check_form();"') . tep_draw_hidden_field('default_address_id', $cInfo->customers_default_address_id); ?> <td class="formAreaTitle"><?php echo CATEGORY_PERSONAL; ?></td> </tr> <tr> <td class="formArea"><table border="0" cellspacing="2" cellpadding="2"> <?php if (ACCOUNT_GENDER == 'true') { ?> <tr> <td class="main"><?php echo ENTRY_GENDER; ?></td> <td class="main"> <?php if ($error == true) { if ($entry_gender_error == true) { echo tep_draw_radio_field('customers_gender', 'm', false, $cInfo->customers_gender) . ' ' . MALE . ' ' . tep_draw_radio_field('customers_gender', 'f', false, $cInfo->customers_gender) . ' ' . FEMALE . ' ' . ENTRY_GENDER_ERROR; } else { echo ($cInfo->customers_gender == 'm') ? MALE : FEMALE; echo tep_draw_hidden_field('customers_gender'); } } else { echo tep_draw_radio_field('customers_gender', 'm', false, $cInfo->customers_gender) . ' ' . MALE . ' ' . tep_draw_radio_field('customers_gender', 'f', false, $cInfo->customers_gender) . ' ' . FEMALE; } ?></td> </tr> <?php } ?> <tr> <td class="main"><?php echo ENTRY_FIRST_NAME; ?></td> <td class="main"> <?php if ($error == true) { if ($entry_firstname_error == true) { echo tep_draw_input_field('customers_firstname', $cInfo->customers_firstname, 'maxlength="32"') . ' ' . ENTRY_FIRST_NAME_ERROR; } else { echo $cInfo->customers_firstname . tep_draw_hidden_field('customers_firstname'); } } else { echo tep_draw_input_field('customers_firstname', $cInfo->customers_firstname, 'maxlength="32"', true); } ?></td> </tr> <tr> <td class="main"><?php echo ENTRY_LAST_NAME; ?></td> <td class="main"> <?php if ($error == true) { if ($entry_lastname_error == true) { echo tep_draw_input_field('customers_lastname', $cInfo->customers_lastname, 'maxlength="32"') . ' ' . ENTRY_LAST_NAME_ERROR; } else { echo $cInfo->customers_lastname . tep_draw_hidden_field('customers_lastname'); } } else { echo tep_draw_input_field('customers_lastname', $cInfo->customers_lastname, 'maxlength="32"', true); } ?></td> </tr> <?php if (ACCOUNT_DOB == 'true') { ?> <tr> <td class="main"><?php echo ENTRY_DATE_OF_BIRTH; ?></td> <td class="main"> <?php if ($error == true) { if ($entry_date_of_birth_error == true) { echo tep_draw_input_field('customers_dob', tep_date_short($cInfo->customers_dob), 'maxlength="10"') . ' ' . ENTRY_DATE_OF_BIRTH_ERROR; } else { echo $cInfo->customers_dob . tep_draw_hidden_field('customers_dob'); } } else { echo tep_draw_input_field('customers_dob', tep_date_short($cInfo->customers_dob), 'maxlength="10"', true); } ?></td> </tr> <?php } ?> <tr> <td class="main"><?php echo ENTRY_EMAIL_ADDRESS; ?></td> <td class="main"> <?php if ($error == true) { if ($entry_email_address_error == true) { echo tep_draw_input_field('customers_email_address', $cInfo->customers_email_address, 'maxlength="96"') . ' ' . ENTRY_EMAIL_ADDRESS_ERROR; } elseif ($entry_email_address_check_error == true) { echo tep_draw_input_field('customers_email_address', $cInfo->customers_email_address, 'maxlength="96"') . ' ' . ENTRY_EMAIL_ADDRESS_CHECK_ERROR; } elseif ($entry_email_address_exists == true) { echo tep_draw_input_field('customers_email_address', $cInfo->customers_email_address, 'maxlength="96"') . ' ' . ENTRY_EMAIL_ADDRESS_ERROR_EXISTS; } else { echo $customers_email_address . tep_draw_hidden_field('customers_email_address'); } } else { echo tep_draw_input_field('customers_email_address', $cInfo->customers_email_address, 'maxlength="96"', true); } ?></td> </tr> </table></td> </tr> <?php if (ACCOUNT_COMPANY == 'true') { ?> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> <td class="formAreaTitle"><?php echo CATEGORY_COMPANY; ?></td> </tr> <tr> <td class="formArea"><table border="0" cellspacing="2" cellpadding="2"> <tr> <td class="main"><?php echo ENTRY_COMPANY; ?></td> <td class="main"> <?php if ($error == true) { if ($entry_company_error == true) { echo tep_draw_input_field('entry_company', $cInfo->entry_company, 'maxlength="32"') . ' ' . ENTRY_COMPANY_ERROR; } else { echo $cInfo->entry_company . tep_draw_hidden_field('entry_company'); } } else { echo tep_draw_input_field('entry_company', $cInfo->entry_company, 'maxlength="32"'); } ?></td> <!-- BOF Separate Pricing Per Customer --> </tr> <tr> <td class="main"><?php echo ENTRY_COMPANY_TAX_ID; ?></td> <td class="main"> <?php if ($error == true) { if ($entry_company_tax_id_error == true) { echo tep_draw_input_field('entry_company_tax_id', $cInfo->entry_company_tax_id, 'maxlength="32"') . ' ' . ENTRY_COMPANY_TAX_ID_ERROR; } else { echo $cInfo->entry_company . tep_draw_hidden_field('entry_company_tax_id'); } } else { echo tep_draw_input_field('entry_company_tax_id', $cInfo->entry_company_tax_id, 'maxlength="32"'); } ?></td> </tr> <tr> <td class="main"><?php echo ENTRY_CUSTOMERS_GROUP_REQUEST_AUTHENTICATION; ?></td> <td class="main"> <?php if ($error == true) { if ($customers_group_ra_error == true) { echo tep_draw_radio_field('customers_group_ra', '0', false, $cInfo->customers_group_ra) . ' ' . ENTRY_CUSTOMERS_GROUP_RA_NO . ' ' . tep_draw_radio_field('customers_group_ra', '1', false, $cInfo->customers_group_ra) . ' ' . ENTRY_CUSTOMERS_GROUP_RA_YES . ' ' . ENTRY_CUSTOMERS_GROUP_RA_ERROR; } else { echo ($cInfo->customers_group_ra == '0') ? ENTRY_CUSTOMERS_GROUP_RA_NO : ENTRY_CUSTOMERS_GROUP_RA_YES; echo tep_draw_hidden_field('customers_group_ra'); } } else { echo tep_draw_radio_field('customers_group_ra', '0', false, $cInfo->customers_group_ra) . ' ' . ENTRY_CUSTOMERS_GROUP_RA_NO . ' ' . tep_draw_radio_field('customers_group_ra', '1', false, $cInfo->customers_group_ra) . ' ' . ENTRY_CUSTOMERS_GROUP_RA_YES; } ?></td> </tr> <!-- EOF Separate Pricing Per Customer --> </tr> </table></td> </tr> <?php } ?> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> <td class="formAreaTitle"><?php echo CATEGORY_ADDRESS; ?></td> </tr> <tr> <td class="formArea"><table border="0" cellspacing="2" cellpadding="2"> <tr> <td class="main"><?php echo ENTRY_STREET_ADDRESS; ?></td> <td class="main"> <?php if ($error == true) { if ($entry_street_address_error == true) { echo tep_draw_input_field('entry_street_address', $cInfo->entry_street_address, 'maxlength="64"') . ' ' . ENTRY_STREET_ADDRESS_ERROR; } else { echo $cInfo->entry_street_address . tep_draw_hidden_field('entry_street_address'); } } else { echo tep_draw_input_field('entry_street_address', $cInfo->entry_street_address, 'maxlength="64"', true); } ?></td> </tr> <?php if (ACCOUNT_SUBURB == 'true') { ?> <tr> <td class="main"><?php echo ENTRY_SUBURB; ?></td> <td class="main"> <?php if ($error == true) { if ($entry_suburb_error == true) { echo tep_draw_input_field('suburb', $cInfo->entry_suburb, 'maxlength="32"') . ' ' . ENTRY_SUBURB_ERROR; } else { echo $cInfo->entry_suburb . tep_draw_hidden_field('entry_suburb'); } } else { echo tep_draw_input_field('entry_suburb', $cInfo->entry_suburb, 'maxlength="32"'); } ?></td> </tr> <?php } ?> <tr> <td class="main"><?php echo ENTRY_POST_CODE; ?></td> <td class="main"> <?php if ($error == true) { if ($entry_post_code_error == true) { echo tep_draw_input_field('entry_postcode', $cInfo->entry_postcode, 'maxlength="8"') . ' ' . ENTRY_POST_CODE_ERROR; } else { echo $cInfo->entry_postcode . tep_draw_hidden_field('entry_postcode'); } } else { echo tep_draw_input_field('entry_postcode', $cInfo->entry_postcode, 'maxlength="8"', true); } ?></td> </tr> <tr> <td class="main"><?php echo ENTRY_CITY; ?></td> <td class="main"> <?php if ($error == true) { if ($entry_city_error == true) { echo tep_draw_input_field('entry_city', $cInfo->entry_city, 'maxlength="32"') . ' ' . ENTRY_CITY_ERROR; } else { echo $cInfo->entry_city . tep_draw_hidden_field('entry_city'); } } else { echo tep_draw_input_field('entry_city', $cInfo->entry_city, 'maxlength="32"', true); } ?></td> </tr> <?php if (ACCOUNT_STATE == 'true') { ?> <tr> <td class="main"><?php echo ENTRY_STATE; ?></td> <td class="main"> <?php $entry_state = tep_get_zone_name($cInfo->entry_country_id, $cInfo->entry_zone_id, $cInfo->entry_state); if ($error == true) { if ($entry_state_error == true) { if ($entry_state_has_zones == true) { $zones_array = array(); $zones_query = tep_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . tep_db_input($cInfo->entry_country_id) . "' order by zone_name"); while ($zones_values = tep_db_fetch_array($zones_query)) { $zones_array[] = array('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']); } echo tep_draw_pull_down_menu('entry_state', $zones_array) . ' ' . ENTRY_STATE_ERROR; } else { echo tep_draw_input_field('entry_state', tep_get_zone_name($cInfo->entry_country_id, $cInfo->entry_zone_id, $cInfo->entry_state)) . ' ' . ENTRY_STATE_ERROR; } } else { echo $entry_state . tep_draw_hidden_field('entry_zone_id') . tep_draw_hidden_field('entry_state'); } } else { echo tep_draw_input_field('entry_state', tep_get_zone_name($cInfo->entry_country_id, $cInfo->entry_zone_id, $cInfo->entry_state)); } ?></td> </tr> <?php } ?> <tr> <td class="main"><?php echo ENTRY_COUNTRY; ?></td> <td class="main"> <?php if ($error == true) { if ($entry_country_error == true) { echo tep_draw_pull_down_menu('entry_country_id', tep_get_countries(), $cInfo->entry_country_id) . ' ' . ENTRY_COUNTRY_ERROR; } else { echo tep_get_country_name($cInfo->entry_country_id) . tep_draw_hidden_field('entry_country_id'); } } else { echo tep_draw_pull_down_menu('entry_country_id', tep_get_countries(), $cInfo->entry_country_id); } ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> <td class="formAreaTitle"><?php echo CATEGORY_CONTACT; ?></td> </tr> <tr> <td class="formArea"><table border="0" cellspacing="2" cellpadding="2"> <tr> <td class="main"><?php echo ENTRY_TELEPHONE_NUMBER; ?></td> <td class="main"> <?php if ($error == true) { if ($entry_telephone_error == true) { echo tep_draw_input_field('customers_telephone', $cInfo->customers_telephone, 'maxlength="32"') . ' ' . ENTRY_TELEPHONE_NUMBER_ERROR; } else { echo $cInfo->customers_telephone . tep_draw_hidden_field('customers_telephone'); } } else { echo tep_draw_input_field('customers_telephone', $cInfo->customers_telephone, 'maxlength="32"', true); } ?></td> </tr> <tr> <td class="main"><?php echo ENTRY_FAX_NUMBER; ?></td> <td class="main"> <?php if ($processed == true) { echo $cInfo->customers_fax . tep_draw_hidden_field('customers_fax'); } else { echo tep_draw_input_field('customers_fax', $cInfo->customers_fax, 'maxlength="32"'); } ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> <td class="formAreaTitle"><?php echo CATEGORY_OPTIONS; ?></td> </tr> <tr> <td class="formArea"><table border="0" cellspacing="2" cellpadding="2"> <tr> <td class="main"><?php echo ENTRY_NEWSLETTER; ?></td> <td class="main"> <?php if ($processed == true) { if ($cInfo->customers_newsletter == '1') { echo ENTRY_NEWSLETTER_YES; } else { echo ENTRY_NEWSLETTER_NO; } echo tep_draw_hidden_field('customers_newsletter'); } else { echo tep_draw_pull_down_menu('customers_newsletter', $newsletter_array, (($cInfo->customers_newsletter == '1') ? '1' : '0')); } ?></td> </tr> <!-- BOF Separate Pricing per Customer --> <tr> <td class="main"><?php echo ENTRY_CUSTOMERS_GROUP_NAME; ?></td> <?php if ($processed != true) { $index = 0; while ($existing_customers = tep_db_fetch_array($existing_customers_query)) { $existing_customers_array[] = array("id" => $existing_customers['customers_group_id'], "text" => " ".$existing_customers['customers_group_name']." "); ++$index; } } // end if ($processed != true ) ?> <td class="main"><?php if ($processed == true) { echo $cInfo->customers_group_id . tep_draw_hidden_field('customers_group_id'); } else { echo tep_draw_pull_down_menu('customers_group_id', $existing_customers_array, $cInfo->customers_group_id); } ?></td> </tr> <!-- EOF Separate Pricing per Customer --> </table></td> </tr> <!-- BOF Separate Pricing per Customer --> <tr>
  16. nervens?ge

    BTSv1.2 Support

    box/special.php this is my box <?php /* $Id: specials.php,v 1.31 2003/06/09 22:21:03 hpdl Exp $ modified by paulm_nl 2003/12/23 osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ // BOF Separate Price per Customer /* if ($random_product = tep_random_select("select p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SPECIALS . " s where p.products_status = '1' and p.products_id = s.products_id and pd.products_id = s.products_id and pd.language_id = '" . (int)$languages_id . "' and s.status = '1' order by s.specials_date_added desc limit " . MAX_RANDOM_SELECT_SPECIALS)) { */ // global variable (session): $sppc_customers_group_id -> local variable $customer_group_id if(!tep_session_is_registered('sppc_customer_group_id')) { $customer_group_id = '0'; } else { $customer_group_id = $sppc_customer_group_id; } if ($customer_group_id == '0') { $random_product = tep_random_select("select p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SPECIALS . " s where p.products_status = '1' and p.products_id = s.products_id and pd.products_id = s.products_id and pd.language_id = '" . (int)$languages_id . "' and s.status = '1' and s.customers_group_id = '0' order by s.specials_date_added desc limit " . MAX_RANDOM_SELECT_SPECIALS); } else { // $sppc_customer_group_id is in the session variables, so must be set $random_product = tep_random_select("select p.products_id, pd.products_name, IF(pg.customers_group_price IS NOT NULL,pg.customers_group_price, p.products_price) as products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SPECIALS . " s LEFT JOIN " . TABLE_PRODUCTS_GROUPS . " pg using (products_id, customers_group_id) where p.products_status = '1' and p.products_id = s.products_id and pd.products_id = s.products_id and pd.language_id = '" . (int)$languages_id . "' and s.status = '1' and s.customers_group_id= '".$customer_group_id."' order by s.specials_date_added desc limit " . MAX_RANDOM_SELECT_SPECIALS); } if (tep_not_null($random_product)) { // EOF Separate Price per Customer $boxHeading = BOX_HEADING_SPECIALS; $corner_left = 'square'; $corner_right = 'square'; $boxContent_attributes = ' align="center"'; $boxLink = '<a href="' . tep_href_link(FILENAME_SPECIALS) . '"><img src="images/infobox/arrow_right.gif" border="0" alt="more" title=" more " width="12" height="10"></a>'; $box_base_name = 'specials'; // for easy unique box template setup (added BTSv1.2) $box_id = $box_base_name . 'Box'; // for CSS styling paulm (editted BTSv1.2) $boxContent = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product["products_id"]) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . $random_product['products_name'] . '</a><br><s>' . $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</s><br><span class="productSpecialPrice">' . $currencies->display_price($random_product['specials_new_products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</span>'; include (bts_select('boxes', $box_base_name)); // BTS 1.5 $boxLink = ''; $boxContent_attributes = ''; } ?> i must make this: 2.6) /catalog/includes/boxes/specials.php (boxes_content if ISM installed) v 1.31 2003/06/09 ------------------------------------------ Modifies Specials InfoBox AFTER: new infoBoxHeading($info_box_contents, false, false, tep_href_link(FILENAME_SPECIALS)); INSERT: // ADDED for ViewPrice $products_price = '<s>' . $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</s><br><span class="productSpecialPrice">' . $currencies->display_price($random_product['specials_new_products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</span>'; if (PRICES_LOGGED_IN == 'false') { $product_price_d = $products_price; } if ((PRICES_LOGGED_IN == 'true') && (!tep_session_is_registered('customer_id'))) { $product_price_d = ('<a href="' . tep_href_link(FILENAME_LOGIN, '','SSL') . '">' . PRICES_LOGGED_IN_TEXT . '</a> ' ); } else { $product_price_d = $products_price; } // END ViewPrice REPLACE: 'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product["products_id"]) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . $random_product['products_name'] . '</a><br><s>' . $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</s><br><span class="productSpecialPrice">' . $currencies->display_price($random_product['specials_new_products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</span>'); WITH: 'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product["products_id"]) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . $random_product['products_name'] . '</a><br>' . $product_price_d); i have no idea when i make it in the box its work when i am not login,but i make login the box is move/unvisible. Can you create the box for me ?
  17. nervens?ge

    Seperate Pricing Per Customer v3.5

    I have insert in my store SPPC 4.1 and Pricebreak for SPPC and now i will add the hiden Products for SPPC but i have a problem with the code the last step in catalog/admin/categories.php this i have Separate Pricing Per Customer -->/price break <!-- BOF Separate Pricing Per Customer -->/price break <?php $customers_group_query = tep_db_query("select customers_group_id, customers_group_name from " . TABLE_CUSTOMERS_GROUPS . " where customers_group_id != '0' order by customers_group_id"); $header = false; while ($customers_group = tep_db_fetch_array($customers_group_query)) { if (tep_db_num_rows($customers_group_query) > 0) { $attributes_query = tep_db_query("select customers_group_id, customers_group_price, products_price1, products_price2, products_price3, products_price4, products_price5, products_price6, products_price7, products_price8, products_price1_qty, products_price2_qty, products_price3_qty, products_price4_qty, products_price5_qty, products_price6_qty, products_price7_qty, products_price8_qty, products_qty_blocks from " . TABLE_PRODUCTS_GROUPS . " where products_id = '" . $pInfo->products_id . "' and customers_group_id = '" . $customers_group['customers_group_id'] . "' order by customers_group_id"); } else { $attributes = array('customers_group_id' => 'new'); } if (!$header) { ?> <tr bgcolor="#ebebff""> <td class="main" colspan="2" style="font-style: italic">Note that if the price field for the customer group is left empty, <b>no</b> price and <b>no</b> price break levels and quantities for that customer group will be inserted in the database.<br /> If a field or fields is/are filled, but the checkbox is unchecked no price/price break levels etc. will be inserted either.<br /> If a price and price break levels are already inserted in the database, but the checkbox unchecked they will be removed from the database. </td> </tr> <?php $header = true; } // end if (!header), makes sure this is only shown once ?> <tr bgcolor="#ebebff"> <td class="main"><?php if (isset($pInfo->sppcoption)) { echo tep_draw_checkbox_field('sppcoption[' . $customers_group['customers_group_id'] . ']', 'sppcoption[' . $customers_group['customers_group_id'] . ']', (isset($pInfo->sppcoption[ $customers_group['customers_group_id']])) ? 1: 0); } else { echo tep_draw_checkbox_field('sppcoption[' . $customers_group['customers_group_id'] . ']', 'sppcoption[' . $customers_group['customers_group_id'] . ']', true) . ' ' . $customers_group['customers_group_name']; } </td> <td class="main"><?php $customer_prices_set = false; $customer_prices_in_post = false; if ($attributes = tep_db_fetch_array($attributes_query)) { $customer_prices_set = true; echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('sppcprice[' . $customers_group['customers_group_id'] . ']', $attributes['customers_group_price']); } else { if (isset($pInfo->sppcprice[$customers_group['customers_group_id']])) { // when a preview was done and the back button used $customer_prices_in_post = true; $sppc_cg_price = $pInfo->sppcprice[$customers_group['customers_group_id']]; } else { // nothing in the db, nothing in the post variables $sppc_cg_price = ''; } echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('sppcprice[' . $customers_group['customers_group_id'] . ']', $sppc_cg_price ); } ?></td> </tr> <tr> <td class="main"><?php echo TEXT_PRODUCTS_QTY_BLOCKS; ?></td> <td class="main"><?php if ($customer_prices_set == true) { $sppc_cg_products_qty_blocks = $attributes['products_qty_blocks']; } elseif ($customer_prices_in_post == true) { $sppc_cg_products_qty_blocks = $pInfo->sppcproducts_qty_blocks[$customers_group['customers_group_id']]; } else { $sppc_cg_products_qty_blocks = ''; } echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('sppcproducts_qty_blocks[' . $customers_group['customers_group_id'] . ']', $sppc_cg_products_qty_blocks, 'size="10"') . ' ' . TEXT_PRODUCTS_QTY_BLOCKS_INFO; ?></td> </tr> <tr> <td class="main"><?php echo TEXT_PRODUCTS_PRICE1; ?></td> <td class="main"><table border="0" cellspacing="0" cellpadding="0" width="80%"><tr> <td class="main" align="left"><?php if ($customer_prices_set == true) { $sppc_cg_products_price1 = $attributes['products_price1']; } elseif ($customer_prices_in_post == true) { $sppc_cg_products_price1 = $pInfo->sppcproducts_price1[$customers_group['customers_group_id']]; } else { $sppc_cg_products_price1 = ''; } echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('sppcproducts_price1[' . $customers_group['customers_group_id'] . ']', $sppc_cg_products_price1, 'size="10"'); ?></td> <td class="main" align="right"><?php echo TEXT_PRODUCTS_PRICE1_QTY; ?></td> <td class="main" align="left"><?php if ($customer_prices_set == true) { $sppc_cg_products_price1_qty = $attributes['products_price1_qty']; } elseif ($customer_prices_in_post == true) { $sppc_cg_products_price1_qty = $pInfo->sppcproducts_price1_qty[$customers_group['customers_group_id']]; } else { $sppc_cg_products_price1_qty = ''; } echo tep_draw_input_field('sppcproducts_price1_qty[' . $customers_group['customers_group_id'] . ']', $sppc_cg_products_price1_qty, 'size="10"'); ?></td> </tr></table></td> </tr> <tr> <td class="main"><?php echo TEXT_PRODUCTS_PRICE2; ?></td> <td class="main"><table border="0" cellspacing="0" cellpadding="0" width="80%"><tr> <td class="main" align="left"><?php if ($customer_prices_set == true) { $sppc_cg_products_price2 = $attributes['products_price2']; } elseif ($customer_prices_in_post == true) { $sppc_cg_products_price2 = $pInfo->sppcproducts_price2[$customers_group['customers_group_id']]; } else { $sppc_cg_products_price2 = ''; } echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('sppcproducts_price2[' . $customers_group['customers_group_id'] . ']', $sppc_cg_products_price2, 'size="10"'); ?></td> <td class="main" align="right"><?php echo TEXT_PRODUCTS_PRICE2_QTY; ?></td> <td class="main" align="left"><?php if ($customer_prices_set == true) { $sppc_cg_products_price2_qty = $attributes['products_price2_qty']; } elseif ($customer_prices_in_post == true) { $sppc_cg_products_price2_qty = $pInfo->sppcproducts_price2_qty[$customers_group['customers_group_id']]; } else { $sppc_cg_products_price2_qty = ''; } echo tep_draw_input_field('sppcproducts_price2_qty[' . $customers_group['customers_group_id'] . ']', $sppc_cg_products_price2_qty, 'size="10"'); ?></td> </tr></table></td> </tr> <tr> <td class="main"><?php echo TEXT_PRODUCTS_PRICE3; ?></td> <td class="main"><table border="0" cellspacing="0" cellpadding="0" width="80%"><tr> <td class="main" align="left"><?php if ($customer_prices_set == true) { $sppc_cg_products_price3 = $attributes['products_price3']; } elseif ($customer_prices_in_post == true) { $sppc_cg_products_price3 = $pInfo->sppcproducts_price3[$customers_group['customers_group_id']]; } else { $sppc_cg_products_price3 = ''; } echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('sppcproducts_price3[' . $customers_group['customers_group_id'] . ']', $sppc_cg_products_price3, 'size="10"'); ?></td> <td class="main" align="right"><?php echo TEXT_PRODUCTS_PRICE3_QTY; ?></td> <td class="main" align="left"><?php if ($customer_prices_set == true) { $sppc_cg_products_price3_qty = $attributes['products_price3_qty']; } elseif ($customer_prices_in_post == true) { $sppc_cg_products_price3_qty = $pInfo->sppcproducts_price3_qty[$customers_group['customers_group_id']]; } else { $sppc_cg_products_price3_qty = ''; } echo tep_draw_input_field('sppcproducts_price3_qty[' . $customers_group['customers_group_id'] . ']', $sppc_cg_products_price3_qty, 'size="10"'); ?></td> </tr></table></td> </tr> <tr> <td class="main"><?php echo TEXT_PRODUCTS_PRICE4; ?></td> <td class="main"><table border="0" cellspacing="0" cellpadding="0" width="80%"><tr> <td class="main" align="left"><?php if ($customer_prices_set == true) { $sppc_cg_products_price4 = $attributes['products_price4']; } elseif ($customer_prices_in_post == true) { $sppc_cg_products_price4 = $pInfo->sppcproducts_price4[$customers_group['customers_group_id']]; } else { $sppc_cg_products_price4 = ''; } echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('sppcproducts_price4[' . $customers_group['customers_group_id'] . ']', $sppc_cg_products_price4, 'size="10"'); ?></td> <td class="main" align="right"><?php echo TEXT_PRODUCTS_PRICE4_QTY; ?></td> <td class="main" align="left"><?php if ($customer_prices_set == true) { $sppc_cg_products_price4_qty = $attributes['products_price4_qty']; } elseif ($customer_prices_in_post == true) { $sppc_cg_products_price4_qty = $pInfo->sppcproducts_price4_qty[$customers_group['customers_group_id']]; } else { $sppc_cg_products_price4_qty = ''; } echo tep_draw_input_field('sppcproducts_price4_qty[' . $customers_group['customers_group_id'] . ']', $sppc_cg_products_price4_qty, 'size="10"'); ?></td> </tr></table></td> </tr> <tr> <td class="main"><?php echo TEXT_PRODUCTS_PRICE5; ?></td> <td class="main"><table border="0" cellspacing="0" cellpadding="0" width="80%"><tr> <td class="main" align="left"><?php if ($customer_prices_set == true) { $sppc_cg_products_price5 = $attributes['products_price5']; } elseif ($customer_prices_in_post == true) { $sppc_cg_products_price5 = $pInfo->sppcproducts_price5[$customers_group['customers_group_id']]; } else { $sppc_cg_products_price5 = ''; } echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('sppcproducts_price5[' . $customers_group['customers_group_id'] . ']', $sppc_cg_products_price5, 'size="10"'); ?></td> <td class="main" align="right"><?php echo TEXT_PRODUCTS_PRICE5_QTY; ?></td> <td class="main" align="left"><?php if ($customer_prices_set == true) { $sppc_cg_products_price5_qty = $attributes['products_price5_qty']; } elseif ($customer_prices_in_post == true) { $sppc_cg_products_price5_qty = $pInfo->sppcproducts_price5_qty[$customers_group['customers_group_id']]; } else { $sppc_cg_products_price5_qty = ''; } echo tep_draw_input_field('sppcproducts_price5_qty[' . $customers_group['customers_group_id'] . ']', $sppc_cg_products_price5_qty, 'size="10"'); ?></td> </tr></table></td> </tr> <tr> <td class="main"><?php echo TEXT_PRODUCTS_PRICE6; ?></td> <td class="main"><table border="0" cellspacing="0" cellpadding="0" width="80%"><tr> <td class="main" align="left"><?php if ($customer_prices_set == true) { $sppc_cg_products_price6 = $attributes['products_price6']; } elseif ($customer_prices_in_post == true) { $sppc_cg_products_price6 = $pInfo->sppcproducts_price6[$customers_group['customers_group_id']]; } else { $sppc_cg_products_price6 = ''; } echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('sppcproducts_price6[' . $customers_group['customers_group_id'] . ']', $sppc_cg_products_price6, 'size="10"'); ?></td> <td class="main" align="right"><?php echo TEXT_PRODUCTS_PRICE6_QTY; ?></td> <td class="main" align="left"><?php if ($customer_prices_set == true) { $sppc_cg_products_price6_qty = $attributes['products_price6_qty']; } elseif ($customer_prices_in_post == true) { $sppc_cg_products_price6_qty = $pInfo->sppcproducts_price6_qty[$customers_group['customers_group_id']]; } else { $sppc_cg_products_price6_qty = ''; } echo tep_draw_input_field('sppcproducts_price6_qty[' . $customers_group['customers_group_id'] . ']', $sppc_cg_products_price6_qty, 'size="10"'); ?></td> </tr></table></td> </tr> <tr> <td class="main"><?php echo TEXT_PRODUCTS_PRICE7; ?></td> <td class="main"><table border="0" cellspacing="0" cellpadding="0" width="80%"><tr> <td class="main" align="left"><?php if ($customer_prices_set == true) { $sppc_cg_products_price7 = $attributes['products_price7']; } elseif ($customer_prices_in_post == true) { $sppc_cg_products_price7 = $pInfo->sppcproducts_price7[$customers_group['customers_group_id']]; } else { $sppc_cg_products_price7 = ''; } echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('sppcproducts_price7[' . $customers_group['customers_group_id'] . ']', $sppc_cg_products_price7, 'size="10"'); ?></td> <td class="main" align="right"><?php echo TEXT_PRODUCTS_PRICE7_QTY; ?></td> <td class="main" align="left"><?php if ($customer_prices_set == true) { $sppc_cg_products_price7_qty = $attributes['products_price7_qty']; } elseif ($customer_prices_in_post == true) { $sppc_cg_products_price7_qty = $pInfo->sppcproducts_price7_qty[$customers_group['customers_group_id']]; } else { $sppc_cg_products_price7_qty = ''; } echo tep_draw_input_field('sppcproducts_price7_qty[' . $customers_group['customers_group_id'] . ']', $sppc_cg_products_price7_qty, 'size="10"'); ?></td> </tr></table></td> </tr> <tr> <td class="main"><?php echo TEXT_PRODUCTS_PRICE8; ?></td> <td class="main"><table border="0" cellspacing="0" cellpadding="0" width="80%"><tr> <td class="main" align="left"><?php if ($customer_prices_set == true) { $sppc_cg_products_price8 = $attributes['products_price8']; } elseif ($customer_prices_in_post == true) { $sppc_cg_products_price8 = $pInfo->sppcproducts_price8[$customers_group['customers_group_id']]; } else { $sppc_cg_products_price8 = ''; } echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('sppcproducts_price8[' . $customers_group['customers_group_id'] . ']', $sppc_cg_products_price8, 'size="10"'); ?></td> <td class="main" align="right"><?php echo TEXT_PRODUCTS_PRICE8_QTY; ?></td> <td class="main" align="left"><?php if ($customer_prices_set == true) { $sppc_cg_products_price8_qty = $attributes['products_price8_qty']; } elseif ($customer_prices_in_post == true) { $sppc_cg_products_price8_qty = $pInfo->sppcproducts_price8_qty[$customers_group['customers_group_id']]; } else { $sppc_cg_products_price8_qty = ''; } echo tep_draw_input_field('sppcproducts_price8_qty[' . $customers_group['customers_group_id'] . ']', $sppc_cg_products_price8_qty, 'size="10"'); ?></td> </tr></table></td> </tr> <tr> <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <?php } // end while ($customers_group = tep_db_fetch_array($customers_group_query)) ?> <tr> <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <!-- EOF Separate Pricing Per Customer --> and this is the code of hidenproduct i cant see what i must change. <!-- BOF Separate Pricing Per Customer --> hidenproduct <?php $customers_group_query = tep_db_query("select customers_group_id, customers_group_name from " . TABLE_CUSTOMERS_GROUPS . " where customers_group_id != '0' order by customers_group_id"); $header = false; while ($customers_group = tep_db_fetch_array($customers_group_query)) { if (tep_db_num_rows($customers_group_query) > 0) { $attributes_query = tep_db_query("select customers_group_id, customers_group_price from " . TABLE_PRODUCTS_GROUPS . " where products_id = '" . $pInfo->products_id . "' and customers_group_id = '" . $customers_group['customers_group_id'] . "' order by customers_group_id"); } else { $attributes = array('customers_group_id' => 'new'); } if (!$header) { ?> <tr bgcolor="#ebebff"> <td class="main" colspan="2" style="font-style: italic">Note that if a field is left empty, no price for that customer group will be inserted in the database.<br /> If a field is filled, but the checkbox is unchecked no price will be inserted either.<br /> If a price is already inserted in the database, but the checkbox unchecked it will be removed from the database. </td> </tr> <?php $header = true; } // end if (!header), makes sure this is only shown once ?> <tr bgcolor="#ebebff"> <td class="main"><?php if (isset($pInfo->sppcoption)) { echo tep_draw_checkbox_field('sppcoption[' . $customers_group['customers_group_id'] . ']', 'sppcoption[' . $customers_group['customers_group_id'] . ']', (isset($pInfo->sppcoption[ $customers_group['customers_group_id']])) ? 1: 0); } else { echo tep_draw_checkbox_field('sppcoption[' . $customers_group['customers_group_id'] . ']', 'sppcoption[' . $customers_group['customers_group_id'] . ']', true) . ' ' . $customers_group['customers_group_name']; } ?> </td> <td class="main"><?php if ($attributes = tep_db_fetch_array($attributes_query)) { echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('sppcprice[' . $customers_group['customers_group_id'] . ']', $attributes['customers_group_price']); } else { if (isset($pInfo->sppcprice[$customers_group['customers_group_id']])) { // when a preview was done and the back button used $sppc_cg_price = $pInfo->sppcprice[$customers_group['customers_group_id']]; } else { // nothing in the db, nothing in the post variables $sppc_cg_price = ''; } echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('sppcprice[' . $customers_group['customers_group_id'] . ']', $sppc_cg_price); } ?></td> </tr> <?php } // end while ($customers_group = tep_db_fetch_array($customers_group_query)) ?> <!-- BOF SPPC hide from groups mod --> <tr> <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> <td colspan="2" class="main" ><?php echo TEXT_HIDE_PRODUCTS_FROM_GROUP; ?></td> </tr> <?php $hide_customers_group_query = tep_db_query("select customers_group_id, customers_group_name from " . TABLE_CUSTOMERS_GROUPS . " order by customers_group_id"); $hide_from_groups_array = explode(',',$pInfo->products_hide_from_groups); $hide_from_groups_array = array_slice($hide_from_groups_array, 1); // remove "@" from the array while ($hide_customers_group = tep_db_fetch_array($hide_customers_group_query)) { ?> <tr bgcolor="#ebebff"> <td class="main" colspan="2"><?php if (isset($pInfo->hide)) { echo tep_draw_checkbox_field('hide[' . $hide_customers_group['customers_group_id'] . ']', $hide_customers_group['customers_group_id'] , (isset($pInfo->hide[ $hide_customers_group['customers_group_id']])) ? 1: 0); } else { echo tep_draw_checkbox_field('hide[' . $hide_customers_group['customers_group_id'] . ']', $hide_customers_group['customers_group_id'] , (in_array($hide_customers_group['customers_group_id'], $hide_from_groups_array)) ? 1: 0); } ?> <?php echo $hide_customers_group['customers_group_name']; ?></td> </tr> <?php } // end while ($hide_customers_group = tep_db_fetch_array($hide_customers_group_query)) ?> <tr> <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <!-- EOF Separate Pricing Per Customer -->
  18. nervens?ge

    Seperate Pricing Per Customer v3.5

    Tax_info 1.0 and SPPC works. function display_price($products_price, $products_tax, $quantity = 1) { if (TAX_INFO_ONOFF == 'Enabled') { $return = $this->format(tep_add_tax($products_price, $products_tax) * $quantity); global $tag; // BOF Separate Price per Customer global $sppc_customer_group_id; if (!tep_session_is_registered('sppc_customer_group_id')) { $customer_group_id = '0'; } else { $customer_group_id = $sppc_customer_group_id; } // EOF Separate Price per Customer if ($customer_group_id == '2') { $text_info_tax = TEXT_INFO_TAX2; } elseif ($customer_group_id == '3') { $text_info_tax = TEXT_INFO_TAX3; } else { $text_info_tax = TEXT_INFO_TAX; } $return .= "<br><div class=\"tax_info\">" . sprintf($text_info_tax, $products_tax , tep_href_link(FILENAME_SHIPPING)) . "</div>"; return $return; } else { return $this->format(tep_add_tax($products_price, $products_tax) * $quantity); } The define text: define('TEXT_INFO_TAX', '[inkl. %s%% MwSt zzgl. <a href="%s" class="tax_info"><u>Versandkosten</u></a>]'); define('TEXT_INFO_TAX2', '[inkl. %s%% MwSt zzgl. <a href="%s" class="tax_info"><u>Versandkosten</u></a>]'); define('TEXT_INFO_TAX3', '[excl. %s%% MwSt zzgl. <a href="%s" class="tax_info"><u>Versandkosten</u></a>]'); But its must changed for tax_info 1.3 bug in dropdown-menue: function display_price($products_price, $products_tax, $quantity = 1) { if (TAX_INFO_ONOFF == 'Enabled') { $return = $this->format(tep_add_tax($products_price, $products_tax) * $quantity); global $tag; $return .= "<br><div class=\"tax_info\">" . sprintf(TEXT_INFO_TAX, $products_tax , tep_href_link(FILENAME_SHIPPING)) . "</div>"; return $return; } else { return $this->format(tep_add_tax($products_price, $products_tax) * $quantity); } } function display_price2($products_price, $products_tax, $quantity = 1) { if (TAX_INFO_ONOFF == 'Enabled') { $return = $this->format(tep_add_tax($products_price, $products_tax) * $quantity); global $tag; #$return .= "<br><div class=\"tax_info\">" . sprintf(TEXT_INFO_TAX, $products_tax , tep_href_link(FILENAME_SHIPPING)) . "</div>"; return $return; } else { return $this->format(tep_add_tax($products_price, $products_tax) * $quantity); } } } changed in product_info.php // $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') '; $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price2($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') '; i have test it but its not works. function display_price($products_price, $products_tax, $quantity = 1) { if (TAX_INFO_ONOFF == 'Enabled') { $return = $this->format(tep_add_tax($products_price, $products_tax) * $quantity); global $tag; // BOF Separate Price per Customer global $sppc_customer_group_id; if (!tep_session_is_registered('sppc_customer_group_id')) { $customer_group_id = '0'; } else { $customer_group_id = $sppc_customer_group_id; } // EOF Separate Price per Customer if ($customer_group_id == '2') { $text_info_tax = TEXT_INFO_TAX2; } elseif ($customer_group_id == '3') { $text_info_tax = TEXT_INFO_TAX3; } else { $text_info_tax = TEXT_INFO_TAX; } $return .= "<br><div class=\"tax_info\">" . sprintf(TEXT_INFO_TAX, $products_tax , tep_href_link(FILENAME_SHIPPING)) . "</div>"; return $return; } else { return $this->format(tep_add_tax($products_price, $products_tax) * $quantity); } } function display_price2($products_price, $products_tax, $quantity = 1) { if (TAX_INFO_ONOFF == 'Enabled') { $return = $this->format(tep_add_tax($products_price, $products_tax) * $quantity); global $tag; // BOF Separate Price per Customer global $sppc_customer_group_id; if (!tep_session_is_registered('sppc_customer_group_id')) { $customer_group_id = '0'; } else { $customer_group_id = $sppc_customer_group_id; } // EOF Separate Price per Customer if ($customer_group_id == '2') { $text_info_tax = TEXT_INFO_TAX2; } elseif ($customer_group_id == '3') { $text_info_tax = TEXT_INFO_TAX3; } else { $text_info_tax = TEXT_INFO_TAX; } #$return .= "<br><div class=\"tax_info\">" . sprintf(TEXT_INFO_TAX, $products_tax , tep_href_link(FILENAME_SHIPPING)) . "</div>"; return $return; } else { return $this->format(tep_add_tax($products_price, $products_tax) * $quantity); } } } ?> i can kill me :blush: Please the last step, i cant say what i can do. :blush:
  19. nervens?ge

    Seperate Pricing Per Customer v3.5

    function display_price($products_price, $products_tax, $quantity = 1) { if (TAX_INFO_ONOFF == 'Enabled') { $return = $this->format(tep_add_tax($products_price, $products_tax) * $quantity); global $tag; if ($customer_group_id == '2') { $text_info_tax = TEXT_INFO_TAX2; } elseif ($customer_group_id == '3') { $text_info_tax = TEXT_INFO_TAX3; } else { $text_info_tax = TEXT_INFO_TAX; } $return .= "<br><div class=\"tax_info\">" . sprintf($text_info_tax, $products_tax , tep_href_link(FILENAME_SHIPPING)) . "</div>"; return $return; } else { return $this->format(tep_add_tax($products_price, $products_tax) * $quantity); } its not works the only one is the TEXT_INFO_TAX and the rest goes not is this a bug in my shop the tax_info_onoff is the tax info contrieb for enable disable the tax display by price.
  20. nervens?ge

    Seperate Pricing Per Customer v3.5

    TAX_INFO_ONOFF this is from tax_info contrieb
  21. nervens?ge

    Seperate Pricing Per Customer v3.5

    that is my code from product_info.php around text indicates depending upon customer group with the price to receive. so that it for Germany would be correct would have I in the whole shop to insert where price indicates is and that is very much the correct would be if this indicates of includes/classes/currencies.php is steered. $products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])); if ($customer_group_id == '2') { // dealer Germany $products_price .= "<br />\n[dealer Germany]"; } elseif ($customer_group_id == '3') { // dealer Europe $products_price .= "<br />\n[dealer Europe]"; } elseif ($customer_group_id == '1') { // retail customers $products_price .= "<br />\n[customers]"; } here is my code of tax_info can to me someone say like that to be inserted there can? function display_price($products_price, $products_tax, $quantity = 1) { if (TAX_INFO_ONOFF == 'Enabled') { $return = $this->format(tep_add_tax($products_price, $products_tax) * $quantity); global $tag; $return .= "<br><div class=\"tax_info\">" . sprintf(TEXT_INFO_TAX, $products_tax , tep_href_link(FILENAME_SHIPPING)) . "</div>"; return $return; } else { return $this->format(tep_add_tax($products_price, $products_tax) * $quantity); }
  22. nervens?ge

    Seperate Pricing Per Customer v3.5

    $products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])); if ($customer_group_id == '1') { // dealer Germany $products_price .= "<br />\n[dealer Germany]"; } elseif ($customer_group_id == '2') { // dealer Europe $products_price .= "<br />\n[dealer Europe]"; } else { // retail customers $products_price .= "<br />\n[customers]"; } // end if ($customer_group_id == '1') customers/ group retail dealer Germany/ group 1 dealer Europe/ group 2 its works thanks
  23. nervens?ge

    Seperate Pricing Per Customer v3.5

    must i make it so ? if ($customer_group_id == '1') //customer if ($customer_group_id == '2') //dealer-german if ($customer_group_id == '3') //dealer-europe or is this a automatic generate the correct tax show on price ?
  24. nervens?ge

    Seperate Pricing Per Customer v3.5

    I can change it self, but i mean the orginal code of sppc who must it repleace/add/insert ? must i change a line // EOF Separate Price per Customer $products_price = '<s>' . $currencies->display_price($product_info['products_price'], with this (changed code for product_info.php, around line 102 and further): CODE // EOF Separate Price per Customer $products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])); if ($customer_group_id == '1') { // dealer Germany $products_price .= "<br />\n[excl. 16% VAT zzgl. shipping]"; } elseif ($customer_group_id == '1') { // dealer Europe $products_price .= "<br />\n[taxfree zzgl. shipping]"; } else { // retail customers $products_price .= "<br />\n[inkl. 16% VAT zzgl. shipping]"; } // end if ($customer_group_id == '1') } if (tep_not_null($product_info['products_model'])) { or repleace the complet mod // BOF Separate Price per Customer $scustomer_group_price_query = tep_db_query("select customers_group_price from " . TABLE_PRODUCTS_GROUPS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id']. "' and customers_group_id = '" . $customer_group_id . "'"); if ($scustomer_group_price = tep_db_fetch_array($scustomer_group_price_query)) { $product_info['products_price']= $scustomer_group_price['customers_group_price']; } // EOF Separate Price per Customer $products_price = '<s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>'; } else { // BOF Separate Price per Customer $scustomer_group_price_query = tep_db_query("select customers_group_price from " . TABLE_PRODUCTS_GROUPS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id']. "' and customers_group_id = '" . $customer_group_id . "'"); if ($scustomer_group_price = tep_db_fetch_array($scustomer_group_price_query)) { $product_info['products_price']= $scustomer_group_price['customers_group_price']; } // EOF Separate Price per Customer
×