Jump to content

All Activity

This stream auto-updates     

  1. Past hour
  2. Including a horizontal navigation bar..... 🙂
  3. Today
  4. Mikepo

    Stripe v3 module for SCA

    PHP message: PHP Notice: Undefined variable: customer_id in /xxx/xx/xxx/ext/modules/payment/stripe_sca/webhook.php on line 21 PHP message: PHP Notice: Undefined property: stripe_sca::$apiVersion in /xxx/xxx/xxx/ext/modules/payment/stripe_sca/webhook.php on line 58 PHP message: PHP Notice: Undefined variable: customer_id in /xxx/xxx/xxx/ext/modules/payment/stripe_sca/webhook.php on line 59 @raiwa these messages are in the log file. Are they of concern? Running php7.3
  5. This add-on is out of date and not supported. Recommend you join the Phoenix Club. You can Go Pro there to become a Phoenix Supporter and in return receive certified add-ons that do work with Phoenix 1.0.7.9
  6. Hello I tried to install in Phoenox 1.0.7.9 But its does not appear in the admin to Install Help Thanks
  7. @Fredi The datepicker is a jsscript like the one below which I found in categories.php, <script> updateGross(); $('#products_date_available').datepicker({ dateFormat: 'yy-mm-dd' }); </script> I change "yy-mm-dd" to "dd-mm-yy" and I get exactly the output I want. Is this what you should do with your code?
  8. Mikepo

    Stripe v3 module for SCA

    There was a problem with the webhook connection. Fixed now and order status is now correct. The problem with the missing order number on the email is still there: Order Number: Detailed Invoice: https://xxxxxx/account_history_info.php?order_id= Date Ordered: Tuesday 27 October, 2020
  9. kgtee

    Wishlist For Phoenix

    @amaische I used this wishlist navbar module https://apps.oscommerce.com/cl8JP&amp;wishlist-module-for-modular-navigation-b which is different from yours. This module has the MODULE_NAVBAR_WISH_LIST_HAST_CONTENTS. However, your error "Uncaught Error: Call to a member function count_contents() on null" is more difficult to solve. It can be due to an error (typo?) in the wishlist class. Perhaps you want to check the class functions therein more thoroughly.
  10. raiwa

    Display Tax Info V3.0

    You could create your own topic and provide more info: What you are trying Code you have already added
  11. amaische

    Wishlist For Phoenix

    I copied the mentioned <div>...</div> to tpl_nb_wishlist.php in includes/modules/navbar/templates. Now I receive an empty page and inside I can find: <div class="dropdown-menu dropdown-menu-lg-right" aria-labelledby="navDropdownCart"> <br> <b>Warning</b>: Use of undefined constant MODULE_NAVBAR_WISH_LIST_HAS_CONTENTS - assumed 'MODULE_NAVBAR_WISH_LIST_HAS_CONTENTS' (this will throw an Error in a future version of PHP) in <b>/xx/s4/catalog/includes/modules/navbar/templates/tpl_nb_wishlist.php</b> on line <b>4</b><br> <br> <b>Notice</b>: Undefined index: wishList in <b>/xx/s4/catalog/includes/modules/navbar/templates/tpl_nb_wishlist.php</b> on line <b>4</b><br> <br> <b>Fatal error</b>: Uncaught Error: Call to a member function count_contents() on null in /xx/s4/catalog/includes/modules/navbar/templates/tpl_nb_wishlist.php:4 Stack trace: #0 /xx/s4/catalog/includes/modules/block_template.php(14): include() #1 /xx/s4/catalog/includes/modules/navbar/nb_wishlist.php(51): include('/homepages/42/d...') #2 /xx/s4/catalog/includes/modules/content/navigation/cm_navbar.php(60): nb_wishlist-&gt;getOutput() #3 /xx/s4/catalog/includes/system/versioned/1.0.7.6/osc_template.php(106): cm_navbar-&gt;execute() #4 /xx/s4/catalog/templates/default/includes/components/template_top.php(46): oscTemplate-&gt;getContent('navigation') #5 /xx/s4/catalog/templates/default/includes/pages/index.php(13): require('/homepages/42/d...') #6 /xx/s4/catalog/index.php(35): require('/homepages/42/d...') #7 {main} thrown in <b>/xx/s4/catalog/includes/modules/navbar/templates/tpl_nb_wishlist.php</b> on line <b>4</b><br> </div> I dont have anywhere the MODULE_NAVBAR_WISH_LIST_HAST_CONTENTS besides in the copied part.
  12. beerbee

    Display Tax Info V3.0

    Hi Rainer, you are right, sorry.
  13. raiwa

    Display Tax Info V3.0

    Hi Christoph, Sorry, but this has nothing to do with this addon other than that you are using the hook to add some different custom coding.
  14. beerbee

    Display Tax Info V3.0

    Hi @raiwa, as our shop is in Germany and some of our products are food or cosmetics there is no way around showing base prices. We need only a simple version as we have no individual attribute prices. With my limited abilities I was able to create a hook/tab for the admin/categories and now I'm trying to get it working on the shop side by editing the shop hook priceTax as we need that anyway too. I'd need to get the baseprice factor and unit from the products table inside the hook. Which works, but only for product_info.php but not any listings which is obviously caused by stupidly using global $product_info for getting product_id for select . So if there is way to get this working everywhere? Best regards and TIA Christoph
  15. Jack_mcs

    Header Tags SEO

    Same problem as I mentioned in the other thread. I can't follow the problem.
  16. Jack_mcs

    Article Manager v1.0

    I don't know what this means. Are you saying there isn't a manufacturers file? Also, please don't post such long pieces of code unless asked for. They make the problem very difficult to understand.
  17. Yesterday
  18. Dnj1964

    Header Tags SEO

    This is posted in the wrong support.... Should be in Header Tags SEO 3 Using Phoenix 1.0.7.9 Was hoping it may work, but applying the changes - code not found The /catalog/admin/maufacturers.php <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2020 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); $action = $_GET['action'] ?? ''; $OSCOM_Hooks->call('manufacturers', 'preAction'); if (tep_not_null($action)) { switch ($action) { case 'insert': case 'save': if (isset($_GET['mID'])) $manufacturers_id = tep_db_prepare_input($_GET['mID']); $manufacturers_name = tep_db_prepare_input($_POST['manufacturers_name']); $sql_data_array = ['manufacturers_name' => $manufacturers_name]; if ($action == 'insert') { $insert_sql_data = ['date_added' => 'now()']; $sql_data_array = array_merge($sql_data_array, $insert_sql_data); tep_db_perform('manufacturers', $sql_data_array); $manufacturers_id = tep_db_insert_id(); } elseif ($action == 'save') { $update_sql_data = ['last_modified' => 'now()']; $sql_data_array = array_merge($sql_data_array, $update_sql_data); tep_db_perform('manufacturers', $sql_data_array, 'update', "manufacturers_id = '" . (int)$manufacturers_id . "'"); } $manufacturers_image = new upload('manufacturers_image'); $manufacturers_image->set_destination(DIR_FS_CATALOG . 'images/'); if ($manufacturers_image->parse() && $manufacturers_image->save()) { tep_db_query("update manufacturers set manufacturers_image = '" . tep_db_input($manufacturers_image->filename) . "' where manufacturers_id = '" . (int)$manufacturers_id . "'"); } $languages = tep_get_languages(); for ($i=0, $n=count($languages); $i<$n; $i++) { $manufacturers_url_array = $_POST['manufacturers_url']; /*** Begin Header Tags SEO ***/ $manufacturers_seo_keywords_array = $_POST['manufacturers_seo_keywords']; $manufacturers_htc_title_array = str_replace('"', '&quot;',$_POST['manufacturers_htc_title_tag']); $manufacturers_htc_title_alt_array = str_replace('"', '&quot;',$_POST['manufacturers_htc_title_tag_alt']); $manufacturers_htc_title_url_array = $_POST['manufacturers_htc_title_tag_url']; $manufacturers_htc_desc_array = str_replace('"', '&quot;',$_POST['manufacturers_htc_desc_tag']); $manufacturers_htc_keywords_array = $_POST['manufacturers_htc_keywords_tag']; $manufacturers_htc_description_array = $_POST['manufacturers_htc_description']; $manufacturers_htc_breadcrumb_array = $_POST['manufacturers_htc_breadcrumb_text']; /*** End Header Tags SEO ***/ $language_id = $languages[$i]['id']; $sql_data_array = ['manufacturers_url' => tep_db_prepare_input($manufacturers_url_array[$language_id])]; /*** Begin Header Tags SEO ***/ $sql_data_array['manufacturers_seo_keywords'] = tep_db_prepare_input($manufacturers_seo_keywords_array[$language_id]); $sql_data_array['manufacturers_htc_title_tag'] = (tep_not_null($manufacturers_htc_title_array[$language_id]) ? tep_db_prepare_input(strip_tags($manufacturers_htc_title_array[$language_id])) : strip_tags($manufacturers_name)); $sql_data_array['manufacturers_htc_title_tag_alt'] = (tep_not_null($manufacturers_htc_title_alt_array[$language_id]) ? tep_db_prepare_input(strip_tags($manufacturers_htc_title_alt_array[$language_id])) : strip_tags($manufacturers_name)); $sql_data_array['manufacturers_htc_title_tag_url'] = (tep_not_null($manufacturers_htc_title_alt_array[$language_id]) ? tep_db_prepare_input(strip_tags($manufacturers_htc_title_url_array[$language_id])) : strip_tags($manufacturers_name)); $sql_data_array['manufacturers_htc_desc_tag'] = (tep_not_null($manufacturers_htc_desc_array[$language_id]) ? tep_db_prepare_input($manufacturers_htc_desc_array[$language_id]) : $manufacturers_name); $sql_data_array['manufacturers_htc_keywords_tag'] = (tep_not_null($manufacturers_htc_keywords_array[$language_id]) ? tep_db_prepare_input(strip_tags($manufacturers_htc_keywords_array[$language_id])) : strip_tags($manufacturers_name)); $sql_data_array['manufacturers_htc_description'] = tep_db_prepare_input($manufacturers_htc_description_array[$language_id]); $sql_data_array['manufacturers_htc_breadcrumb_text'] = (tep_not_null($manufacturers_htc_breadcrumb_array[$language_id]) ? tep_db_prepare_input(strip_tags($manufacturers_htc_breadcrumb_array[$language_id])) : strip_tags($manufacturers_name)); /*** End Header Tags SEO ***/ if ($action == 'insert') { $insert_sql_data = ['manufacturers_id' => $manufacturers_id, 'languages_id' => $language_id]; $sql_data_array = array_merge($sql_data_array, $insert_sql_data); tep_db_perform('manufacturers_info', $sql_data_array); } elseif ($action == 'save') { tep_db_perform('manufacturers_info', $sql_data_array, 'update', "manufacturers_id = '" . (int)$manufacturers_id . "' and languages_id = '" . (int)$language_id . "'"); } } $OSCOM_Hooks->call('manufacturers', 'insertSaveAction'); tep_redirect(tep_href_link('manufacturers.php', (isset($_GET['page']) ? 'page=' . (int)$_GET['page'] . '&' : '') . 'mID=' . $manufacturers_id)); break; case 'deleteconfirm': $manufacturers_id = tep_db_prepare_input($_GET['mID']); if (isset($_POST['delete_image']) && ($_POST['delete_image'] == 'on')) { $manufacturer_query = tep_db_query("select manufacturers_image from manufacturers where manufacturers_id = '" . (int)$manufacturers_id . "'"); $manufacturer = tep_db_fetch_array($manufacturer_query); $image_location = DIR_FS_DOCUMENT_ROOT . DIR_WS_CATALOG . 'images/' . $manufacturer['manufacturers_image']; if (file_exists($image_location)) @unlink($image_location); } tep_db_query("delete from manufacturers where manufacturers_id = '" . (int)$manufacturers_id . "'"); tep_db_query("delete from manufacturers_info where manufacturers_id = '" . (int)$manufacturers_id . "'"); if (isset($_POST['delete_products']) && ($_POST['delete_products'] == 'on')) { $products_query = tep_db_query("select products_id from products where manufacturers_id = '" . (int)$manufacturers_id . "'"); while ($products = tep_db_fetch_array($products_query)) { tep_remove_product($products['products_id']); } } else { tep_db_query("update products set manufacturers_id = '' where manufacturers_id = '" . (int)$manufacturers_id . "'"); } $OSCOM_Hooks->call('manufacturers', 'deleteConfirmAction'); tep_redirect(tep_href_link('manufacturers.php', 'page=' . (int)$_GET['page'])); break; } } $OSCOM_Hooks->call('manufacturers', 'postAction'); require('includes/template_top.php'); ?> <div class="row"> <div class="col"> <h1 class="display-4 mb-2"><?php echo HEADING_TITLE; ?></h1> </div> <div class="col text-right align-self-center"> <?php if (empty($action)) { echo tep_draw_bootstrap_button(BUTTON_INSERT_NEW_MANUFACTURER, 'fas fa-id-card', tep_href_link('manufacturers.php', 'action=new'), null, null, 'btn-danger'); } else { echo tep_draw_bootstrap_button(IMAGE_BACK, 'fas fa-angle-left', tep_href_link('manufacturers.php'), null, null, 'btn-light'); } ?> </div> </div> <div class="row no-gutters"> <div class="col-12 col-sm-8"> <div class="table-responsive"> <table class="table table-striped table-hover"> <thead class="thead-dark"> <tr> <th><?php echo TABLE_HEADING_MANUFACTURERS; ?></th> <th class="text-right"><?php echo TABLE_HEADING_ACTION; ?></th> </tr> </thead> <tbody> <?php $manufacturers_query_raw = "select * from manufacturers order by manufacturers_name"; $manufacturers_split = new splitPageResults($_GET['page'], MAX_DISPLAY_SEARCH_RESULTS, $manufacturers_query_raw, $manufacturers_query_numrows); $manufacturers_query = tep_db_query($manufacturers_query_raw); while ($manufacturers = tep_db_fetch_array($manufacturers_query)) { if ((!isset($_GET['mID']) || (isset($_GET['mID']) && ($_GET['mID'] == $manufacturers['manufacturers_id']))) && !isset($mInfo) && (substr($action, 0, 3) != 'new')) { $manufacturer_products_query = tep_db_query("select count(*) as products_count from products where manufacturers_id = '" . (int)$manufacturers['manufacturers_id'] . "'"); $manufacturer_products = tep_db_fetch_array($manufacturer_products_query); $mInfo_array = array_merge($manufacturers, $manufacturer_products); $mInfo = new objectInfo($mInfo_array); } if (isset($mInfo) && is_object($mInfo) && ($manufacturers['manufacturers_id'] == $mInfo->manufacturers_id)) { echo '<tr class="table-active" onclick="document.location.href=\'' . tep_href_link('manufacturers.php', 'page=' . (int)$_GET['page'] . '&mID=' . (int)$manufacturers['manufacturers_id'] . '&action=edit') . '\'">'; } else { echo '<tr onclick="document.location.href=\'' . tep_href_link('manufacturers.php', 'page=' . (int)$_GET['page'] . '&mID=' . (int)$manufacturers['manufacturers_id']) . '\'">'; } ?> <td><?php echo $manufacturers['manufacturers_name']; ?></td> <td class="text-right"><?php if (isset($mInfo) && is_object($mInfo) && ($manufacturers['manufacturers_id'] == $mInfo->manufacturers_id)) { echo '<i class="fas fa-chevron-circle-right text-info"></i>'; } else { echo '<a href="' . tep_href_link('manufacturers.php', 'page=' . (int)$_GET['page'] . '&mID=' . $manufacturers['manufacturers_id']) . '"><i class="fas fa-info-circle text-muted"></i></a>'; } ?></td> </tr> <?php } ?> </tbody> </table> </div> <div class="row my-1"> <div class="col"><?php echo $manufacturers_split->display_count($manufacturers_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_MANUFACTURERS); ?></div> <div class="col text-right mr-2"><?php echo $manufacturers_split->display_links($manufacturers_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $_GET['page']); ?></div> </div> </div> <?php $heading = []; $contents = []; switch ($action) { case 'new': $heading[] = ['text' => TEXT_HEADING_NEW_MANUFACTURER]; $contents = ['form' => tep_draw_form('manufacturers', 'manufacturers.php', 'action=insert', 'post', 'enctype="multipart/form-data"')]; $contents[] = ['text' => TEXT_NEW_INTRO]; $contents[] = ['text' => TEXT_MANUFACTURERS_NAME . '<br>' . tep_draw_input_field('manufacturers_name')]; $contents[] = ['text' => TEXT_MANUFACTURERS_IMAGE . '<br><div class="custom-file mb-2">' . tep_draw_input_field('manufacturers_image', '', 'id="inputManufacturersImage"', 'file', null, 'class="form-control-input"') . '<label class="custom-file-label" for="inputManufacturersImage">' . TEXT_MANUFACTURERS_IMAGE_LABEL . '</label></div>']; $manufacturer_inputs_string = $manufacturer_description_string = $manufacturer_seo_description_string = $manufacturer_seo_title_string = ''; $languages = tep_get_languages(); for ($i=0, $n=sizeof($languages); $i<$n; $i++) { $manufacturer_inputs_string .= '<div class="input-group"><div class="input-group-prepend"><span class="input-group-text">' . tep_image(tep_catalog_href_link('includes/languages/' . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name']) . '</span></div>' . tep_draw_input_field('manufacturers_url[' . $languages[$i]['id'] . ']') . '</div>'; $manufacturer_description_string .= '<div class="input-group"><div class="input-group-prepend"><span class="input-group-text">' . tep_image(tep_catalog_href_link('includes/languages/' . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name'], '', '', 'style="vertical-align: top;"') . '</span></div>' . tep_draw_textarea_field('manufacturers_description[' . $languages[$i]['id'] . ']', 'soft', '80', '10') . '</div>'; $manufacturer_seo_description_string .= '<div class="input-group"><div class="input-group-prepend"><span class="input-group-text">' . tep_image(tep_catalog_href_link('includes/languages/' . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name'], '', '', 'style="vertical-align: top;"') . '</span></div>' . tep_draw_textarea_field('manufacturers_seo_description[' . $languages[$i]['id'] . ']', 'soft', '80', '10') . '</div>'; $manufacturer_seo_title_string .= '<div class="input-group"><div class="input-group-prepend"><span class="input-group-text">' . tep_image(tep_catalog_href_link('includes/languages/' . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name']) . '</span></div>' . tep_draw_input_field('manufacturers_seo_title[' . $languages[$i]['id'] . ']') . '</div>'; } $contents[] = ['text' => TEXT_MANUFACTURERS_URL . $manufacturer_inputs_string]; $contents[] = ['text' => TEXT_MANUFACTURERS_SEO_TITLE . $manufacturer_seo_title_string]; $contents[] = ['text' => TEXT_MANUFACTURERS_DESCRIPTION . $manufacturer_description_string]; $contents[] = ['text' => TEXT_MANUFACTURERS_SEO_DESCRIPTION . $manufacturer_seo_description_string]; $contents[] = ['class' => 'text-center', 'text' => tep_draw_bootstrap_button(IMAGE_SAVE, 'fas fa-save', null, 'primary', null, 'btn-success mr-2') . tep_draw_bootstrap_button(IMAGE_CANCEL, 'fas fa-times', tep_href_link('manufacturers.php'), null, null, 'btn-light')]; break; case 'edit': $heading[] = ['text' => TEXT_HEADING_EDIT_MANUFACTURER . ' <small>' . TEXT_EDIT_INTRO . '</small>']; $contents = ['form' => tep_draw_form('manufacturers', 'manufacturers.php', 'page=' . (int)$_GET['page'] . '&mID=' . $mInfo->manufacturers_id . '&action=save', 'post', 'enctype="multipart/form-data"')]; $contents[] = ['text' => TEXT_EDIT_INTRO]; $contents[] = ['text' => TEXT_MANUFACTURERS_NAME . '<br>' . tep_draw_input_field('manufacturers_name', $mInfo->manufacturers_name)]; $contents[] = ['text' => TEXT_MANUFACTURERS_IMAGE . '<br><div class="custom-file mb-2">' . tep_draw_input_field('manufacturers_image', '', 'id="inputManufacturersImage"', 'file', null, 'class="form-control-input"') . '<label class="custom-file-label" for="inputManufacturersImage">' . $mInfo->manufacturers_image . '</label></div>']; $manufacturer_inputs_string = $manufacturer_description_string = $manufacturer_seo_description_string = $manufacturer_seo_title_string = ''; $languages = tep_get_languages(); for ($i=0, $n=sizeof($languages); $i<$n; $i++) { $manufacturer_inputs_string .= '<div class="input-group"><div class="input-group-prepend"><span class="input-group-text">' . tep_image(tep_catalog_href_link('includes/languages/' . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name']) . '</span></div>' . tep_draw_input_field('manufacturers_url[' . $languages[$i]['id'] . ']', tep_get_manufacturer_url($mInfo->manufacturers_id, $languages[$i]['id'])) . '</div>'; $manufacturer_seo_title_string .= '<div class="input-group"><div class="input-group-prepend"><span class="input-group-text">' . tep_image(tep_catalog_href_link('includes/languages/' . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name']) . '</span></div>' . tep_draw_input_field('manufacturers_seo_title[' . $languages[$i]['id'] . ']', tep_get_manufacturer_seo_title($mInfo->manufacturers_id, $languages[$i]['id'])) . '</div>'; $manufacturer_description_string .= '<div class="input-group"><div class="input-group-prepend"><span class="input-group-text">' . tep_image(tep_catalog_href_link('includes/languages/' . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name'], '', '', 'style="vertical-align: top;"') . '</span></div>' . tep_draw_textarea_field('manufacturers_description[' . $languages[$i]['id'] . ']', 'soft', '80', '10', tep_get_manufacturer_description($mInfo->manufacturers_id, $languages[$i]['id'])) . '</div>'; $manufacturer_seo_description_string .= '<div class="input-group"><div class="input-group-prepend"><span class="input-group-text">' . tep_image(tep_catalog_href_link('includes/languages/' . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name'], '', '', 'style="vertical-align: top;"') . '</span></div>' . tep_draw_textarea_field('manufacturers_seo_description[' . $languages[$i]['id'] . ']', 'soft', '80', '10', tep_get_manufacturer_seo_description($mInfo->manufacturers_id, $languages[$i]['id'])) . '</div>'; } $contents[] = ['text' => TEXT_MANUFACTURERS_URL . $manufacturer_inputs_string]; $contents[] = ['text' => TEXT_EDIT_MANUFACTURERS_SEO_TITLE . $manufacturer_seo_title_string]; $contents[] = ['text' => TEXT_EDIT_MANUFACTURERS_DESCRIPTION . $manufacturer_description_string]; $contents[] = ['text' => TEXT_EDIT_MANUFACTURERS_SEO_DESCRIPTION . $manufacturer_seo_description_string]; $contents[] = ['class' => 'text-center', 'text' => tep_draw_bootstrap_button(IMAGE_SAVE, 'fas fa-save', null, 'primary', null, 'btn-success mr-2') . tep_draw_bootstrap_button(IMAGE_CANCEL, 'fas fa-times', tep_href_link('manufacturers.php', 'page=' . (int)$_GET['page'] . '&mID=' . (int)$mInfo->manufacturers_id), null, null, 'btn-light')]; break; case 'delete': $heading[] = ['text' => TEXT_HEADING_DELETE_MANUFACTURER]; $contents = ['form' => tep_draw_form('manufacturers', 'manufacturers.php', 'page=' . (int)$_GET['page'] . '&mID=' . $mInfo->manufacturers_id . '&action=deleteconfirm')]; $contents[] = ['text' => TEXT_DELETE_INTRO]; $contents[] = ['text' => '<strong>' . $mInfo->manufacturers_name . '</strong>']; $contents[] = ['text' => '<div class="custom-control custom-switch">' . tep_draw_selection_field('delete_image', 'checkbox', 'on', null, 'class="custom-control-input" id="mDeleteImg"') . '<label for="mDeleteImg" class="custom-control-label text-muted"><small>' . TEXT_DELETE_IMAGE . '</small></label></div>']; if ($mInfo->products_count > 0) { $contents[] = ['text' => '<div class="custom-control custom-switch">' . tep_draw_selection_field('delete_products', 'checkbox', 'on', null, 'class="custom-control-input" id="mDeleteProducts"') . '<label for="mDeleteProducts" class="custom-control-label text-muted"><small>' . TEXT_DELETE_PRODUCTS . '</small></label></div>']; $contents[] = ['text' => sprintf(TEXT_DELETE_WARNING_PRODUCTS, $mInfo->products_count)]; } $contents[] = ['class' => 'text-center', 'text' => tep_draw_bootstrap_button(IMAGE_DELETE, 'fas fa-trash', null, 'primary', null, 'btn-danger mr-2') . tep_draw_bootstrap_button(IMAGE_CANCEL, 'fas fa-times', tep_href_link('manufacturers.php', 'page=' . (int)$_GET['page'] . '&mID=' . $mInfo->manufacturers_id), null, null, 'btn-light')]; break; default: if (isset($mInfo) && is_object($mInfo)) { $heading[] = ['text' => $mInfo->manufacturers_name]; $contents[] = ['class' => 'text-center', 'text' => tep_draw_bootstrap_button(IMAGE_EDIT, 'fas fa-cogs', tep_href_link('manufacturers.php', 'page=' . (int)$_GET['page'] . '&mID=' . $mInfo->manufacturers_id . '&action=edit'), null, null, 'btn-warning mr-2') . tep_draw_bootstrap_button(IMAGE_DELETE, 'fas fa-trash', tep_href_link('manufacturers.php', 'page=' . (int)$_GET['page'] . '&mID=' . $mInfo->manufacturers_id . '&action=delete'), null, null, 'btn-danger')]; $contents[] = ['text' => sprintf(TEXT_DATE_ADDED, tep_date_short($mInfo->date_added))]; if (tep_not_null($mInfo->last_modified)) $contents[] = ['text' => sprintf(TEXT_LAST_MODIFIED, tep_date_short($mInfo->last_modified))]; $contents[] = ['text' => tep_info_image($mInfo->manufacturers_image, $mInfo->manufacturers_name)]; $contents[] = ['text' => sprintf(TEXT_PRODUCTS, $mInfo->products_count)]; } break; } if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) { echo '<div class="col-12 col-sm-4">'; $box = new box; echo $box->infoBox($heading, $contents); echo '</div>'; } ?> </div> <script>$(document).on('change', '#inputManufacturersImage', function (event) { $(this).next('.custom-file-label').html(event.target.files[0].name); });</script> <?php require('includes/template_bottom.php'); require('includes/application_bottom.php'); ?> Instructions for changes - this and all code beyond has been changed in the file FIND (around line 87 and again around line 125): if (USE_CACHE == 'true') { tep_reset_cache_block('manufacturers'); } Make the following changes to admin/manufacturers.php FIND (about line 53): $manufacturers_description_array = $_POST['manufacturers_description']; $manufacturers_seo_description_array = $_POST['manufacturers_seo_description']; $manufacturers_seo_title_array = $_POST['manufacturers_seo_title']; REPLACE WITH: /*** Begin Header Tags SEO ***/ $manufacturers_seo_keywords_array = $_POST['manufacturers_seo_keywords']; $manufacturers_htc_title_array = str_replace('"', '&quot;',$_POST['manufacturers_htc_title_tag']); $manufacturers_htc_title_alt_array = str_replace('"', '&quot;',$_POST['manufacturers_htc_title_tag_alt']); $manufacturers_htc_title_url_array = $_POST['manufacturers_htc_title_tag_url']; $manufacturers_htc_desc_array = str_replace('"', '&quot;',$_POST['manufacturers_htc_desc_tag']); $manufacturers_htc_keywords_array = $_POST['manufacturers_htc_keywords_tag']; $manufacturers_htc_description_array = $_POST['manufacturers_htc_description']; $manufacturers_htc_breadcrumb_array = $_POST['manufacturers_htc_breadcrumb_text']; /*** End Header Tags SEO ***/ ------------------------------------------------------------------------------- FIND (around line 63): $sql_data_array['manufacturers_description'] = tep_db_prepare_input($manufacturers_description_array[$language_id]); $sql_data_array['manufacturers_seo_description'] = tep_db_prepare_input($manufacturers_seo_description_array[$language_id]); $sql_data_array['manufacturers_seo_title'] = tep_db_prepare_input($manufacturers_seo_title_array[$language_id]); REPLACE WITH: /*** Begin Header Tags SEO ***/ $sql_data_array['manufacturers_seo_keywords'] = tep_db_prepare_input($manufacturers_seo_keywords_array[$language_id]); $sql_data_array['manufacturers_htc_title_tag'] = (tep_not_null($manufacturers_htc_title_array[$language_id]) ? tep_db_prepare_input(strip_tags($manufacturers_htc_title_array[$language_id])) : strip_tags($manufacturers_name)); $sql_data_array['manufacturers_htc_title_tag_alt'] = (tep_not_null($manufacturers_htc_title_alt_array[$language_id]) ? tep_db_prepare_input(strip_tags($manufacturers_htc_title_alt_array[$language_id])) : strip_tags($manufacturers_name)); $sql_data_array['manufacturers_htc_title_tag_url'] = (tep_not_null($manufacturers_htc_title_alt_array[$language_id]) ? tep_db_prepare_input(strip_tags($manufacturers_htc_title_url_array[$language_id])) : strip_tags($manufacturers_name)); $sql_data_array['manufacturers_htc_desc_tag'] = (tep_not_null($manufacturers_htc_desc_array[$language_id]) ? tep_db_prepare_input($manufacturers_htc_desc_array[$language_id]) : $manufacturers_name); $sql_data_array['manufacturers_htc_keywords_tag'] = (tep_not_null($manufacturers_htc_keywords_array[$language_id]) ? tep_db_prepare_input(strip_tags($manufacturers_htc_keywords_array[$language_id])) : strip_tags($manufacturers_name)); $sql_data_array['manufacturers_htc_description'] = tep_db_prepare_input($manufacturers_htc_description_array[$language_id]); $sql_data_array['manufacturers_htc_breadcrumb_text'] = (tep_not_null($manufacturers_htc_breadcrumb_array[$language_id]) ? tep_db_prepare_input(strip_tags($manufacturers_htc_breadcrumb_array[$language_id])) : strip_tags($manufacturers_name)); /*** End Header Tags SEO ***/ ------------------------------------------------------------------------------- FIND (around line 87 and again around line 125): if (USE_CACHE == 'true') { tep_reset_cache_block('manufacturers'); } ADD BENEATH: /*** Begin Header Tags SEO ***/ if (HEADER_TAGS_ENABLE_CACHE != 'None') { require_once(DIR_WS_FUNCTIONS . 'header_tags.php'); ResetCache_HeaderTags('index.php', 'm_' . $manufacturers_id); } /*** End Header Tags SEO ***/ ------------------------------------------------------------------------------- FIND (around line 156): $manufacturers_query_raw = "select manufacturers_id, manufacturers_name, manufacturers_image, date_added, last_modified from manufacturers order by manufacturers_name"; REPLACE WITH: /*** Begin Header Tags SEO ***/ $manufacturers_query_raw = "select m.manufacturers_id, m.manufacturers_name, m.manufacturers_image, m.date_added, m.last_modified, mi.manufacturers_htc_title_tag, mi.manufacturers_htc_title_tag_alt, mi.manufacturers_htc_title_tag_url from manufacturers m LEFT JOIN manufacturers_info mi on m.manufacturers_id = mi.manufacturers_id where mi.languages_id = '".$languages_id ."' order by m.manufacturers_name"; /*** End Header Tags SEO ***/ ------------------------------------------------------------------------------- FIND (around line 213): $manufacturer_inputs_string = $manufacturer_description_string = $manufacturer_seo_description_string = $manufacturer_seo_keywords_string = $manufacturer_seo_title_string = ''; $languages = tep_get_languages(); for ($i=0, $n=sizeof($languages); $i<$n; $i++) { $manufacturer_inputs_string .= '<br />' . tep_image(tep_catalog_href_link('includes/languages/' . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name']) . '&nbsp;' . tep_draw_input_field('manufacturers_url[' . $languages[$i]['id'] . ']'); $manufacturer_description_string .= '<br />' . tep_image(tep_catalog_href_link('includes/languages/' . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name'], '', '', 'style="vertical-align: top;"') . '&nbsp;' . tep_draw_textarea_field('manufacturers_description[' . $languages[$i]['id'] . ']', 'soft', '80', '10'); $manufacturer_seo_description_string .= '<br />' . tep_image(tep_catalog_href_link('includes/languages/' . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name'], '', '', 'style="vertical-align: top;"') . '&nbsp;' . tep_draw_textarea_field('manufacturers_seo_description[' . $languages[$i]['id'] . ']', 'soft', '80', '10'); $manufacturer_seo_title_string .= '<br />' . tep_image(tep_catalog_href_link('includes/languages/' . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name']) . '&nbsp;' . tep_draw_input_field('manufacturers_seo_title[' . $languages[$i]['id'] . ']', NULL, 'style="width: 300px;"'); REPLACE WITH: $manufacturer_inputs_string = ''; $languages = tep_get_languages(); for ($i=0, $n=sizeof($languages); $i<$n; $i++) { $manufacturer_inputs_string .= '<br />' . tep_image(tep_catalog_href_link('includes/languages/' . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name']) . '&nbsp;' . tep_draw_input_field('manufacturers_url[' . $languages[$i]['id'] . ']'); /*** Begin Header Tags SEO ***/ $manufacturer_seo_keywords_string .= '<br />' . tep_image(tep_catalog_href_link('includes/languages/' . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name']) . '&nbsp;' . tep_draw_input_field('manufacturers_seo_keywords[' . $languages[$i]['id'] . ']', NULL, 'style="width: 300px;" placeholder="' . PLACEHOLDER_COMMA_SEPARATION . '"'); $manufacturer_htc_title_string .= '<br />' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;' . tep_draw_input_field('manufacturers_htc_title_tag[' . $languages[$i]['id'] . ']'); $manufacturer_htc_title_alt_string .= '<br />' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;' . tep_draw_input_field('manufacturers_htc_title_tag_alt[' . $languages[$i]['id'] . ']'); $manufacturer_htc_title_url_string .= '<br />' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;' . tep_draw_input_field('manufacturers_htc_title_tag_url[' . $languages[$i]['id'] . ']'); $manufacturer_htc_breadcrumb_string .= '<br>' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;' . tep_draw_input_field('manufacturers_htc_breadcrumb_text[' . $languages[$i]['id'] . ']'); $manufacturer_htc_desc_string .= '<br>' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;' . tep_draw_input_field('manufacturers_htc_desc_tag[' . $languages[$i]['id'] . ']'); $manufacturer_htc_keywords_string .= '<br>' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;' . tep_draw_input_field('manufacturers_htc_keywords_tag[' . $languages[$i]['id'] . ']'); if (HEADER_TAGS_ENABLE_HTML_EDITOR == 'No Editor' || HEADER_TAGS_ENABLE_EDITOR_MANUFACTURERS == 'false') { $manufacturer_htc_description_string .= '<br />' . tep_image(tep_catalog_href_link('includes/languages/' . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name'], '', '', 'style="vertical-align: top;"') . '&nbsp;' . tep_draw_textarea_field('manufacturers_description[' . $languages[$i]['id'] . ']', 'soft', '80', '10'); } else { $manufacturer_htc_description_string .= '<br />' . tep_image(tep_catalog_href_link('includes/languages/' . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name'], '', '', 'style="vertical-align: top;"') . '&nbsp;' . tep_draw_textarea_ckeditor('manufacturers_description[' . $languages[$i]['id'] . ']', '80', '10'); } /*** End Header Tags SEO ***/ ------------------------------------------------------------------------------- FIND (around line 235): $contents[] = array('text' => '<br />' . TEXT_MANUFACTURERS_SEO_TITLE . $manufacturer_seo_title_string); $contents[] = array('text' => '<br />' . TEXT_MANUFACTURERS_DESCRIPTION . $manufacturer_description_string); $contents[] = array('text' => '<br />' . TEXT_MANUFACTURERS_SEO_DESCRIPTION . $manufacturer_seo_description_string); REPLACE WITH: /*** Begin Header Tags SEO ***/ $contents[] = array('text' => '<br />' . TEXT_MANUFACTURERS_SEO_KEYWORDS . $manufacturer_seo_keywords_string); $contents[] = array('text' => '<br />' . 'Header Tags Manufacturer Title' . $manufacturer_htc_title_string); $contents[] = array('text' => '<br />' . 'Header Tags Manufacturer Title Alt' . $manufacturer_htc_title_alt_string); $contents[] = array('text' => '<br />' . 'Header Tags Manufacturer Title URL' . $manufacturer_htc_title_url_string); $contents[] = array('text' => '<br />' . 'Header Tags Manufacturer Breadcrumb' . $manufacturer_htc_breadcrumb_string); $contents[] = array('text' => '<br />' . 'Header Tags Manufacturer Description' . $manufacturer_htc_desc_string); $contents[] = array('text' => '<br />' . 'Header Tags Manufacturer Keywords' . $manufacturer_htc_keywords_string); $contents[] = array('text' => '<br />' . 'Header Tags Manufacturer Description' . $manufacturer_htc_description_string); /*** End Header Tags SEO ***/ ------------------------------------------------------------------------------- FIND (around line 254): $manufacturer_inputs_string = $manufacturer_description_string = $manufacturer_seo_description_string = $manufacturer_seo_title_string = ''; REPLACE WITH: /*** Begin Header Tags SEO ***/ $manufacturer_inputs_string = $manufacturer_description_string = $manufacturer_seo_description_string = $manufacturer_seo_keywords_string = $manufacturer_seo_title_string = ''; /*** End Header Tags SEO ***/ ------------------------------------------------------------------------------- FIND (around line 254): $manufacturer_seo_description_string .= '<div class="input-group"><div class="input-group-prepend"><span class="input-group-text">' . tep_image(tep_catalog_href_link('includes/languages/' . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name'], '', '', 'style="vertical-align: top;"') . '</span></div>' . tep_draw_textarea_field('manufacturers_seo_description[' . $languages[$i]['id'] . ']', 'soft', '80', '10', tep_get_manufacturer_seo_description($mInfo->manufacturers_id, $languages[$i]['id'])) . '</div>'; ADD BENEATH: /*** Begin Header Tags SEO ***/ $manufacturer_seo_keywords_string .= '<div class="input-group"><div class="input-group-prepend"><span class="input-group-text">' . tep_image(tep_catalog_href_link('includes/languages/' . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name']) . '</span></div>' . tep_draw_input_field('manufacturers_seo_keywords[' . $languages[$i]['id'] . ']', tep_get_manufacturer_seo_keywords($mInfo->manufacturers_id, $languages[$i]['id']), 'placeholder="' . PLACEHOLDER_COMMA_SEPARATION . '"') . '</div>'; $manufacturer_htc_title_alt_string .= '<div class="input-group"><div class="input-group-prepend"><span class="input-group-text">' . tep_image(tep_catalog_href_link('includes/languages/' . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name']) . '</span></div>' . tep_draw_input_field('manufacturers_htc_title_tag_alt[' . $languages[$i]['id'] . ']', tep_get_manufacturer_htc_title_alt($mInfo->manufacturers_id, $languages[$i]['id'])) . '</div>'; $manufacturer_htc_title_url_string .= '<div class="input-group"><div class="input-group-prepend"><span class="input-group-text">' . tep_image(tep_catalog_href_link('includes/languages/' . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name']) . '</span></div>' . tep_draw_input_field('manufacturers_htc_title_tag_url[' . $languages[$i]['id'] . ']', tep_get_manufacturer_htc_title_url($mInfo->manufacturers_id, $languages[$i]['id'])) . '</div>'; $manufacturer_htc_breadcrumb_string .= '<div class="input-group"><div class="input-group-prepend"><span class="input-group-text">' . tep_image(tep_catalog_href_link('includes/languages/' . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name']) . '</span></div>' . tep_draw_input_field('manufacturers_htc_breadcrumb_text[' . $languages[$i]['id'] . ']', tep_get_manufacturer_htc_breadcrumb($mInfo->manufacturers_id, $languages[$i]['id'])) . '</div>'; /*** End Header Tags SEO ***/ ------------------------------------------------------------------------------- FIND (around line 276): $contents[] = ['text' => TEXT_EDIT_MANUFACTURERS_SEO_DESCRIPTION . $manufacturer_seo_description_string]; ADD BENEATH: /*** Begin Header Tags SEO ***/ $contents[] = ['text' => TEXT_EDIT_MANUFACTURERS_SEO_KEYWORDS . $manufacturer_seo_keywords_string]; $contents[] = ['text' => TEXT_HEADERTAGS_TITLE_ALT . $manufacturer_htc_title_alt_string]; $contents[] = ['text' => TEXT_HEADERTAGS_TITLE_URL . $manufacturer_htc_title_url_string]; $contents[] = ['text' => TEXT_HEADERTAGS_BREADCRUMB . $manufacturer_htc_breadcrumb_string]; /*** End Header Tags SEO ***/ =================================================================== That's all ;-) =================================================================== TROUBLESHOOTING: 1 - The tools in the admin section have to be able to write to the include/header_tags.php file. In order to do that, the permissions for that file must be set correctly. If Header Tags thinks the permissions are not set correctly, it will display a warning message with what it thinks are the proper permissions. You will need to change those permissions using an ftp program (right click and choose chmod) or by using your hosts control panel. The permissions should, typically, be set to 755 (777 for some servers). If you do not know what this is or how to do it, ask your host to help you. 2 - Some hosts restrict a function used in catalog/admin/includes/functions/header_tags.php. If you get an error regarding the chmod() php function in this file, like: Warning: chmod(): Operation not permitted in ... Cannot change the mode of file (../includes/header_tags.php) and you have addressed the file permissions settings as stated above, you may have to comment out the function. To do that, OPEN: admin/includes/functions/header_tags.php Around line 201 you find this code: if (!is_writable($filename)) { if (!chmod($filename, 0666)) { echo "Cannot change the mode of file ($filename)"; exit; } } Replace that with the following code: if (!is_writable($filename)) { echo "The file isn't writable"; exit; /* if (!chmod($filename, 0666)) { echo "Cannot change the mode of file ($filename)"; exit; } */ }
  19. Dnj1964

    Article Manager v1.0

    Using Phoenix 1.0.7.9 Was hoping it may work, but applying the changes - code not found The /catalog/admin/maufacturers.php <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2020 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); $action = $_GET['action'] ?? ''; $OSCOM_Hooks->call('manufacturers', 'preAction'); if (tep_not_null($action)) { switch ($action) { case 'insert': case 'save': if (isset($_GET['mID'])) $manufacturers_id = tep_db_prepare_input($_GET['mID']); $manufacturers_name = tep_db_prepare_input($_POST['manufacturers_name']); $sql_data_array = ['manufacturers_name' => $manufacturers_name]; if ($action == 'insert') { $insert_sql_data = ['date_added' => 'now()']; $sql_data_array = array_merge($sql_data_array, $insert_sql_data); tep_db_perform('manufacturers', $sql_data_array); $manufacturers_id = tep_db_insert_id(); } elseif ($action == 'save') { $update_sql_data = ['last_modified' => 'now()']; $sql_data_array = array_merge($sql_data_array, $update_sql_data); tep_db_perform('manufacturers', $sql_data_array, 'update', "manufacturers_id = '" . (int)$manufacturers_id . "'"); } $manufacturers_image = new upload('manufacturers_image'); $manufacturers_image->set_destination(DIR_FS_CATALOG . 'images/'); if ($manufacturers_image->parse() && $manufacturers_image->save()) { tep_db_query("update manufacturers set manufacturers_image = '" . tep_db_input($manufacturers_image->filename) . "' where manufacturers_id = '" . (int)$manufacturers_id . "'"); } $languages = tep_get_languages(); for ($i=0, $n=count($languages); $i<$n; $i++) { $manufacturers_url_array = $_POST['manufacturers_url']; /*** Begin Header Tags SEO ***/ $manufacturers_seo_keywords_array = $_POST['manufacturers_seo_keywords']; $manufacturers_htc_title_array = str_replace('"', '&quot;',$_POST['manufacturers_htc_title_tag']); $manufacturers_htc_title_alt_array = str_replace('"', '&quot;',$_POST['manufacturers_htc_title_tag_alt']); $manufacturers_htc_title_url_array = $_POST['manufacturers_htc_title_tag_url']; $manufacturers_htc_desc_array = str_replace('"', '&quot;',$_POST['manufacturers_htc_desc_tag']); $manufacturers_htc_keywords_array = $_POST['manufacturers_htc_keywords_tag']; $manufacturers_htc_description_array = $_POST['manufacturers_htc_description']; $manufacturers_htc_breadcrumb_array = $_POST['manufacturers_htc_breadcrumb_text']; /*** End Header Tags SEO ***/ $language_id = $languages[$i]['id']; $sql_data_array = ['manufacturers_url' => tep_db_prepare_input($manufacturers_url_array[$language_id])]; /*** Begin Header Tags SEO ***/ $sql_data_array['manufacturers_seo_keywords'] = tep_db_prepare_input($manufacturers_seo_keywords_array[$language_id]); $sql_data_array['manufacturers_htc_title_tag'] = (tep_not_null($manufacturers_htc_title_array[$language_id]) ? tep_db_prepare_input(strip_tags($manufacturers_htc_title_array[$language_id])) : strip_tags($manufacturers_name)); $sql_data_array['manufacturers_htc_title_tag_alt'] = (tep_not_null($manufacturers_htc_title_alt_array[$language_id]) ? tep_db_prepare_input(strip_tags($manufacturers_htc_title_alt_array[$language_id])) : strip_tags($manufacturers_name)); $sql_data_array['manufacturers_htc_title_tag_url'] = (tep_not_null($manufacturers_htc_title_alt_array[$language_id]) ? tep_db_prepare_input(strip_tags($manufacturers_htc_title_url_array[$language_id])) : strip_tags($manufacturers_name)); $sql_data_array['manufacturers_htc_desc_tag'] = (tep_not_null($manufacturers_htc_desc_array[$language_id]) ? tep_db_prepare_input($manufacturers_htc_desc_array[$language_id]) : $manufacturers_name); $sql_data_array['manufacturers_htc_keywords_tag'] = (tep_not_null($manufacturers_htc_keywords_array[$language_id]) ? tep_db_prepare_input(strip_tags($manufacturers_htc_keywords_array[$language_id])) : strip_tags($manufacturers_name)); $sql_data_array['manufacturers_htc_description'] = tep_db_prepare_input($manufacturers_htc_description_array[$language_id]); $sql_data_array['manufacturers_htc_breadcrumb_text'] = (tep_not_null($manufacturers_htc_breadcrumb_array[$language_id]) ? tep_db_prepare_input(strip_tags($manufacturers_htc_breadcrumb_array[$language_id])) : strip_tags($manufacturers_name)); /*** End Header Tags SEO ***/ if ($action == 'insert') { $insert_sql_data = ['manufacturers_id' => $manufacturers_id, 'languages_id' => $language_id]; $sql_data_array = array_merge($sql_data_array, $insert_sql_data); tep_db_perform('manufacturers_info', $sql_data_array); } elseif ($action == 'save') { tep_db_perform('manufacturers_info', $sql_data_array, 'update', "manufacturers_id = '" . (int)$manufacturers_id . "' and languages_id = '" . (int)$language_id . "'"); } } $OSCOM_Hooks->call('manufacturers', 'insertSaveAction'); tep_redirect(tep_href_link('manufacturers.php', (isset($_GET['page']) ? 'page=' . (int)$_GET['page'] . '&' : '') . 'mID=' . $manufacturers_id)); break; case 'deleteconfirm': $manufacturers_id = tep_db_prepare_input($_GET['mID']); if (isset($_POST['delete_image']) && ($_POST['delete_image'] == 'on')) { $manufacturer_query = tep_db_query("select manufacturers_image from manufacturers where manufacturers_id = '" . (int)$manufacturers_id . "'"); $manufacturer = tep_db_fetch_array($manufacturer_query); $image_location = DIR_FS_DOCUMENT_ROOT . DIR_WS_CATALOG . 'images/' . $manufacturer['manufacturers_image']; if (file_exists($image_location)) @unlink($image_location); } tep_db_query("delete from manufacturers where manufacturers_id = '" . (int)$manufacturers_id . "'"); tep_db_query("delete from manufacturers_info where manufacturers_id = '" . (int)$manufacturers_id . "'"); if (isset($_POST['delete_products']) && ($_POST['delete_products'] == 'on')) { $products_query = tep_db_query("select products_id from products where manufacturers_id = '" . (int)$manufacturers_id . "'"); while ($products = tep_db_fetch_array($products_query)) { tep_remove_product($products['products_id']); } } else { tep_db_query("update products set manufacturers_id = '' where manufacturers_id = '" . (int)$manufacturers_id . "'"); } $OSCOM_Hooks->call('manufacturers', 'deleteConfirmAction'); tep_redirect(tep_href_link('manufacturers.php', 'page=' . (int)$_GET['page'])); break; } } $OSCOM_Hooks->call('manufacturers', 'postAction'); require('includes/template_top.php'); ?> <div class="row"> <div class="col"> <h1 class="display-4 mb-2"><?php echo HEADING_TITLE; ?></h1> </div> <div class="col text-right align-self-center"> <?php if (empty($action)) { echo tep_draw_bootstrap_button(BUTTON_INSERT_NEW_MANUFACTURER, 'fas fa-id-card', tep_href_link('manufacturers.php', 'action=new'), null, null, 'btn-danger'); } else { echo tep_draw_bootstrap_button(IMAGE_BACK, 'fas fa-angle-left', tep_href_link('manufacturers.php'), null, null, 'btn-light'); } ?> </div> </div> <div class="row no-gutters"> <div class="col-12 col-sm-8"> <div class="table-responsive"> <table class="table table-striped table-hover"> <thead class="thead-dark"> <tr> <th><?php echo TABLE_HEADING_MANUFACTURERS; ?></th> <th class="text-right"><?php echo TABLE_HEADING_ACTION; ?></th> </tr> </thead> <tbody> <?php $manufacturers_query_raw = "select * from manufacturers order by manufacturers_name"; $manufacturers_split = new splitPageResults($_GET['page'], MAX_DISPLAY_SEARCH_RESULTS, $manufacturers_query_raw, $manufacturers_query_numrows); $manufacturers_query = tep_db_query($manufacturers_query_raw); while ($manufacturers = tep_db_fetch_array($manufacturers_query)) { if ((!isset($_GET['mID']) || (isset($_GET['mID']) && ($_GET['mID'] == $manufacturers['manufacturers_id']))) && !isset($mInfo) && (substr($action, 0, 3) != 'new')) { $manufacturer_products_query = tep_db_query("select count(*) as products_count from products where manufacturers_id = '" . (int)$manufacturers['manufacturers_id'] . "'"); $manufacturer_products = tep_db_fetch_array($manufacturer_products_query); $mInfo_array = array_merge($manufacturers, $manufacturer_products); $mInfo = new objectInfo($mInfo_array); } if (isset($mInfo) && is_object($mInfo) && ($manufacturers['manufacturers_id'] == $mInfo->manufacturers_id)) { echo '<tr class="table-active" onclick="document.location.href=\'' . tep_href_link('manufacturers.php', 'page=' . (int)$_GET['page'] . '&mID=' . (int)$manufacturers['manufacturers_id'] . '&action=edit') . '\'">'; } else { echo '<tr onclick="document.location.href=\'' . tep_href_link('manufacturers.php', 'page=' . (int)$_GET['page'] . '&mID=' . (int)$manufacturers['manufacturers_id']) . '\'">'; } ?> <td><?php echo $manufacturers['manufacturers_name']; ?></td> <td class="text-right"><?php if (isset($mInfo) && is_object($mInfo) && ($manufacturers['manufacturers_id'] == $mInfo->manufacturers_id)) { echo '<i class="fas fa-chevron-circle-right text-info"></i>'; } else { echo '<a href="' . tep_href_link('manufacturers.php', 'page=' . (int)$_GET['page'] . '&mID=' . $manufacturers['manufacturers_id']) . '"><i class="fas fa-info-circle text-muted"></i></a>'; } ?></td> </tr> <?php } ?> </tbody> </table> </div> <div class="row my-1"> <div class="col"><?php echo $manufacturers_split->display_count($manufacturers_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_MANUFACTURERS); ?></div> <div class="col text-right mr-2"><?php echo $manufacturers_split->display_links($manufacturers_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $_GET['page']); ?></div> </div> </div> <?php $heading = []; $contents = []; switch ($action) { case 'new': $heading[] = ['text' => TEXT_HEADING_NEW_MANUFACTURER]; $contents = ['form' => tep_draw_form('manufacturers', 'manufacturers.php', 'action=insert', 'post', 'enctype="multipart/form-data"')]; $contents[] = ['text' => TEXT_NEW_INTRO]; $contents[] = ['text' => TEXT_MANUFACTURERS_NAME . '<br>' . tep_draw_input_field('manufacturers_name')]; $contents[] = ['text' => TEXT_MANUFACTURERS_IMAGE . '<br><div class="custom-file mb-2">' . tep_draw_input_field('manufacturers_image', '', 'id="inputManufacturersImage"', 'file', null, 'class="form-control-input"') . '<label class="custom-file-label" for="inputManufacturersImage">' . TEXT_MANUFACTURERS_IMAGE_LABEL . '</label></div>']; $manufacturer_inputs_string = $manufacturer_description_string = $manufacturer_seo_description_string = $manufacturer_seo_title_string = ''; $languages = tep_get_languages(); for ($i=0, $n=sizeof($languages); $i<$n; $i++) { $manufacturer_inputs_string .= '<div class="input-group"><div class="input-group-prepend"><span class="input-group-text">' . tep_image(tep_catalog_href_link('includes/languages/' . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name']) . '</span></div>' . tep_draw_input_field('manufacturers_url[' . $languages[$i]['id'] . ']') . '</div>'; $manufacturer_description_string .= '<div class="input-group"><div class="input-group-prepend"><span class="input-group-text">' . tep_image(tep_catalog_href_link('includes/languages/' . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name'], '', '', 'style="vertical-align: top;"') . '</span></div>' . tep_draw_textarea_field('manufacturers_description[' . $languages[$i]['id'] . ']', 'soft', '80', '10') . '</div>'; $manufacturer_seo_description_string .= '<div class="input-group"><div class="input-group-prepend"><span class="input-group-text">' . tep_image(tep_catalog_href_link('includes/languages/' . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name'], '', '', 'style="vertical-align: top;"') . '</span></div>' . tep_draw_textarea_field('manufacturers_seo_description[' . $languages[$i]['id'] . ']', 'soft', '80', '10') . '</div>'; $manufacturer_seo_title_string .= '<div class="input-group"><div class="input-group-prepend"><span class="input-group-text">' . tep_image(tep_catalog_href_link('includes/languages/' . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name']) . '</span></div>' . tep_draw_input_field('manufacturers_seo_title[' . $languages[$i]['id'] . ']') . '</div>'; } $contents[] = ['text' => TEXT_MANUFACTURERS_URL . $manufacturer_inputs_string]; $contents[] = ['text' => TEXT_MANUFACTURERS_SEO_TITLE . $manufacturer_seo_title_string]; $contents[] = ['text' => TEXT_MANUFACTURERS_DESCRIPTION . $manufacturer_description_string]; $contents[] = ['text' => TEXT_MANUFACTURERS_SEO_DESCRIPTION . $manufacturer_seo_description_string]; $contents[] = ['class' => 'text-center', 'text' => tep_draw_bootstrap_button(IMAGE_SAVE, 'fas fa-save', null, 'primary', null, 'btn-success mr-2') . tep_draw_bootstrap_button(IMAGE_CANCEL, 'fas fa-times', tep_href_link('manufacturers.php'), null, null, 'btn-light')]; break; case 'edit': $heading[] = ['text' => TEXT_HEADING_EDIT_MANUFACTURER . ' <small>' . TEXT_EDIT_INTRO . '</small>']; $contents = ['form' => tep_draw_form('manufacturers', 'manufacturers.php', 'page=' . (int)$_GET['page'] . '&mID=' . $mInfo->manufacturers_id . '&action=save', 'post', 'enctype="multipart/form-data"')]; $contents[] = ['text' => TEXT_EDIT_INTRO]; $contents[] = ['text' => TEXT_MANUFACTURERS_NAME . '<br>' . tep_draw_input_field('manufacturers_name', $mInfo->manufacturers_name)]; $contents[] = ['text' => TEXT_MANUFACTURERS_IMAGE . '<br><div class="custom-file mb-2">' . tep_draw_input_field('manufacturers_image', '', 'id="inputManufacturersImage"', 'file', null, 'class="form-control-input"') . '<label class="custom-file-label" for="inputManufacturersImage">' . $mInfo->manufacturers_image . '</label></div>']; $manufacturer_inputs_string = $manufacturer_description_string = $manufacturer_seo_description_string = $manufacturer_seo_title_string = ''; $languages = tep_get_languages(); for ($i=0, $n=sizeof($languages); $i<$n; $i++) { $manufacturer_inputs_string .= '<div class="input-group"><div class="input-group-prepend"><span class="input-group-text">' . tep_image(tep_catalog_href_link('includes/languages/' . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name']) . '</span></div>' . tep_draw_input_field('manufacturers_url[' . $languages[$i]['id'] . ']', tep_get_manufacturer_url($mInfo->manufacturers_id, $languages[$i]['id'])) . '</div>'; $manufacturer_seo_title_string .= '<div class="input-group"><div class="input-group-prepend"><span class="input-group-text">' . tep_image(tep_catalog_href_link('includes/languages/' . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name']) . '</span></div>' . tep_draw_input_field('manufacturers_seo_title[' . $languages[$i]['id'] . ']', tep_get_manufacturer_seo_title($mInfo->manufacturers_id, $languages[$i]['id'])) . '</div>'; $manufacturer_description_string .= '<div class="input-group"><div class="input-group-prepend"><span class="input-group-text">' . tep_image(tep_catalog_href_link('includes/languages/' . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name'], '', '', 'style="vertical-align: top;"') . '</span></div>' . tep_draw_textarea_field('manufacturers_description[' . $languages[$i]['id'] . ']', 'soft', '80', '10', tep_get_manufacturer_description($mInfo->manufacturers_id, $languages[$i]['id'])) . '</div>'; $manufacturer_seo_description_string .= '<div class="input-group"><div class="input-group-prepend"><span class="input-group-text">' . tep_image(tep_catalog_href_link('includes/languages/' . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name'], '', '', 'style="vertical-align: top;"') . '</span></div>' . tep_draw_textarea_field('manufacturers_seo_description[' . $languages[$i]['id'] . ']', 'soft', '80', '10', tep_get_manufacturer_seo_description($mInfo->manufacturers_id, $languages[$i]['id'])) . '</div>'; } $contents[] = ['text' => TEXT_MANUFACTURERS_URL . $manufacturer_inputs_string]; $contents[] = ['text' => TEXT_EDIT_MANUFACTURERS_SEO_TITLE . $manufacturer_seo_title_string]; $contents[] = ['text' => TEXT_EDIT_MANUFACTURERS_DESCRIPTION . $manufacturer_description_string]; $contents[] = ['text' => TEXT_EDIT_MANUFACTURERS_SEO_DESCRIPTION . $manufacturer_seo_description_string]; $contents[] = ['class' => 'text-center', 'text' => tep_draw_bootstrap_button(IMAGE_SAVE, 'fas fa-save', null, 'primary', null, 'btn-success mr-2') . tep_draw_bootstrap_button(IMAGE_CANCEL, 'fas fa-times', tep_href_link('manufacturers.php', 'page=' . (int)$_GET['page'] . '&mID=' . (int)$mInfo->manufacturers_id), null, null, 'btn-light')]; break; case 'delete': $heading[] = ['text' => TEXT_HEADING_DELETE_MANUFACTURER]; $contents = ['form' => tep_draw_form('manufacturers', 'manufacturers.php', 'page=' . (int)$_GET['page'] . '&mID=' . $mInfo->manufacturers_id . '&action=deleteconfirm')]; $contents[] = ['text' => TEXT_DELETE_INTRO]; $contents[] = ['text' => '<strong>' . $mInfo->manufacturers_name . '</strong>']; $contents[] = ['text' => '<div class="custom-control custom-switch">' . tep_draw_selection_field('delete_image', 'checkbox', 'on', null, 'class="custom-control-input" id="mDeleteImg"') . '<label for="mDeleteImg" class="custom-control-label text-muted"><small>' . TEXT_DELETE_IMAGE . '</small></label></div>']; if ($mInfo->products_count > 0) { $contents[] = ['text' => '<div class="custom-control custom-switch">' . tep_draw_selection_field('delete_products', 'checkbox', 'on', null, 'class="custom-control-input" id="mDeleteProducts"') . '<label for="mDeleteProducts" class="custom-control-label text-muted"><small>' . TEXT_DELETE_PRODUCTS . '</small></label></div>']; $contents[] = ['text' => sprintf(TEXT_DELETE_WARNING_PRODUCTS, $mInfo->products_count)]; } $contents[] = ['class' => 'text-center', 'text' => tep_draw_bootstrap_button(IMAGE_DELETE, 'fas fa-trash', null, 'primary', null, 'btn-danger mr-2') . tep_draw_bootstrap_button(IMAGE_CANCEL, 'fas fa-times', tep_href_link('manufacturers.php', 'page=' . (int)$_GET['page'] . '&mID=' . $mInfo->manufacturers_id), null, null, 'btn-light')]; break; default: if (isset($mInfo) && is_object($mInfo)) { $heading[] = ['text' => $mInfo->manufacturers_name]; $contents[] = ['class' => 'text-center', 'text' => tep_draw_bootstrap_button(IMAGE_EDIT, 'fas fa-cogs', tep_href_link('manufacturers.php', 'page=' . (int)$_GET['page'] . '&mID=' . $mInfo->manufacturers_id . '&action=edit'), null, null, 'btn-warning mr-2') . tep_draw_bootstrap_button(IMAGE_DELETE, 'fas fa-trash', tep_href_link('manufacturers.php', 'page=' . (int)$_GET['page'] . '&mID=' . $mInfo->manufacturers_id . '&action=delete'), null, null, 'btn-danger')]; $contents[] = ['text' => sprintf(TEXT_DATE_ADDED, tep_date_short($mInfo->date_added))]; if (tep_not_null($mInfo->last_modified)) $contents[] = ['text' => sprintf(TEXT_LAST_MODIFIED, tep_date_short($mInfo->last_modified))]; $contents[] = ['text' => tep_info_image($mInfo->manufacturers_image, $mInfo->manufacturers_name)]; $contents[] = ['text' => sprintf(TEXT_PRODUCTS, $mInfo->products_count)]; } break; } if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) { echo '<div class="col-12 col-sm-4">'; $box = new box; echo $box->infoBox($heading, $contents); echo '</div>'; } ?> </div> <script>$(document).on('change', '#inputManufacturersImage', function (event) { $(this).next('.custom-file-label').html(event.target.files[0].name); });</script> <?php require('includes/template_bottom.php'); require('includes/application_bottom.php'); ?> Instructions for changes - this and all code beyond has been changed in the file FIND (around line 87 and again around line 125): if (USE_CACHE == 'true') { tep_reset_cache_block('manufacturers'); } Make the following changes to admin/manufacturers.php FIND (about line 53): $manufacturers_description_array = $_POST['manufacturers_description']; $manufacturers_seo_description_array = $_POST['manufacturers_seo_description']; $manufacturers_seo_title_array = $_POST['manufacturers_seo_title']; REPLACE WITH: /*** Begin Header Tags SEO ***/ $manufacturers_seo_keywords_array = $_POST['manufacturers_seo_keywords']; $manufacturers_htc_title_array = str_replace('"', '&quot;',$_POST['manufacturers_htc_title_tag']); $manufacturers_htc_title_alt_array = str_replace('"', '&quot;',$_POST['manufacturers_htc_title_tag_alt']); $manufacturers_htc_title_url_array = $_POST['manufacturers_htc_title_tag_url']; $manufacturers_htc_desc_array = str_replace('"', '&quot;',$_POST['manufacturers_htc_desc_tag']); $manufacturers_htc_keywords_array = $_POST['manufacturers_htc_keywords_tag']; $manufacturers_htc_description_array = $_POST['manufacturers_htc_description']; $manufacturers_htc_breadcrumb_array = $_POST['manufacturers_htc_breadcrumb_text']; /*** End Header Tags SEO ***/ ------------------------------------------------------------------------------- FIND (around line 63): $sql_data_array['manufacturers_description'] = tep_db_prepare_input($manufacturers_description_array[$language_id]); $sql_data_array['manufacturers_seo_description'] = tep_db_prepare_input($manufacturers_seo_description_array[$language_id]); $sql_data_array['manufacturers_seo_title'] = tep_db_prepare_input($manufacturers_seo_title_array[$language_id]); REPLACE WITH: /*** Begin Header Tags SEO ***/ $sql_data_array['manufacturers_seo_keywords'] = tep_db_prepare_input($manufacturers_seo_keywords_array[$language_id]); $sql_data_array['manufacturers_htc_title_tag'] = (tep_not_null($manufacturers_htc_title_array[$language_id]) ? tep_db_prepare_input(strip_tags($manufacturers_htc_title_array[$language_id])) : strip_tags($manufacturers_name)); $sql_data_array['manufacturers_htc_title_tag_alt'] = (tep_not_null($manufacturers_htc_title_alt_array[$language_id]) ? tep_db_prepare_input(strip_tags($manufacturers_htc_title_alt_array[$language_id])) : strip_tags($manufacturers_name)); $sql_data_array['manufacturers_htc_title_tag_url'] = (tep_not_null($manufacturers_htc_title_alt_array[$language_id]) ? tep_db_prepare_input(strip_tags($manufacturers_htc_title_url_array[$language_id])) : strip_tags($manufacturers_name)); $sql_data_array['manufacturers_htc_desc_tag'] = (tep_not_null($manufacturers_htc_desc_array[$language_id]) ? tep_db_prepare_input($manufacturers_htc_desc_array[$language_id]) : $manufacturers_name); $sql_data_array['manufacturers_htc_keywords_tag'] = (tep_not_null($manufacturers_htc_keywords_array[$language_id]) ? tep_db_prepare_input(strip_tags($manufacturers_htc_keywords_array[$language_id])) : strip_tags($manufacturers_name)); $sql_data_array['manufacturers_htc_description'] = tep_db_prepare_input($manufacturers_htc_description_array[$language_id]); $sql_data_array['manufacturers_htc_breadcrumb_text'] = (tep_not_null($manufacturers_htc_breadcrumb_array[$language_id]) ? tep_db_prepare_input(strip_tags($manufacturers_htc_breadcrumb_array[$language_id])) : strip_tags($manufacturers_name)); /*** End Header Tags SEO ***/ ------------------------------------------------------------------------------- FIND (around line 87 and again around line 125): if (USE_CACHE == 'true') { tep_reset_cache_block('manufacturers'); } ADD BENEATH: /*** Begin Header Tags SEO ***/ if (HEADER_TAGS_ENABLE_CACHE != 'None') { require_once(DIR_WS_FUNCTIONS . 'header_tags.php'); ResetCache_HeaderTags('index.php', 'm_' . $manufacturers_id); } /*** End Header Tags SEO ***/ ------------------------------------------------------------------------------- FIND (around line 156): $manufacturers_query_raw = "select manufacturers_id, manufacturers_name, manufacturers_image, date_added, last_modified from manufacturers order by manufacturers_name"; REPLACE WITH: /*** Begin Header Tags SEO ***/ $manufacturers_query_raw = "select m.manufacturers_id, m.manufacturers_name, m.manufacturers_image, m.date_added, m.last_modified, mi.manufacturers_htc_title_tag, mi.manufacturers_htc_title_tag_alt, mi.manufacturers_htc_title_tag_url from manufacturers m LEFT JOIN manufacturers_info mi on m.manufacturers_id = mi.manufacturers_id where mi.languages_id = '".$languages_id ."' order by m.manufacturers_name"; /*** End Header Tags SEO ***/ ------------------------------------------------------------------------------- FIND (around line 213): $manufacturer_inputs_string = $manufacturer_description_string = $manufacturer_seo_description_string = $manufacturer_seo_keywords_string = $manufacturer_seo_title_string = ''; $languages = tep_get_languages(); for ($i=0, $n=sizeof($languages); $i<$n; $i++) { $manufacturer_inputs_string .= '<br />' . tep_image(tep_catalog_href_link('includes/languages/' . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name']) . '&nbsp;' . tep_draw_input_field('manufacturers_url[' . $languages[$i]['id'] . ']'); $manufacturer_description_string .= '<br />' . tep_image(tep_catalog_href_link('includes/languages/' . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name'], '', '', 'style="vertical-align: top;"') . '&nbsp;' . tep_draw_textarea_field('manufacturers_description[' . $languages[$i]['id'] . ']', 'soft', '80', '10'); $manufacturer_seo_description_string .= '<br />' . tep_image(tep_catalog_href_link('includes/languages/' . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name'], '', '', 'style="vertical-align: top;"') . '&nbsp;' . tep_draw_textarea_field('manufacturers_seo_description[' . $languages[$i]['id'] . ']', 'soft', '80', '10'); $manufacturer_seo_title_string .= '<br />' . tep_image(tep_catalog_href_link('includes/languages/' . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name']) . '&nbsp;' . tep_draw_input_field('manufacturers_seo_title[' . $languages[$i]['id'] . ']', NULL, 'style="width: 300px;"'); REPLACE WITH: $manufacturer_inputs_string = ''; $languages = tep_get_languages(); for ($i=0, $n=sizeof($languages); $i<$n; $i++) { $manufacturer_inputs_string .= '<br />' . tep_image(tep_catalog_href_link('includes/languages/' . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name']) . '&nbsp;' . tep_draw_input_field('manufacturers_url[' . $languages[$i]['id'] . ']'); /*** Begin Header Tags SEO ***/ $manufacturer_seo_keywords_string .= '<br />' . tep_image(tep_catalog_href_link('includes/languages/' . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name']) . '&nbsp;' . tep_draw_input_field('manufacturers_seo_keywords[' . $languages[$i]['id'] . ']', NULL, 'style="width: 300px;" placeholder="' . PLACEHOLDER_COMMA_SEPARATION . '"'); $manufacturer_htc_title_string .= '<br />' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;' . tep_draw_input_field('manufacturers_htc_title_tag[' . $languages[$i]['id'] . ']'); $manufacturer_htc_title_alt_string .= '<br />' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;' . tep_draw_input_field('manufacturers_htc_title_tag_alt[' . $languages[$i]['id'] . ']'); $manufacturer_htc_title_url_string .= '<br />' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;' . tep_draw_input_field('manufacturers_htc_title_tag_url[' . $languages[$i]['id'] . ']'); $manufacturer_htc_breadcrumb_string .= '<br>' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;' . tep_draw_input_field('manufacturers_htc_breadcrumb_text[' . $languages[$i]['id'] . ']'); $manufacturer_htc_desc_string .= '<br>' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;' . tep_draw_input_field('manufacturers_htc_desc_tag[' . $languages[$i]['id'] . ']'); $manufacturer_htc_keywords_string .= '<br>' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;' . tep_draw_input_field('manufacturers_htc_keywords_tag[' . $languages[$i]['id'] . ']'); if (HEADER_TAGS_ENABLE_HTML_EDITOR == 'No Editor' || HEADER_TAGS_ENABLE_EDITOR_MANUFACTURERS == 'false') { $manufacturer_htc_description_string .= '<br />' . tep_image(tep_catalog_href_link('includes/languages/' . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name'], '', '', 'style="vertical-align: top;"') . '&nbsp;' . tep_draw_textarea_field('manufacturers_description[' . $languages[$i]['id'] . ']', 'soft', '80', '10'); } else { $manufacturer_htc_description_string .= '<br />' . tep_image(tep_catalog_href_link('includes/languages/' . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name'], '', '', 'style="vertical-align: top;"') . '&nbsp;' . tep_draw_textarea_ckeditor('manufacturers_description[' . $languages[$i]['id'] . ']', '80', '10'); } /*** End Header Tags SEO ***/ ------------------------------------------------------------------------------- FIND (around line 235): $contents[] = array('text' => '<br />' . TEXT_MANUFACTURERS_SEO_TITLE . $manufacturer_seo_title_string); $contents[] = array('text' => '<br />' . TEXT_MANUFACTURERS_DESCRIPTION . $manufacturer_description_string); $contents[] = array('text' => '<br />' . TEXT_MANUFACTURERS_SEO_DESCRIPTION . $manufacturer_seo_description_string); REPLACE WITH: /*** Begin Header Tags SEO ***/ $contents[] = array('text' => '<br />' . TEXT_MANUFACTURERS_SEO_KEYWORDS . $manufacturer_seo_keywords_string); $contents[] = array('text' => '<br />' . 'Header Tags Manufacturer Title' . $manufacturer_htc_title_string); $contents[] = array('text' => '<br />' . 'Header Tags Manufacturer Title Alt' . $manufacturer_htc_title_alt_string); $contents[] = array('text' => '<br />' . 'Header Tags Manufacturer Title URL' . $manufacturer_htc_title_url_string); $contents[] = array('text' => '<br />' . 'Header Tags Manufacturer Breadcrumb' . $manufacturer_htc_breadcrumb_string); $contents[] = array('text' => '<br />' . 'Header Tags Manufacturer Description' . $manufacturer_htc_desc_string); $contents[] = array('text' => '<br />' . 'Header Tags Manufacturer Keywords' . $manufacturer_htc_keywords_string); $contents[] = array('text' => '<br />' . 'Header Tags Manufacturer Description' . $manufacturer_htc_description_string); /*** End Header Tags SEO ***/ ------------------------------------------------------------------------------- FIND (around line 254): $manufacturer_inputs_string = $manufacturer_description_string = $manufacturer_seo_description_string = $manufacturer_seo_title_string = ''; REPLACE WITH: /*** Begin Header Tags SEO ***/ $manufacturer_inputs_string = $manufacturer_description_string = $manufacturer_seo_description_string = $manufacturer_seo_keywords_string = $manufacturer_seo_title_string = ''; /*** End Header Tags SEO ***/ ------------------------------------------------------------------------------- FIND (around line 254): $manufacturer_seo_description_string .= '<div class="input-group"><div class="input-group-prepend"><span class="input-group-text">' . tep_image(tep_catalog_href_link('includes/languages/' . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name'], '', '', 'style="vertical-align: top;"') . '</span></div>' . tep_draw_textarea_field('manufacturers_seo_description[' . $languages[$i]['id'] . ']', 'soft', '80', '10', tep_get_manufacturer_seo_description($mInfo->manufacturers_id, $languages[$i]['id'])) . '</div>'; ADD BENEATH: /*** Begin Header Tags SEO ***/ $manufacturer_seo_keywords_string .= '<div class="input-group"><div class="input-group-prepend"><span class="input-group-text">' . tep_image(tep_catalog_href_link('includes/languages/' . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name']) . '</span></div>' . tep_draw_input_field('manufacturers_seo_keywords[' . $languages[$i]['id'] . ']', tep_get_manufacturer_seo_keywords($mInfo->manufacturers_id, $languages[$i]['id']), 'placeholder="' . PLACEHOLDER_COMMA_SEPARATION . '"') . '</div>'; $manufacturer_htc_title_alt_string .= '<div class="input-group"><div class="input-group-prepend"><span class="input-group-text">' . tep_image(tep_catalog_href_link('includes/languages/' . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name']) . '</span></div>' . tep_draw_input_field('manufacturers_htc_title_tag_alt[' . $languages[$i]['id'] . ']', tep_get_manufacturer_htc_title_alt($mInfo->manufacturers_id, $languages[$i]['id'])) . '</div>'; $manufacturer_htc_title_url_string .= '<div class="input-group"><div class="input-group-prepend"><span class="input-group-text">' . tep_image(tep_catalog_href_link('includes/languages/' . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name']) . '</span></div>' . tep_draw_input_field('manufacturers_htc_title_tag_url[' . $languages[$i]['id'] . ']', tep_get_manufacturer_htc_title_url($mInfo->manufacturers_id, $languages[$i]['id'])) . '</div>'; $manufacturer_htc_breadcrumb_string .= '<div class="input-group"><div class="input-group-prepend"><span class="input-group-text">' . tep_image(tep_catalog_href_link('includes/languages/' . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name']) . '</span></div>' . tep_draw_input_field('manufacturers_htc_breadcrumb_text[' . $languages[$i]['id'] . ']', tep_get_manufacturer_htc_breadcrumb($mInfo->manufacturers_id, $languages[$i]['id'])) . '</div>'; /*** End Header Tags SEO ***/ ------------------------------------------------------------------------------- FIND (around line 276): $contents[] = ['text' => TEXT_EDIT_MANUFACTURERS_SEO_DESCRIPTION . $manufacturer_seo_description_string]; ADD BENEATH: /*** Begin Header Tags SEO ***/ $contents[] = ['text' => TEXT_EDIT_MANUFACTURERS_SEO_KEYWORDS . $manufacturer_seo_keywords_string]; $contents[] = ['text' => TEXT_HEADERTAGS_TITLE_ALT . $manufacturer_htc_title_alt_string]; $contents[] = ['text' => TEXT_HEADERTAGS_TITLE_URL . $manufacturer_htc_title_url_string]; $contents[] = ['text' => TEXT_HEADERTAGS_BREADCRUMB . $manufacturer_htc_breadcrumb_string]; /*** End Header Tags SEO ***/ =================================================================== That's all ;-) =================================================================== TROUBLESHOOTING: 1 - The tools in the admin section have to be able to write to the include/header_tags.php file. In order to do that, the permissions for that file must be set correctly. If Header Tags thinks the permissions are not set correctly, it will display a warning message with what it thinks are the proper permissions. You will need to change those permissions using an ftp program (right click and choose chmod) or by using your hosts control panel. The permissions should, typically, be set to 755 (777 for some servers). If you do not know what this is or how to do it, ask your host to help you. 2 - Some hosts restrict a function used in catalog/admin/includes/functions/header_tags.php. If you get an error regarding the chmod() php function in this file, like: Warning: chmod(): Operation not permitted in ... Cannot change the mode of file (../includes/header_tags.php) and you have addressed the file permissions settings as stated above, you may have to comment out the function. To do that, OPEN: admin/includes/functions/header_tags.php Around line 201 you find this code: if (!is_writable($filename)) { if (!chmod($filename, 0666)) { echo "Cannot change the mode of file ($filename)"; exit; } } Replace that with the following code: if (!is_writable($filename)) { echo "The file isn't writable"; exit; /* if (!chmod($filename, 0666)) { echo "Cannot change the mode of file ($filename)"; exit; } */ }
  20. This is probably telling you that the file is not writable by the web server. Info Pages edits database entries, not files.
  21. When clicking on a filename to edit the contents. Link shows as: https://www.aaa.com/admin/define_language.php?lngdir=english&amp;filename=english/products_new.php but doesn't open file, reloads the define languages page. Going into catalog/includes/languages/english to manually edit files and looking at say conditions, privacy, shipping the files are the original uploaded files while the changes added through admin -> tools -> infopages is obviously not added to the respective files. Any help is greatly appreciated. Phoenix 1.0.7.9 PHP 7.4 s06e01 d49 d48 d47 d46 d45 d44 d43 d41 d18 d40 d24 d39 d14 d17 d16 d34 d33 d26 d35A Price d38 d08 & d09 d19 d25 d28 d37 d31 d30 d04 s06e02 d29 d21 removed - breaks admin
  22. Heatherbell

    Update from 2.3.3.3 to Phoenix

    Try: https://apps.oscommerce.com/jZAuB&amp;osc-to-cephoenix-migration-utility-0-1-6
  23. Mikepo

    Stripe v3 module for SCA

    I'll check again. I'm using the stripe CLI interface as I'm on a test environment, the error might be related to this. I'll double check.
  24. raiwa

    Stripe v3 module for SCA

    Very strange, can you double check please. I get this with "Pending" as last status:
  25. raiwa

    Stripe v3 module for SCA

    O.K. Thanks I'll have a look. The first error doesn't seem to be related.
  26. Mikepo

    Stripe v3 module for SCA

    settings are as you quoted, php log shows this PHP Notice: Undefined variable: modal_size in /xxx/xx/xxx/includes/hooks/shop/checkout_confirmation/finalisedOrder.php on line 24, referer: https://xxxx/checkout_payment.php PHP message: PHP Deprecated: The checkout/reset segment has been deprecated. in /xxx/xx/xxx/includes/system/segments/checkout/reset.php on line 13, referer: https://xxxx/checkout_confirmation.php
  27. raiwa

    Stripe v3 module for SCA

    Thank you. I'll have a look. DId you leave the status settings like by default? I got it right when testing with these settings: Set New Order Status Preparing [Stripe SCA] Set Order Processed Status default Transaction Order Status Stripe SCA [Transactions] Set Order Processed Status Should be set to "default" or if your default is different to "pending"
  1. Load more activity
×