Jump to content

beruska77

Members
  • Content count

    14
  • Joined

  • Last visited

1 Follower

Profile Information

  • Real Name
    beruska
  1. so here is the fix :) i deleted all entries from the table product_images and run the install.php now its only show once, still THANK YOU FOR YOUR GREAT HELP!!!! REGARDS BERUSKA
  2. okay i have taken the files from more_pix_2.0.7_rollup\more_pics_advanced_2.0.6\catalog i still have the same problem that the products are shown twice... it makes me crazy... i also used the file install.php to update the pictures to my database product_images REGARDS BERUSKA
  3. thank you for your answere... the query is from the index file included in the latest if i dont update the query then i dont have the images shown in product_listing :( i am stuck with it somehow ¿¿¿ no mater how i do it, it comes out as having the product two times or saying i dont have any products in that categorie! REGARDS BERUSKA
  4. hi, great contrib, works for me in admin and product_info page. i dont use it elsewhere exept for product_listing where i am having the problem that my products get listed twice when i insert the querys in index.php ;i guess i has got something to do with the left join but for some reason i cant figure it out, please help me! :blush: REGARDS BERUSKA
  5. beruska77

    [Contribution] Extra Fields

    Hi there Everybody! i use http://www.oscommerce.com/community/contri...ttribute+search as a base, modified for PEF. Now my code look like.advanced_search.php it shows, all Produkt Extra Fields in dropdown my advanced search_result.php look like ... $where_str .= " and find_in_set('".$customer_group_id."', products_hide_from_groups) = 0 "; // search in extra fields $attributes_pef_query = tep_db_query("select * from " . TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS . " "); $option_value_selected_pef = false; while ($attributes_pef = tep_db_fetch_array($attributes_pef_query)) { if (isset($HTTP_GET_VARS["'product_extra_field_name'"]) && !empty($HTTP_GET_VARS["'product_extra_field_name'"])) $option_value_selected_pef = true; } if ($option_value_selected_pef == true){ $attributes2_pef_query = tep_db_query("select * from " . TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS . " "); while ($attributes2_pef = tep_db_fetch_array($attributes2_pef_query)) { if (isset($HTTP_GET_VARS[$option_values_pef["products_extra_fields_value"]]) && !empty($HTTP_GET_VARS[$attributes2_pef["products_extra_fields_value"]])) { $str_selected_values_pef .= $HTTP_GET_VARS[$attributes2_pef["products_extra_fields_value"]].","; } } $str_selected_values_pef = substr($str_selected_values_pef,0,strlen($str_selected_values_pef) - 1); $where_str .= " and p2pef.products_extra_fields_id in (" . $str_selected_values_pef .") and p.products_id = p2pef.products_id"; } My Problem $option_value_selected_pef dont becom value true! I can see value in array when i set $option_value_selected_pef = false; to $option_value_selected_pef = true; i can see in the query $where_str .= " and p2pef.products_extra_fields_id in (" . $str_selected_values_pef .") and p.products_id = p2pef.products_id"; $str_selected_values_pef dont have value can anybody help? (please) cz
  6. beruska77

    Seperate Pricing Per Customer v3.5

    Dont matter as it did not even insert the 1 ;) THANK YOU, THANK YOU, THANK YOU, that worked out for me! it was showing the array on the preview but it simple did not insert! But now it works :D i will send you a pm with the changes later for all that have Categories Description installed! Beruska CZ
  7. beruska77

    Seperate Pricing Per Customer v3.5

    hi Janz, i would like to add to my above post that $sort_order = tep_db_prepare_input($HTTP_POST_VARS['sort_order']); $hide_cats_from_these_groups = '1'; looks like $sort_order = tep_db_prepare_input($HTTP_POST_VARS['sort_order']); i droped the $hide_cats_from_these_groups = '1'; as it was only a test :-" Beruska CZ
  8. beruska77

    Seperate Pricing Per Customer v3.5

    Thank you Janz, i past the whole case: // categorie description case 'new_category': case 'edit_category': if (ALLOW_CATEGORY_DESCRIPTIONS == 'true') $HTTP_GET_VARS['action']=$HTTP_GET_VARS['action'] . '_ACD'; break; case 'insert_category': case 'update_category': if ( ($HTTP_POST_VARS['edit_x']) || ($HTTP_POST_VARS['edit_y']) ) { $HTTP_GET_VARS['action'] = 'edit_category_ACD'; } else { if (isset($HTTP_POST_VARS['categories_id'])) $categories_id = tep_db_prepare_input($HTTP_POST_VARS['categories_id']); if ($categories_id == '') { $categories_id = tep_db_prepare_input($HTTP_GET_VARS['cID']); } // BOF Separate Pricing Per Customer, hide categories from groups $hide_cats_from_these_groups = '@,'; if ( $HTTP_POST_VARS['hide_cat'] ) { // if any of the checkboxes are checked foreach($HTTP_POST_VARS['hide_cat'] as $val) { $hide_cats_from_these_groups .= tep_db_prepare_input($val).','; } // end foreach } $hide_cats_from_these_groups = substr($hide_cats_from_these_groups,0,strlen($hide_cats_from_these_groups)-1); // remove last comma $sort_order = tep_db_prepare_input($HTTP_POST_VARS['sort_order']); $hide_cats_from_these_groups = '1'; $sql_data_array = array('sort_order' => $sort_order, 'categories_hide_from_groups' => $hide_cats_from_these_groups); // EOF Separate Pricing Per Customer, hide categories from groups if ($action == 'insert_category') { $insert_sql_data = array('parent_id' => $current_category_id, 'date_added' => 'now()'); $sql_data_array = array_merge($sql_data_array, $insert_sql_data); tep_db_perform(TABLE_CATEGORIES, $sql_data_array); $categories_id = tep_db_insert_id(); } elseif ($action == 'update_category') { $update_sql_data = array('last_modified' => 'now()'); $sql_data_array = array_merge($sql_data_array, $update_sql_data); tep_db_perform(TABLE_CATEGORIES, $sql_data_array, 'update', "categories_id = '" . (int)$categories_id . "'"); } $languages = tep_get_languages(); for ($i=0, $n=sizeof($languages); $i<$n; $i++) { $categories_name_array = $HTTP_POST_VARS['categories_name']; $language_id = $languages[$i]['id']; $sql_data_array = array('categories_name' => tep_db_prepare_input($categories_name_array[$language_id])); // categorie description if (ALLOW_CATEGORY_DESCRIPTIONS == 'true') { $sql_data_array = array('categories_name' => tep_db_prepare_input($HTTP_POST_VARS['categories_name'][$language_id]), 'categories_heading_title' => tep_db_prepare_input($HTTP_POST_VARS['categories_heading_title'][$language_id]), 'categories_description' => tep_db_prepare_input($HTTP_POST_VARS['categories_description'][$language_id])); } // categorie description if ($action == 'insert_category') { $insert_sql_data = array('categories_id' => $categories_id, 'language_id' => $languages[$i]['id']); $sql_data_array = array_merge($sql_data_array, $insert_sql_data); tep_db_perform(TABLE_CATEGORIES_DESCRIPTION, $sql_data_array); } elseif ($action == 'update_category') { tep_db_perform(TABLE_CATEGORIES_DESCRIPTION, $sql_data_array, 'update', "categories_id = '" . (int)$categories_id . "' and language_id = '" . (int)$languages[$i]['id'] . "'"); } } // categorie description if (ALLOW_CATEGORY_DESCRIPTIONS == 'true') { tep_db_query("update " . TABLE_CATEGORIES . " set categories_image = '" . $HTTP_POST_VARS['categories_image'] . "' where categories_id = '" . tep_db_input($categories_id) . "'"); $categories_image = ''; } else { if ($categories_image = new upload('categories_image', DIR_FS_CATALOG_IMAGES)) { tep_db_query("update " . TABLE_CATEGORIES . " set categories_image = '" . tep_db_input($categories_image->filename) . "' where categories_id = '" . (int)$categories_id . "'"); } } // categorie description // categorie picture overlib if (ALLOW_CATEGORY_DESCRIPTIONS == 'true') { tep_db_query("update " . TABLE_CATEGORIES . " set categories_image_popup = '" . $HTTP_POST_VARS['categories_image_popup'] . "' where categories_id = '" . tep_db_input($categories_id) . "'"); $categories_image = ''; } else { if ($categories_image = new upload('categories_image', DIR_FS_CATALOG_IMAGES)) { tep_db_query("update " . TABLE_CATEGORIES . " set categories_image_popup = '" . tep_db_input($categories_image_popup->filename) . "' where categories_id = '" . (int)$categories_id . "'"); } } // ?nd overlib if (USE_CACHE == 'true') { tep_reset_cache_block('categories'); tep_reset_cache_block('also_purchased'); } tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&cID=' . $categories_id)); // categorie description } // categorie description break; Beruska CZ
  9. beruska77

    Seperate Pricing Per Customer v3.5

    thank you... allready try to but it still wont work :'( Beruska
  10. beruska77

    Seperate Pricing Per Customer v3.5

    Thank You!!!!!!!!!! I am trying to make it so i can edit it from admin. My code is case 'new_category': case 'edit_category': if (ALLOW_CATEGORY_DESCRIPTIONS == 'true') $HTTP_GET_VARS['action']=$HTTP_GET_VARS['action'] . '_ACD'; break; case 'insert_category': case 'update_category': if ( ($HTTP_POST_VARS['edit_x']) || ($HTTP_POST_VARS['edit_y']) ) { $HTTP_GET_VARS['action'] = 'edit_category_ACD'; } else { if (isset($HTTP_POST_VARS['categories_id'])) $categories_id = tep_db_prepare_input($HTTP_POST_VARS['categories_id']); // BOF Separate Pricing Per Customer, hide categories from groups $hide_cats_from_these_groups = '@,'; if ( $HTTP_POST_VARS['hide_cat'] ) { // if any of the checkboxes are checked foreach($HTTP_POST_VARS['hide_cat'] as $val) { $hide_cats_from_these_groups .= tep_db_prepare_input($val).','; } // end foreach $hide_cats_from_these_groups = substr($hide_cats_from_these_groups,0,strlen($hide_cats_from_these_groups)-1); // remove last comma } if ($categories_id == '') { $categories_id = tep_db_prepare_input($HTTP_GET_VARS['cID']); } $sort_order = tep_db_prepare_input($HTTP_POST_VARS['sort_order']); $sql_data_array = array('sort_order' => $sort_order); if ($action == 'insert_category') { but it wont work! Beruska
  11. beruska77

    Seperate Pricing Per Customer v3.5

    sorry about that! here is a litle correction to my code. i was messing about with the radio buttons in the standard right menu! <tr> <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> <tr> <td class="main"><?php echo TEXT_EDIT_CATEGORIES_IMAGE; ?></td> <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_file_field('categories_image') . '<br>' . tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . $cInfo->categories_image . tep_draw_hidden_field('categories_previous_image', $cInfo->categories_image); ?></td> </tr> <!-- 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_categories_customers_group_query = tep_db_query("select customers_group_id, customers_group_name from " . TABLE_CUSTOMERS_GROUPS . " order by customers_group_id"); $hide_categories_from_groups_array = explode(',',$cInfo->categories_hide_from_groups); $hide_categories_from_groups_array = array_slice($hide_categories_from_groups_array, 1); // remove "@" from the array while ($hide_categories_customers_group = tep_db_fetch_array($hide_categories_customers_group_query)) { ?> <tr bgcolor="#ebebff"> <td class="main" colspan="2"><?php if (isset($cInfo->categories)) { echo tep_draw_checkbox_field('hide_cat[' . $hide_categories_customers_group['customers_group_id'] . ']', $hide_categories_customers_group['customers_group_id'] , (isset($cInfo->categories[ $hide_categories_customers_group['customers_group_id']])) ? 1: 0); } else { echo tep_draw_checkbox_field('hide_cat[' . $hide_categories_customers_group['customers_group_id'] . ']', $hide_categories_customers_group['customers_group_id'] , (in_array($hide_categories_customers_group['customers_group_id'], $hide_categories_from_groups_array)) ? 1: 0); } } ?> <tr> <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <!-- EOF Separate Pricing Per Customer --> <tr> <td class="main"><?php echo TEXT_EDIT_SORT_ORDER; ?></td> <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('sort_order', $cInfo->sort_order, 'size="2"'); ?></td> </tr> <tr> <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> Regards Beruska
  12. beruska77

    Seperate Pricing Per Customer v3.5

    hi JanZ thank you for your pm, hope you had a nice holiday :) as i allready mentioned is that i have "categories_description" installed so my kategories page looks like the produkt page. to show me the buttons for hiden categories i changed the code arround like <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_KATEGORIES_FROM_GROUP; ?></td> </tr> <?php $hide_categories_customers_group_query = tep_db_query("select customers_group_id, customers_group_name from " . TABLE_CUSTOMERS_GROUPS . " order by customers_group_id"); $hide_categories_from_groups_array = explode(',',$cInfo->categories_hide_from_groups); $hide_categories_from_groups_array = array_slice($hide_categories_from_groups_array, 1); // remove "@" from the array while ($hide_categories_customers_group = tep_db_fetch_array($hide_categories_customers_group_query)) { ?> <tr bgcolor="#ebebff"> <td class="main" colspan="2"><?php if (isset($cInfo->categories)) { echo tep_draw_checkbox_field('hide_cat[' . $hide_categories_customers_group['customers_group_id'] . ']', $hide_categories_customers_group['customers_group_id'] , (isset($cInfo->categories[ $hide_categories_customers_group['customers_group_id']])) ? 1: 0); } else { echo tep_draw_checkbox_field('hide_cat[' . $hide_categories_customers_group['customers_group_id'] . ']', $hide_categories_customers_group['customers_group_id'] , (in_array($hide_categories_customers_group['customers_group_id'], $hide_categories_from_groups_array)) ? 1: 0); } ?> <?php echo $hide_categories_customers_group['customers_group_name']; ?></td> </tr> <tr bgcolor="#ebebff"> <td class="main" colspan="2"><?php } $category_hide_string = '<br>'. "\n" . TEXT_HIDE_CATEGORIES_FROM_GROUPS; for ($i = 0; $i < count($customers_groups); $i++) { $category_hide_string .= '<br>' . "\n" . tep_draw_checkbox_field('hide_cat[' . $customers_groups[$i]['id'] . ']', $customers_groups[$i]['id'] , (in_array($customers_groups[$i]['id'], $hide_cat_from_groups_array)) ? 1: 0) . ' ' . $customers_groups[$i]['text']; } echo $category_hide_string; // end while ($hide_categories_customers_group = tep_db_fetch_array($hide_categories_customers_group_query)) ?> </td> </tr> <tr> <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <!-- EOF Separate Pricing Per Customer --> <tr> <td class="main"><?php echo TEXT_EDIT_SORT_ORDER; ?></td> <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('sort_order', $cInfo->sort_order, 'size="2"'); ?></td> </tr> It shows the buttons and if a customer group is selected it is ticked (i can only chose manually by phpmyadmin) if i then chose one or simple just update the page the hiden categorie settings are dropped. any clue? Regards Beruska
×