Jump to content

trier

Members
  • Content count

    92
  • Joined

  • Last visited

Profile Information

  • Real Name
    Jimbo
  • Gender
    Male

Recent Profile Visitors

10,310 profile views
  1. When playing about with Phoenix version 1.0.2.0 I created an admin hook (hook_admin_siteWide) to achieve the following on the Categories / Products page (after first checking for $PHP_SELF = ‘categories.php’): 1) listen_injectSiteStart a) Save $_GET & $_POST data to update new non-core product related table/items later 2) listen_injectSiteEnd a) action: ‘new_product’ output new product related table/items and generate jQuery code to display them where relevant on page b) action: 'copy_to' change the default copy_as - “link” to copy_as - “duplicate” c) action: 'new_product_preview' change to action 'new_product' (i.e. edit instead of preview) d) action = ‘delete_category_confirm’ action = ‘delete_product_confirm’ delete a new non-core product related table e) action = ‘copy_to_confirm’ copy new non-core product related table & product items f) action = ‘insert_product’ action = ‘update_product’ create/update new non-core table/product items using the $_POST data saved in injectSiteStart g) Category products list page (isset($_GET['cPath']) && strlen($_GET['cPath']) > 0) create hidden table of ids/models, generate jQuery to show id & model on each displayed product line copy the Back & New Category/Product buttons displayed at the bottom of the page to also display at the top Although I’ve got absolutely no idea what I’m doing, this seemed to achieve everything I wanted. However, by v1.0.3.0 injectSiteStart has been moved from application_top to template_top, as a result changes 1a/2f no longer work because there is no opportunity to capture the $_POST data (‘update_product’ redirects to the top before the first hook is executed). Using the hooks that are now available in v1.0.3.0 categories.php, I restructured the code for the new calls. The restructure is more elegant and solves the problem above, unfortunately a new problem is introduced – 2b 'copy_to' and 2g ‘Category products list page’ no longer work because output for the page is after the last available hook. Using a mix of the ‘siteWide’ & ‘categories’ hooks would be simple enough to achieve everything but splitting the changes over two different hook groups seems messy and a recipe for future problems/disaster. Questions: a) Is it possible to have a hook re-introduced into application-top (in order to use the original solution). The Shop side has a hook call in application_top, does the justification for it apply to Admin too? b) Is it possible to have a hook call at the end of categories.php? Perhaps every page that has hooks should have a call at top/bottom? For ‘non-hook’ pages, the hooks in template_top and template_bottom are available (for shop & admin), check against $PHP_SELF to apply to the correct page/script. I could obviously make these changes myself but it goes against “no core changes”. It would be simpler (short term) to insert all the changes into categories.php but it goes against “no core changes” and, to a degree, it defeats the object of hooks. P.S. A remarkable amount (almost anything?) can be achieved using hooks & javascript/jQuery instead of changing core code. Use the suck it & see approach – base the change on an existing hook and search the net for a javascript/jQuery solution to achieve the changes needed to the page after it is output. Keep playing about until you get what you want. On the Shop side, if you want the ability to turn on/off, use content/header-tag/etc. modules instead of a hook
  2. Apologies if this is obvious (but it can easily be overlooked and may be a posibility) - Do you ftp from your local m/c to the server before your install? If so (and you normally make changes locally): The install will update the config. files, the file you listed looks more like a pre-install config.? Don’t forget, after install you need to download the config. files from the server, they will be different to the local ones. If you change the admin folder name during the install, change the local folder name before doing anything else.
  3. Hi, Be warned, this content is tedious and triviality in the extreme, reading it may numb your brain, you may even lose the will to live. You have been warned (hopefully it is right): 1) includes/actions/update_product.php – if there are items in cart, some with attributes, some without attributes, updating qty will throw an error “Undefined offset: x” for each item without attributes (x = product_id). It executes correctly but any error is a tad unwelcome. 2) administrators table - user_name is defined with ‘collation = utf8_bin’ all other character type items seem to be defined with collation ‘utf8_unicode_ci’. Is there a reason? Does it matter? Does anyone care? 3) customers table - customers_dob is defined default = ‘1970-01-01 00:00:01’, I think it was defined as ‘NULL’ in previous versions (?). Is there a reason? Does it matter? Does anyone care? Should previous ‘null’ entries be changed to ‘1970-01-01 00:00:01’? 4) orders_status table - public_flag and downloads_flag are defined as int(11). Could they be defined as tinyint(1)? Does it matter? Does anyone care? (told you these were trivialities). 5) product_info.php Can line 38 $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id, p.products_gtin from products p, products_description pd where p.products_status = '1' and p.products_id = '" . (int)$_GET['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); be moved to overwrite line 21 $product_check_query = tep_db_query("select count(*) as total from products p, products_description pd where p.products_status = '1' and p.products_id = '" . (int)$_GET['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); and line 26 if ($product_check['total'] < 1) be changed to if (tep_db_num_rows($product_info_query)<1) $product_check['total'] is used elsewhere (maybe set $product_check['total'] = tep_db_num_rows($product_info_query)?). Very trivial, but it does save a database access (does it really matter any more?). Several other modules read product info details, could all details be prepared in a product_info header tag module so it is readily available to other modules? 6) includes/modules/navbar-modules/nb_home.php & nb_account.php These can both be placed in ‘Home’ portion of navbar, I don’t think ‘Home’ is designed for these ‘<li>’ type items? 7) Is it possible/worthwhile including a facility in application_top.php to output all errors to a file. Better still, the option output to screen and/or file and possibly the facility to set the error level? If an error occurs in a template module I don’t think is displays anywhere (?) so could go unnoticed for quite a while. 8) define('MODULE_NAVBAR_SHOPPING_CART_NO_CONTENTS', '<i class="fas fa-shopping-cart fa-fw"></i> 0 items'); is this used? 9) define(‘MODULE_NAVBAR_SHOPPING_CART_VIEW_CART’, 'View Cart'); is this used?
  4. Hi, In the Phoenix product_info page there doesn’t appear to be any ‘<meta itemprop=’ type statements (currency, cost, condition etc.). Are the statements no longer of use (there is still a limited selection in product_listing, new_product etc. pages)? Thanks
  5. @spooks: it’s been a while, welcome back. You, your help, your contributions, have all been missed.
  6. trier

    Tabbed Product Admin

    Hi, Sorry, ignore my previous message, I've addressed the wrong add-on, I think I meant the tabbed product add-on.
  7. trier

    Tabbed Product Admin

    Hi, Thank you for this excellent add-on. I believe I've installed it correctly(?), it seems to work as expected. Assuming that to be the case, there appears to be one very minor trivial PHP error - Undefined index: admin includes/classes/hooks.php line 56 Many Thanks
  8. Hi, Thank you for this very useful addon. A very trivial minor comment (doesn’t seem to affect anything) - does: $base_url used: in includes/modules/hooks/admin/orders_customer_tab.php line 64 $tab_link = substr(tep_href_link('orders.php', tep_get_all_get_params()), strlen($base_url)) . '#section_customer_orders'; need to be included as a global in the function? Many thanks
  9. @burt @BrockleyJohn Hi, Thank you for your comments. Because of the significant number of changes to my website, keeping it up-to-date is always a headache (particularly given my total lack of organising/documentation skills). Although there is obviously a bit of a processing overhead, I figured changes would be easier to identify/understand if kept outside core scripts. Regarding search engine view of pages where elements have been moved/replaced/deleted by jQuery, the product_listing & product_info page titles/headings are quite heavily changed, I may need to check that it doesn’t have a negative impact. Thank you for your help
  10. Hi, This is a slight divergence to the “Emails in 2.4” question raised by @frankl - I am currently trying to make changes to 2.3.4bs without tampering with core code - using jQuery (until pages are fully modularised) in new footer content scripts it is possible to make significant changes to page content/layout (is this OK or unwise?). Is it also possible using a header_tag script to add code that would otherwise be in application_top (is there a better way?). However, I have not yet found a suitable way to externally change functions. I would like to make minor changes to tep_href_link, tep_address_format, and tep_mail without meddling with core. Apparently there is no PHP facility to delete/replace (system/user) functions. Is there a suitable solution?
  11. Hi, Before I download the latest version of v234bs, are there any plans to promote https://github.com/gburton/Responsive-osCommerce/tree/TablePrefix to edge in the near future? Thanks
  12. Hi, Thank you for this, excellent. Thank you too for the other helpful contributions you make to this forum. I’ve checked the implementation of this several times but “MODULE_HEADER_TAGS_MCAFEE_TRUSTMARK_ID” (line 34 includes>modules>header_tags>ht_mcafee_trustmark.php) throws up an “undefined constant” message, I can’t find where it is/should be defined? Many thanks
  13. Hi, I think I’m going round in circles & missing something: Is the a minor fault in the latest version (2.3.4 Edge) of includes>modules>payment>paypal_standard.php - The last line in function after_process() is tep_redirect(tep_href_link('checkout_process.php', '', 'SSL')); should it be tep_redirect(tep_href_link('checkout_success.php', '', 'SSL')); ? v2.4 :heart: :heart: :heart: :D :D :D
  14. Hi, I raised this query in the SEO URL thread because I thought it may be related to the add-on. On reflection (if it exists) I think it may be related to 'Sessions' (apologies for the length, I'll give the my perceived answer before the question) . In v234bs (v234?) there is a piece of code in includes/functions/sessions.php in the tep_session_start() function line 64ish - if ( isset($HTTP_GET_VARS[tep_session_name()]) ) { if ( (SESSION_FORCE_COOKIE_USE == 'True') || (preg_match('/^[a-zA-Z0-9,-]+$/', $HTTP_GET_VARS[tep_session_name()]) == false) ) { unset($HTTP_GET_VARS[tep_session_name()]); $sane_session_id = false; } } it is repeated for $HTTP_POST_VARS[tep_session_name()] and slightly different for $HTTP_COOKIE_VARS[tep_session_name()]. The "(SESSION_FORCE_COOKIE_USE == 'True') ||" in the code was not present in previous versions of the script, by removing it my problem no longer occurs (it is not present in the $HTTP_COOKIE_VARS[tep_session_name()] test). The problem as raised in the SEO URL thread (verbatum) - I seem to have a minor problem with SEO URLs/session.php compatibility in v234bs? I’ll try to explain what I believe the problem is - v234bs SEO URLs with ‘Force Cookie Use’ = true: Clear all cookies/browsing data Go to site Enter a Search Key and Search Enter a Search Key (same or different to first) and Search Result: instead on being in advanced_search_result.php, index.php is loaded. Additionally an error is thrown from includes/classes/seo.class.php “undefined constant CHARSET - assumed 'CHARSET' On line 1824”. Log entries (note the inclusion of osCsid?): “GET /advanced_search_result.php?keywords=creed&osCsid=b5lpc34dn9fchcgp043q188qr3 HTTP/1.1" 302 421 "http --/advanced_search_result.php?keywords=creed “GET /index.php HTTP/1.1" 200 5956 “http --/advanced_search_result.php?keywords=creed" The problem also seems to occur with: Clear all cookies/browsing data Go to site Go to Product Listing (i.e. category list) Select Manufacturer from Product Listing filter The problem only seems to happen once, everything appears OK subsequently. Problem doesn’t seem to happen: with ‘Force Cookie Use’ = false using a v233 “sessions.php” on a clean v234bs with no SEO URLs Many Thanks
×