Jump to content

trier

Members
  • Content count

    94
  • Joined

  • Last visited

Profile Information

  • Real Name
    Jimbo
  • Gender
    Male

Recent Profile Visitors

10,514 profile views
  1. trier

    Phoenix Trivia

    Are many (any?) of the entries in admin>includes>languages>english>images still used? I think the folder may now be redundant (?), possible a few older add-ons may use it. If the folder is redundant tep_image_submit in html_output.php may now be surplus to requirements?
  2. In case it's of interest - is there a minor error in admin>includes>boxes>customers.php? It throws up: Notice: Undefined index: title in /var/www/vhosts/aperfume.co.uk/ph1040.aperfume.co.uk/a19b0414zx/includes/column_left.php on line 47 Notice: Undefined index: link in /var/www/vhosts/aperfume.co.uk/ph1040.aperfume.co.uk/a19b0414zx/includes/column_left.php on line 64 Notice: Undefined index: title in /var/www/vhosts/aperfume.co.uk/ph1040.aperfume.co.uk/a19b0414zx/includes/column_left.php on line 64 Comparing customers.php to orders.php (which should be very similar?), customers.php has 2 extra lines (16 & 17) - “array (“ & “)”, removing these 2 clears the notices.
  3. 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
  4. 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.
  5. 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?
  6. 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
  7. @spooks: it’s been a while, welcome back. You, your help, your contributions, have all been missed.
  8. 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.
  9. 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
  10. 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
  11. @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
  12. 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?
  13. 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
  14. @@Jack_mcs Hi, Thank you for the reply, I appreciate it. Are you able to replicate the problem? (If it exists) it may be a session problem and not an SEO URL problem (i.e. there may be other instances where a first/second page submit redirects to index.php). The full piece of code in tep_session_start() is - 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; } } The “(SESSION_FORCE_COOKIE_USE == 'True') || “ seems to cause the problem, I don’t believe it existed in previous incarnations of session.php, removing it cures the problem. Should I raise the query again within the v2.4 support topic? Many thanks
×