Johnatan

Members
  • Content count

    39
  • Joined

  • Last visited

Community Reputation

0 Neutral

2 Followers

About Johnatan

  • Birthday 05/24/1983

Profile Information

  • Real Name
    Johnatan
  • Location
    Croatia

Contact Methods

  1. If I click to main category and then to subcategory, I have URL for ex. mydomain.com/main_category/subcategory-c-1_16.html but when I click on product in this subcategory I get this mydomain.com/subcategory/product_name-p-105.html ?!
  2. Thanks for your reply. I alredy done all this what you wrote but this not working for me at all. My product link is made up of: cp. Also I'm using path_rewrite mode. Add category parent to beginning of category uris is set to TRUE. But nothing happend. My URL's are the same mydomain.com/subcategory/product_name. There is no main category (mydomain.com/MAIN CATEGORY/subcategory/product_name). I think that "Add category parent to beginning of category uris" doesn't wotk for me, I mean nothing happen if I set it tu true or false?! Please, please could someone give me some direction what to look or where is the problem? thx in advance
  3. I'm having problem about showing my URL with USU5 I getting this: www.mydomain.com/subcategory/product-name-p-180 I want this: www.mydomain.com/category/subcategory/product-name-p-180 or www.mydomain.com/category/subcategory/product-name Is this possible?! please help ASAP thnx
  4. I'm using this addon for a few month and now I reached a BIG problem for my site... In admin section when I edit product there is no picture show for that product. But in main categories/products listing I see picture. So, If I changing some text of my prodtcs and click on SAVE, picture dissappear. If I upload new picture (but I can't do that for 1000 products) with OPI everything is OK. Please HELP ASAP thnx J.
  5. Hi to all, I have installed TotalB2B and featured products. Please if someone know how to bypass customer discount on featured products like as on specials. Let me explain.... I choose some product to be my fetaured products, and I give for some customer for example 10% on manufacturer A. Two of my featured products are from manufacturer A, and I don't want to discount these two products. Please I need advice or resolution ASAP. thnx
  6. Hi Parikesit, thnx or useful add-on, I like it very much. I'll use it on my new shop, but I need your help (advice). I don't have all pictures, but path to it exist in database. Before I used Easy-no-picture addon to shows, if I don't have image (there is no file in images dir) shows default image "nopic.jpg". here is the code: catalog/includes/functions/html_output.php //// // The HTML image wrapper function if ( (empty($src) || ($src == DIR_WS_IMAGES)) && (IMAGE_REQUIRED == 'false') ) { $src=DIR_WS_IMAGES.'nopic.jpg'; //no image url when you upload the product. } //for what`s the url like :'images/aa/' if(!file_exists($src)||strlen(strstr($src,"."))<=0){ $src=DIR_WS_IMAGES.'nopic.jpg'; } //over When I instaslled your contrib, everything is fine but only in product_info.php page nopic.jpg appears instead of image until you click on it to increase Do u have some advice greeting from croatia J.
  7. Hello from Croatia, thanks for your contrib but please can you translate it to english. I'm very interesting about it thnx
  8. look in PM's
  9. After two sleepless nights (and a ton of smoked cigarettes - just kidding) I finally came up with a solution. I had installed PDF invoice and Pslip with FPDF. I downloaded TCPDF. I copied tcpdf.php in fpdf directory and renamed it in fpdf.php. I copied all the .php files in tcpdf directory to fpdf dir. I also copied the config and the fonts directory to fpdf directory. Then I changed the pdfinvoice.php (around line 125) class PDF extends FPDF in class PDF extends TCPDF then I Setting up a Verdana font for usage with TCPDF (described in the Utils folder) [if you need help with changing the fonts, just ask]. upload it to the fonts directory. in tcpdf.php (or now renamed fpdf.php) I replaced all the source codes courier with verdana. and that's it...now I have Croatian special characters [šđč枊ĐČĆŽ]
  10. Hi, I'm stuck at the first change in product_info.php. I'm using BOF Enable & Disable Categories contribution and I don't know how to change my rows with the necessary for this contrib. Please can you help, I really need this contribution. Here is my code. // BOF Enable & Disable Categories $product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p 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, " . TABLE_PRODUCTS_DESCRIPTION . " pd where c.categories_status = '1' and p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); // EOF Enable & Disable Categories Johnatan
  11. I found where the problem is. something here.... // Begin PHPlist Newsletter add-on /* $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_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_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'] . "'"); $customers = tep_db_fetch_array($customers_query); $cInfo = new objectInfo($customers); */ $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_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_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'] . "'"); $customers = tep_db_fetch_array($customers_query); $cInfo = new objectInfo($customers); require(DIR_WS_INCLUDES . '/phplist_define.php'); //get the phplist specifics //get user specifics from PHPlist $existing_email_query = tep_db_query("select id, email, foreignkey from " . PHPLIST_DB . "" . PHPLIST_TABLE_PREFIX . "user_user where email = '" . $cInfo->customers_email_address . "'"); //check for existing by email address $existing_user_query = tep_db_query("select id, foreignkey, email from " . PHPLIST_DB . "" . PHPLIST_TABLE_PREFIX . "user_user where foreignkey = " . $cInfo->customers_id . ""); //check for existing by phplist userid in case they subscribed using another method. $existing_email = tep_db_fetch_array($existing_email_query); $existing_user = tep_db_fetch_array($existing_user_query); if (tep_db_num_rows($existing_user_query) > 0) //check for user subscription $newsletter_query = tep_db_query("select userid from " . PHPLIST_DB . "" . PHPLIST_TABLE_PREFIX . "listuser where listid = " . PHPLIST_LISTNO . " and userid = " . $existing_user['id'] . ""); else $newsletter_query = tep_db_query("select userid from " . PHPLIST_DB . "" . PHPLIST_TABLE_PREFIX . "listuser," . PHPLIST_DB . "" . PHPLIST_TABLE_PREFIX . "user_user where listid = " . PHPLIST_LISTNO . " and userid = id and email = '" . $cInfo->customers_email_address . "'"); $cInfo->customers_newsletter = ((tep_db_num_rows($newsletter_query) < 1) ? '0' : '1'); // End PHPlist Newsletter add-on when I make a option to recieve newsletters in create_account.php this part of contrib makes me a change in admin/customers.php to unsubscribed please if somone can help?!
  12. For me everything works great, but only one punctilio makes me crazy. When I put checkmark to newsletter in create_account.php my customer is not subscribed to newsletter. I must go in admin section and open customer and makes him subscribed. I think here is the mistake: //subscribe logic if ($newsletter) { if (tep_db_num_rows($existing_email_query) < 1) { //no existing user by email address found (therefore a new user - no id or email found) $id = md5(uniqid(mt_rand())); //generate unique id and add new user to database tep_db_query("insert into " . PHPLIST_DB . "" . PHPLIST_TABLE_PREFIX . "user_user (email, confirmed, subscribepage, entered, modified, disabled, uniqid, htmlemail, foreignkey) values ('" . $email_address . "', 1, " . PHPLIST_SPAGE . ", now(), now(), 0, '" . $id . "', " . PHPLIST_HTMLEMAIL . ", " . $customer_id . ")"); //insert the new user into phplist $user_query=tep_db_query("select id from " . PHPLIST_DB . "" . PHPLIST_TABLE_PREFIX . "user_user where email = '" . $email_address . "'"); //get the new user's phplist id $user = tep_db_fetch_array($user_query); tep_db_query("insert into " . PHPLIST_DB . "" . PHPLIST_TABLE_PREFIX . "user_user_attribute (attributeid, userid, value) values (" . PHPLIST_FIRSTNAME . ", " . $user['id'] . ", '" . $firstname . "')"); //add the users firstname to the attributes table tep_db_query("insert into " . PHPLIST_DB . "" . PHPLIST_TABLE_PREFIX . "user_user_attribute (attributeid, userid, value) values (" . PHPLIST_LASTNAME . ", " . $user['id'] . ", '" . $lastname . "')"); //add the users lastname to the attributes table tep_db_query("insert into " . PHPLIST_DB . "" . PHPLIST_TABLE_PREFIX . "listuser (userid, listid, entered) values (" . $user['id'] . ", " . PHPLIST_LISTNO . ", now())"); //subscribe the new user to the correct list //generating history $history_detail_text .= "\nSubscribepage = " . PHPLIST_SPAGE . "\nforeign key = " . $customer_id . "\n"; $attribute_name_query = tep_db_query("select name from " . PHPLIST_DB . "" . PHPLIST_TABLE_PREFIX . "user_attribute where id = " . PHPLIST_FIRSTNAME . ""); $attribute_name = tep_db_fetch_array($attribute_name_query); $history_detail_text .= "" . $attribute_name[name] . " = " . $firstname . "\n"; $attribute_name_query = tep_db_query("select name from " . PHPLIST_DB . "" . PHPLIST_TABLE_PREFIX . "user_attribute where id = " . PHPLIST_LASTNAME . ""); $attribute_name = tep_db_fetch_array($attribute_name_query); $history_detail_text .= "" . $attribute_name[name] . " = " . $lastname . "\n"; $list_name_query = tep_db_query("select name from " . PHPLIST_DB . "" . PHPLIST_TABLE_PREFIX . "list where id = " . PHPLIST_LISTNO . ""); $list_name = tep_db_fetch_array($list_name_query); $history_detail_text .= "\nList subscriptions:\n" . $list_name['name'] . ""; tep_db_query("insert into " . PHPLIST_DB . "" . PHPLIST_TABLE_PREFIX . "user_user_history (userid, ip, date, summary, detail, systeminfo) values (" . $user['id'] . ", '" . $_SERVER["REMOTE_ADDR"] . "', '" . date('Y-m-d H:i:s') . "', 'Update through osC', '" . $history_detail_text . "', '" . $history_systeminfo_text . "')"); PLEASE HELP BR Johnatan
  13. Please if someone can help me with some changes. This contrib shows my second subcategory, model and manufacturer, but I also whant to show primary categorie (i mean first category) Can someone can help me? BR Johnatan
  14. I need help and each word is welcome. Is there any possibility to don't reset category fields after the latest category was pick out?! The main problem is because script doesn't remember which 1st category was choose. I need help indeed. Thanks in advance here is the code //DRAW THE FIRST MAIN DROP DOWN echo tep_draw_pull_down_menu('Menu', $category_main, '', 'onChange="updateOptions(0,this.options[this.selectedIndex].value);"'); $default_text = array(array('id' => '', 'text' => FILTER_DEFAULT_TEXT_INACTIVE)); // DRAW THE REST OF THE DROP DOWNS - start at 1, 0 is already drawn for ($i=1, $n=$num_max_cats; $i<$n; ++$i) { $menu_number = $i; echo FILTER_DROP_DOWN_DEVIDER; echo tep_draw_pull_down_menu('Menu', $default_text, '', 'onChange="updateOptions(' . $menu_number . ',this.options[this.selectedIndex].value);"'); } //DRAW DEFAULT HIDDEN FIELDS echo tep_draw_hidden_field('sort', $HTTP_GET_VARS['sort']); echo tep_draw_hidden_field('manufacturers_id', $HTTP_GET_VARS['manufacturers_id']); echo tep_draw_hidden_field('filter_id', '', 'value=""'); echo '</form></td>' . "\n";
  15. Please if someone can help me with dropdown menu. I have 3 dropdown lists: 1. manufacturer 2. 1st category 3. 2st category Choosing categories works fine and showing products also. When I choose the 3rd dropdown list on my right side is showing products but the 2nd and 3rd dropdown menu became resetted. Because of that customer cannot see which category is showing products. Please if someone can look where is the problem BEst regards Johnatan <?php /* $Id: mfg_categories.php,v 0.9 2007/02/23 12:00:00 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url] Copyright © 2003 osCommerce Released under the GNU General Public License By default when a customer selects to show products from a specific manufacturer, all the categories containing products by that manufacturer are displayed into a single drop-down box. This contribution displays multiple category drop-downs, one for each level of categories. */ define('FILTER_DROP_DOWN_DEVIDER', ' ›› '); define('FILTER_DEFAULT_TEXT', 'Kategorije'); define('FILTER_DEFAULT_TEXT_NEXT', 'Odaberi'); define('FILTER_DEFAULT_TEXT_INACTIVE', '------'); $filterlist_sql = "select distinct c.categories_id as id, cd.categories_name as name, c.parent_id as parent_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where p.products_status = '1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and p2c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and c.categories_id = cd.categories_id order by c.parent_id, c.sort_order, cd.categories_name"; $filterlist_query = tep_db_query($filterlist_sql); if (tep_db_num_rows($filterlist_query) > 1) { echo ' <td align="left" class="main" width="100%" style="padding-left:7px">' . tep_draw_form('filter', FILENAME_DEFAULT, 'get') . ' '; $options = ''; $num_max_cats = 0; $category_options = array(); while ($filterlist = tep_db_fetch_array($filterlist_query)) { $filter_id = $filterlist['id']; $categories = array(); tep_get_parent_categories($categories, $filter_id); $categories = array_reverse($categories); $categories[] = $filter_id; //add this category to the end for ($i=0, $n=sizeof($categories); $i<$n; ++$i) { //FILTER_MAX_LEVELS //sizeof($categories) if (tep_not_null($categories[($i+1)]) && !in_arrayr($categories[($i+1)], $category_options)) { if ($i == 0 && !in_arrayr($categories[$i], $category_main)) { $category_options_name = tep_get_cat_name($categories[$i]); $category_main[] = array('id' => $categories[$i], 'text' => $category_options_name); $category_options_name = tep_get_cat_name($categories[($i+1)]); $category_options[$categories[$i]][] = array('id' => $categories[($i+1)], 'text' => $category_options_name); } else { $category_options_name = tep_get_cat_name($categories[($i+1)]); $category_options[$categories[$i]][] = array('id' => $categories[($i+1)], 'text' => $category_options_name); } $category_options[$categories[$i]] = tep_sort_array_names($category_options[$categories[$i]]); } if (($i+1) > $num_max_cats) $num_max_cats = ($i+1); } } while (list ($key, $val) = each ($category_options)) { $this_level_option_names = ''; $this_level_option_values = ''; foreach($category_options[$key] as $key2 => $val2) { $this_level_option_names .= '"' . $val2['text'] . '",'; $this_level_option_values .= $val2['id'] . ','; } $this_level_option_names = substr_replace($this_level_option_names,"",-1); $this_level_option_values = substr_replace($this_level_option_values,"",-1); if (sizeof($category_options[$key]) == 1) { //add this for single category javascript redirect $this_level_option_names = $this_level_option_names . ',""'; $this_level_option_values = $this_level_option_values . ',-1'; } $options .= 'optionsArray[' . $key . '] = new Array(' . $this_level_option_names . ')' . "\n"; $options .= 'valuesArray[' . $key . '] = new Array(' . $this_level_option_values . ')' . "\n"; } $category_main = tep_sort_array_names($category_main); array_unshift($category_main, array('id' => '', 'text' => FILTER_DEFAULT_TEXT)); //DRAW THE FIRST MAIN DROP DOWN echo tep_draw_pull_down_menu('Menu', $category_main, '', 'onChange="updateOptions(0,this.options[this.selectedIndex].value);"'); $default_text = array(array('id' => '', 'text' => FILTER_DEFAULT_TEXT_INACTIVE)); // DRAW THE REST OF THE DROP DOWNS - start at 1, 0 is already drawn for ($i=1, $n=$num_max_cats; $i<$n; ++$i) { $menu_number = $i; echo FILTER_DROP_DOWN_DEVIDER; echo tep_draw_pull_down_menu('Menu', $default_text, '', 'onChange="updateOptions(' . $menu_number . ',this.options[this.selectedIndex].value);"'); } //DRAW DEFAULT HIDDEN FIELDS echo tep_draw_hidden_field('sort', $HTTP_GET_VARS['sort']); echo tep_draw_hidden_field('manufacturers_id', $HTTP_GET_VARS['manufacturers_id']); echo tep_draw_hidden_field('filter_id', '', 'value=""'); echo '</form></td>' . "\n"; } else { // NOTHING TO DISPLAY echo ' <td align="center" class="main" width="100%" colspan="3"> </td>'; } // ############################### // # FUNCTIONS START // ############################### function in_arrayr($needle, $haystack) { if (is_array($haystack)) { foreach ($haystack as $v) { if ($needle == $v) return true; elseif (is_array($v)) { if (in_arrayr($needle, $v) === true) return true; } } } return false; } function tep_sort_array_names($array) { if (is_array($array)) { foreach($array as $key => $val) { $array_id[$key] = $val['id']; $array_name[$key] = $val['text']; } array_multisort($array_name, SORT_ASC, $array); } return $array; } function tep_get_cat_name($category_id) { global $languages_id; $cName = ''; $category_sql = ("select distinct cd.categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " cd where cd.categories_id = '" . (int)$category_id . "' and cd.language_id = '" . (int)$languages_id . "'"); $category_query = tep_db_query($category_sql); while ($category = tep_db_fetch_array($category_query)) { $cName = $category['categories_name']; } return $cName; } // ############################### // # FUNCTIONS STOP // ############################### ?> <script> <!-- /* ########### START CASCADING DROP DOWNS SCRIPT ########### */ // Do Not Edit These Variables var _F=document.filter; var formMenu=_F.Menu; var defaultFirst="<?php echo FILTER_DEFAULT_TEXT_NEXT; ?>"; var defaultNone="<?php echo FILTER_DEFAULT_TEXT_INACTIVE; ?>"; var optionsArray = new Array; var valuesArray = new Array; var arr; var varr; //This is the Option Array that will build your options <?php echo $options; ?> //Do Not Edit Below Here - This is the actual function. function updateOptions(menu,array) { arr = optionsArray[array]; varr = valuesArray[array]; if (varr==undefined && array!=0) { document.filter.filter_id.value = array; document.filter.submit(); } else { var current = formMenu[menu + 1].options.length; var nextMenu = menu + 1; var allMenus = formMenu.length for (var j=current;j>0;j--) { formMenu[menu + 1].options[j] = null; } for (int=nextMenu;int<allMenus;int++) { for (var y=formMenu[int].options.length;y>0;y--) { formMenu[int].options[y] = null; } formMenu[int].options[0].text=defaultNone; } for (var i=0;i<arr.length;i++) { if (varr[i]!=-1) { formMenu[menu + 1].options[formMenu[menu + 1].options.length] = new Option(arr[i],varr[i]); } } formMenu[menu + 1].options[0].text=defaultFirst; } } /* ########### END CASCADING DROP DOWNS SCRIPT ########### */ --> </script>