Jump to content
Latest News: (loading..)

Yepi

Members
  • Content count

    22
  • Joined

  • Last visited

Profile Information

  • Real Name
    Peter
  • Gender
    Male

Recent Profile Visitors

7,550 profile views
  1. X-Sell

    Thank you very much. That helps me a lot
  2. X-Sell

    Thanks Tsimi, I have changed the bug but it still does not work. Again and again directed to the index.php ********************************************** functions/cache.php // Cache the also Xell module function tep_cache_xsell_products($auto_expire = false, $refresh = false) { global $_GET, $language, $languages_id; $cache_output = ''; if (isset($_GET['products_id']) && is_numeric($_GET['products_id'])) { if (($refresh == true) || !read_cache($cache_output, 'xsell_products-' . $language . '.cache' . $_GET['products_id'], $auto_expire)) { ob_start(); include('includes/modules/xsell_products.php'); $cache_output = ob_get_contents(); ob_end_clean(); write_cache($cache_output, 'xsell_products-' . $language . '.cache' . $_GET['products_id']); } } return $cache_output; } includes/application_top.php if (DISPLAY_CART == 'true') { $goto = 'shopping_cart.php'; $parameters = array('action', 'cPath', 'products_id', 'pid'); } else { $goto = basename($PHP_SELF); if ($_GET['action'] == 'buy_now') { // BOE: XSell if (isset($_GET['product_to_buy_id'])) { $parameters = array('action', 'pid', 'products_to_buy_id'); } else { $parameters = array('action', 'pid', 'products_id'); } // EOE: XSell } else { $parameters = array('action', 'pid'); } } includes/modules/xsell_products.php if ((STOCK_CHECK == 'true') && (STOCK_ALLOW_CHECKOUT != 'true')) { $qty = (isset($xsell['products_quantity']) ? $xsell['products_quantity'] : 'x'); if (($xsell['products_bundle'] == 'yes') || ($qty == 'x')) $qty = tep_get_products_stock($xsell['products_id']); } if ((STOCK_CHECK == 'true') && (STOCK_ALLOW_CHECKOUT != 'true') && ($qty < 1)) { } else { if (SHOW_BUTTON_BUY_NOW == 'true') { $lc_text = '<br><div class="col-xs-12 text-right">' . tep_draw_button(SMALL_IMAGE_BUTTON_VIEW, 'fa fa-eye', tep_href_link('product_info.php', 'products_id=' . $xsell['products_id']), 'btn-success btn-sm') .'&nbsp;'. tep_draw_button(IMAGE_BUTTON_BUY_NOW, 'fa fa-shopping-cart', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action', 'products_id')) . 'action=buy_now&products_id=' . $xsell['products_id']), NULL, NULL, 'btn btn-success') . '</div>'; }else{ $lc_text = '<br><div class="col-xs-12 text-center">' . tep_draw_button(SMALL_IMAGE_BUTTON_VIEW, 'fa fa-eye', tep_href_link('product_info.php', 'products_id=' . $xsell['products_id']), 'btn-success btn-sm') . '</div>'; }} $products_xsell_content .= $lc_text; }
  3. X-Sell

    Hi Burt, thanks and sorry. Yes i have responsive 2.3.4.1BS Edge X_Sell_For_2.3.4_V3.2
  4. How to Deactivate a Category from AdminCP

    Hide Categories & Products For OScommerce2.2 rc1 I searched for a solution for this, solutions I found were either over complex, or poorly done, so this is my solution. I believe in keeping things as simple as possible & not re-inventing the wheel. OSC already has functions to hide any product, so I use that for products. This adds a new entry in the category table (categories_status) so all thats needed on the client side is to add a filter added to sql queries ( and categories_status = 1 ). This does not allow for per-customer filtering, although I reckon it wouldent be too difficult to add. Most changes occur in admin/categories.php. These allow you to change the status of any category & the status of all products within a category. My site is heavily modified, so you may need to alter this contribution to fit your site. Added Missing Entry From 1.0 pointed out by stanec. INSTALLATION BACKUP - BACKUP - BACKUP First apply the following SQL queries with phpMyAdmin ALTER TABLE `categories` ADD `categories_status` INT( 1 ) NOT NULL DEFAULT '1'; ALTER TABLE `categories` CHANGE `categories_status` `categories_status` INT( 1 ) NOT NULL DEFAULT '0' ; Add images to catalog/adim/images ******************************************** In catalog/admin/categories.php Near Line 42 Find: case 'insert_category': case 'update_category': Add Before case 'setcats': if ( ($HTTP_GET_VARS['flag'] == '0') || ($HTTP_GET_VARS['flag'] == '1') ) { if (isset($HTTP_GET_VARS['cID'])) { tep_set_category_status($HTTP_GET_VARS['cID'], $HTTP_GET_VARS['flag']); } if (USE_CACHE == 'true') { tep_reset_cache_block('categories'); tep_reset_cache_block('also_purchased'); } } tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $HTTP_GET_VARS['cPath'] . '&cID=' . $HTTP_GET_VARS['cID'])); break; Near Line 77 Find: tep_db_perform(TABLE_CATEGORIES, $sql_data_array, 'update', "categories_id = '" . (int)$categories_id . "'"); } Add After: // BOF Cx Prod Status $cxstat = (($HTTP_POST_VARS['cxstat'] <> 9) ? $HTTP_POST_VARS['cxstat'] : ''); $products_query = tep_db_query("select p.products_id, cd.categories_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where p.products_id = p2c.products_id and p2c.categories_id = '" . (int)$categories_id . "' and cd.categories_id = p2c.categories_id");$cnt=0; if ($cxstat <> '') { while ($products = tep_db_fetch_array($products_query)) { $cnt++;$categories_name = $products['categories_name']; tep_set_product_status($products['products_id'], $cxstat); } $message = ($cxstat ? IMAGE_ICON_STATUS_GREEN : IMAGE_ICON_STATUS_RED); $messageStack->add_session('', 'none'); $messageStack->add_session('Set ' . $cnt . ' Products In ' . $categories_name . ' To ' . $message, 'success'); if (USE_CACHE == 'true') { tep_reset_cache_block('categories'); tep_reset_cache_block('also_purchased'); } } // EOF Cx Prod Status Near 777 find: $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id, c.sort_order, c.date_added, c.last_modified from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' and cd.categories_name like '%" . tep_db_input($search) . "%' order by c.sort_order, cd.categories_name"); } else { $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id, c.sort_order, c.date_added, c.last_modified from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$current_category_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by c.sort_order, cd.categories_name"); } Replace With: $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id, c.sort_order, c.date_added, c.last_modified, c.categories_status from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' and cd.categories_name like '%" . tep_db_input($search) . "%' order by c.sort_order, cd.categories_name"); } else { $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id, c.sort_order, c.date_added, c.last_modified, c.categories_status from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$current_category_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by c.sort_order, cd.categories_name"); } Near Line 820 Find: <td class="dataTableContent" align="center">&nbsp;</td> Replace With <td class="dataTableContent" align="center" ><?php // CATEGORY STATUS if ($categories['categories_status'] == '1') { echo tep_image(DIR_WS_IMAGES . 'icon_status_greenl.gif', IMAGE_ICON_STATUS_GREEN, 12, 12) . '&nbsp;&nbsp;<a href="' . tep_href_link(FILENAME_CATEGORIES, 'action=setcats&flag=0&cID=' . $categories['categories_id'] . (isset($HTTP_GET_VARS['cPath']) ? '&cPath=' . $HTTP_GET_VARS['cPath'] : '') ) . '">' . tep_image(DIR_WS_IMAGES . 'icon_status_red_lightl.gif', IMAGE_ICON_STATUS_RED_LIGHT, 12, 12) . '</a>'; } else { echo '<a href="' . tep_href_link(FILENAME_CATEGORIES, 'action=setcats&flag=1&cID=' . $categories['categories_id'] . (isset($HTTP_GET_VARS['cPath']) ? '&cPath=' . $HTTP_GET_VARS['cPath'] : '') ) . '">' . tep_image(DIR_WS_IMAGES . 'icon_status_green_lightl.gif', IMAGE_ICON_STATUS_GREEN_LIGHT, 12, 12) . '</a>' . '&nbsp;&nbsp;' . tep_image(DIR_WS_IMAGES . 'icon_status_redl.gif', IMAGE_ICON_STATUS_RED, 12, 12); } ?></td> Near Line 950 Find: $contents[] = array('text' => '<br>' . TEXT_EDIT_CATEGORIES_NAME . $category_inputs_string); Replace With: $select_array[] = array('id' => 9, 'text' => 'No Change'); $select_array[] = array('id' => 0, 'text' => 'Set All Inactive'); $select_array[] = array('id' => 1, 'text' => 'Set All Active'); $contents[] = array('text' => '<br>' . TEXT_EDIT_CATEGORIES_NAME . $category_inputs_string); $contents[] = array('text' => '<br>' . TABLE_HEADING_STATUS . ': <b>' . ($cInfo->categories_status ? IMAGE_ICON_STATUS_GREEN : IMAGE_ICON_STATUS_RED) . '</b>'); Near Line 960 Find: $contents[] = array('text' => '<br>' . TEXT_EDIT_SORT_ORDER . '<br>' . tep_draw_input_field('sort_order', $cInfo->sort_order, 'size="2"')); Replace With: $contents[] = array('text' => '<br>' . TEXT_EDIT_SORT_ORDER . '<br>' . tep_draw_input_field('sort_order', $cInfo->sort_order, 'size="2"')); $contents[] = array('text' => '<br>' . TEXT_CHANGE_PRODUCTS_STATUS . $cInfo->categories_name . '<br>' ); $contents[] = array('align' => 'center', 'text' => tep_draw_pull_down_menu('cxstat', $select_array, 9)); Near Line 990 Find: if (tep_not_null($cInfo->last_modified)) $contents[] = array('text' => TEXT_LAST_MODIFIED . ' ' . tep_date_short($cInfo->last_modified)); Add After: $contents[] = array('text' => '<br>' . TABLE_HEADING_STATUS . ': <b>' . ($cInfo->categories_status ? IMAGE_ICON_STATUS_GREEN : IMAGE_ICON_STATUS_RED) . '</b>'); ************************************************************ In catalog/admin/includes/functions/general Near 740 Find: //// // Sets the status of a product on special Add Before: //// // Sets the status of a category function tep_set_category_status($categories_id, $status) { if ($status == '1') { return tep_db_query("update " . TABLE_CATEGORIES . " set categories_status = '1', last_modified = now() where categories_id = '" . (int)$categories_id . "'"); } elseif ($status == '0') { return tep_db_query("update " . TABLE_CATEGORIES . " set categories_status = '0', last_modified = now() where categories_id = '" . (int)$categories_id . "'"); } else { return -1; } } ************************************************************ In catalog/admin/includes/languages/english/categories.php Near 72 After define('TEXT_PRODUCTS_STATUS', 'Products Status:'); Add: define('TEXT_CHANGE_PRODUCTS_STATUS', 'Change Status Of All Products In '); ************************************************************ In catalog/index.php Near 89 Find: $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$category_links[$i] . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name"); Replace With: $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$category_links[$i] . "' and c.categories_status = 1 and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name"); Near 94 Find: $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$current_category_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name"); Replace With: $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$current_category_id . "' and c.categories_status = 1 and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name"); ************************************************************ In catalog/includes/boxes/categories.php Near 73 Find: $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '0' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name"); Replace With: $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '0' and c.categories_id = cd.categories_id and c.categories_status = 1 and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name"); Near 99 Find: $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$value . "' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name"); Replace With: $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$value . "' and c.categories_id = cd.categories_id and c.categories_status = 1 and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name"); ************************************************************ If you have it, In catalog/includes/boxes/dm_categories.php Near 236 Find: $result = tep_db_query('select c.categories_id, cd.categories_name, c.parent_id from ' . TABLE_CATEGORIES . ' c, ' . TABLE_CATEGORIES_DESCRIPTION . ' cd where c.categories_id = cd.categories_id and cd.language_id="' . (int)$languages_id .'" '.$parent_query.'order by sort_order, cd.categories_name'); Replace With: $result = tep_db_query('select c.categories_id, cd.categories_name, c.parent_id from ' . TABLE_CATEGORIES . ' c, ' . TABLE_CATEGORIES_DESCRIPTION . ' cd where c.categories_id = cd.categories_id and c.categories_status = 1 and cd.language_id="' . (int)$languages_id .'" '.$parent_query.'order by sort_order, cd.categories_name'); ************************************************************ There may other instances I have missed, the genereral Rule is: If there is a general tep_db_query including TABLE_CATEGORIES add the filter: and categories_status = 1 If you applied the sql correctly all your existing categories should default to 'active'.
  5. X-Sell

    I have a question about the X-Sell module. What needs to be set where, so I'm not redirected to another page when clicking on buy? In the admin the forwarding is set to false and all pages remain the same, but with X-Sell I am led after the purchase to index.php. Can someone help here? Thank you
  6. Hello, do any of you know what an addon this is? Here you can edit offers directly in the product mask.
  7. It is understandably constructed. You can easily extend it to more fields INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added) VALUES ('XXXXX', 'CONTACT_YOURFIELD_DISPLAY', 'true', 'XXXXXXX ? true = ja, false = nein', '25', '5', now(), now()); contact_us.php $yourfield = $_POST['yourfield']; ////////////////////////////////////////////////////////////// . "\n\n" . ENTRY_YOURFIELD . ' ' . $yourfield /////////////////////////////////////////////////////////////////////////////// if (CONTACT_YOURFIELD_DISPLAY == 'true') { if (strlen($mobile) < 1) { $error = true; $messageStack->add('anfrage', ENTRY_YOURFIELD_CHECK_ERROR); }else{ } } /////////////////////////////////////////////////////////////////////////// tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, $betreff, $text, $name, $address, $email_address, $mobile, $yourfield); ////////////////////////////////////////////////////////////////////////// <td class="fieldKey"><?php if (CONTACT_YOURFIELD_DISPLAY == 'true') { ?><?php echo ENTRY_YOURFIELD; ?><br> <?php echo tep_draw_input_field('yourfield', $yourfield, 'size="45"'); ?> <?php }else{}?></td> ///////////////////////////////////////////////////////////////////////// languages/en/contact_us.php define('ENTRY_YOURFIELD', 'xxxxxxxxx:'); define('ENTRY_YOURFIELD_CHECK_ERROR', 'xxxxxxxxx:');
  8. Can someone help me to integrate this link here <a href='<?php echo tep_href_link(FILENAME_ATTRIBUTE_POPUP, 'products_id=' . $all_products['products_id']); ?>', target="_blank" onclick="window.open(this.href,this.target,'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=420,height=780,screenX=150,screenY=150,top=5,left=650'); return false;"><?php echo tep_draw_button(IMAGE_BUTTON_PROD_ATTRIBUTES, 'plusthick');?></a> here my code $new_prods_content .= '<div class="footerProducto">'; if($new_products['products_quantity']>0) { if (SHOW_BUY_NOW_PROD_ATTRIB == 'false') { $new_prods_content .= ' <div style="float:right; padding-top: 0px">' . tep_draw_button(IMAGE_BUTTON_BUY_NOW, 'cart', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $new_products['products_id'])). tep_draw_button(IMAGE_BUTTON_PROD_DETAILS, 'help', tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '' ); }else{ $new_prods_content .= ' <div style="float:right; padding-top: 0px">' . tep_draw_button(IMAGE_BUTTON_BUY_NOW, 'plusthick', tep_href_link(FILENAME_ATTRIBUTE_POPUP, 'products_id=' . $new_products['products_id']) . '"target="_blanc"' ) . tep_draw_button(IMAGE_BUTTON_PROD_DETAILS, 'help', tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '' ); } }else{ $new_prods_content .= ' <div style="float:right; padding-top: 0px">' . tep_draw_button(IMAGE_BUTTON_PROD_QUESTION_DETAILS, 'help', tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '' ); } // $new_prods_content .= '<div style="float:right; padding-top: 2px">' . tep_draw_button(IMAGE_BUTTON_PROD_DETAILS, 'cart', tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '' ) ; // $new_prods_content .= '<hr></div></div>'; $new_prods_content .= '<hr><div class="ui-widget-new-prod" style="float:left; padding-top: 6px"><a href="' . tep_href_link('extra_info_pages.php?pages_id=6') . '">' . MODULE_INFORMATION_BOX_SHIPPING . '</a></div></div></div>'; $col ++; $new_prods_content .= '</div>'; if (($col > 2) || ($counter == $num_new_products)) { $new_prods_content .= '</div>'; $col = 0; } } $new_prods_content .= '</div>'; Here the affected area $new_prods_content .= ' <div style="float:right; padding-top: 0px">' . tep_draw_button(IMAGE_BUTTON_BUY_NOW, 'plusthick', tep_href_link(FILENAME_ATTRIBUTE_POPUP, 'products_id=' . $new_products['products_id']) . '"target="_blanc"' ) . tep_draw_button(IMAGE_BUTTON_PROD_DETAILS, 'help', tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '' ); }
  9. look for this ;) https://forums.oscommerce.de/topic/83524-neues-kontaktformular/
  10. Saving to the database is not necessary. Here is the line with the data sent by email if ($ error == false) { tep_mail (STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_SUBJECT, $ Query, $ name, $ email_adresse, $ mobilnr );
  11. Yes I know, It is just an additional input field with the error message
  12. contact_us.php $enquiry = tep_db_prepare_input($_POST['mobilnr']); //+++++++++++++++++++ if (!tep_validate_email($mobilnr)) { $error = true; $messageStack->add('contact', ENTRY_EMAIL_MOBIL_TEL_CHECK_ERROR); } //+++++++++++++++++++ <tr> <td class="fieldValue"><br> <?php echo ENTRY_EMAIL_MOBIL_TEL; ?><br> <?php echo tep_draw_input_field('mobilnr'); ?></td> </tr> //+++++++++++++++++++ Language file: define('ENTRY_EMAIL_MOBIL_TEL_CHECK_ERROR', 'Enter your mobile nr:'); define('ENTRY_EMAIL_MOBIL_TEL', 'Your mobile nr:');
  13. java popup

    I thank you. The beginning is already done
  14. java popup

    Thank you. But how do I integrate it so that the link works too? In this popup the product attributes are selected Unfortunately I have no idea about the javascript
  15. can someone help me to create a script with which I can open a popup on this link. <?php if (DISPLAY_CART == 'false') { echo tep_draw_button(IMAGE_BUTTON_PROD_ATTRIBUTES, 'lightbulb', tep_href_link(FILENAME_ATTRIBUTE_POPUP, 'products_id=' . $all_products['products_id']) . '"target="_blanc"' ); }else{ } ?> I would like the window to have the size 300 to 650. Can not handle it. how do I ask if a product has attributes so that I can show the button with echo? Thanks
×