Jump to content

All Activity

This stream auto-updates     

  1. Yesterday
  2. ecartz

    Warning: Use of undefined constant on PHP 7.4

    This is not from core code, which doesn't use that parameter. Certainly not in the current Phoenix and I don't believe so in older versions of osCommerce. If you are simply getting that's telling you that a define is missing. Nothing to do with case sensitivity. Someone might be able to help more if you gave the actual error which says which "constant" is missing.
  3. LeeFoster

    Attribute Images

    My current range of products only have one attribute, I'll address multiple attributes when it comes up unless @burt has an idea?
  4. hungryfrank

    Attribute Images

    so lets say you have two attributes color red/greenn/blue shape. circle/square so do we want to show blue when blue is selected and when they choose circle then blue is replaced with circle it would be better to show a blue circle but this makes the whole thing more complicated.
  5. I am getting many warning errors on PHP 7.4: Warning: Use of undefined constant https://www.php.net/manual/en/function.define.php Warning Defining case-insensitive constants is deprecated as of PHP 7.3.0. There's any suggestion to update define to variables? Thank you
  6. hungryfrank

    Express checkout 1_2 pages

    thanks. I will add it in a few days.i have some other mortification also to make all boxes switchable in admin.
  7. Omar_one

    Express checkout 1_2 pages

    @hungryfrank I have edit the checkout_payment_exp.php to work with Phoenix v1.0.7.2 and here is the file checkout_payment_exp.php
  8. hungryfrank

    Attribute Images

    it needs a loop
  9. LeeFoster

    Attribute Images

    Yes it does need there to be an image for all options.
  10. hungryfrank

    Attribute Images

    great. this is a working and usable as an add-on. but it has to work with all options.
  11. LeeFoster

    Attribute Images

    The images are named after the product id combined with the option id and added in the same way as a normal image. So you see them like this -
  12. hungryfrank

    Attribute Images

    @LeeFoster you can probably add the images to the product like a regular large image. name the image the same thing as the option, and access it like that. this way you also have them in the thumbs
  13. hungryfrank

    Attribute Images

    I prefer the header tag. removing a hook file is dangerous
  14. hungryfrank

    Attribute Images

    did get it to work?
  15. hungryfrank

    Attribute Images

    you have to put it in loop so it works on all the attribute/options
  16. LeeFoster

    Attribute Images

    Couldn't get it to work as a hook, rather than wait for someone else to come up with a solution I decided to take a different approach and create it as a header tag module and now I have a working image change function. And then I realise the reason the hook isn't working is because notepad++ isn't saving the file as .php and I have it working as a hook.
  17. LeeFoster

    Attribute Images

    Tried this and still not working. I used the showPassword hook as my basis and that that doesn't declare any globals so don't see why this would need to. The hook doesn't seem to be getting called though.
  18. samehfr

    Attribute Images

    Thank you I have the same problem
  19. hungryfrank

    Attribute Images

    global $_SERVER first if it didn't work then global $PHP_SELF; if($PHP_SELF='product_info.php'){ instead of if (in_array(basename($_SERVER['PHP_SELF']), $this->safe_pages)) { check the spelling
  20. LeeFoster

    Attribute Images

    Nope, this didn't make a difference.
  21. hungryfrank

    Attribute Images

    global $PHP_SELF;
  22. LeeFoster

    Attribute Images

    This is the hook I got to but it doesn't appear to work. class hook_shop_siteWide_changeImage { var $site_end = null; var $safe_pages = ['product_info.php']; function listen_injectSiteEnd() { $changeImageScript = <<<eod <script> $(function() { var img_option = "<?php echo $_GET['products_id']; ?>"; $("#input_1").change(function(){ var selectedImage = $(this).find(':selected').val(); val = $("#input_1 option:selected").text(); $("a.lb:first").html( "<img src=images/"+ img_option + "_" + selectedImage + ".jpg>"); $('a.lb:first img').addClass( "img-fluid" ); }); }); </script> eod; if (in_array(basename($_SERVER['PHP_SELF']), $this->safe_pages)) { $this->site_end .= '<!-- changeImage hooked -->' . PHP_EOL; $this->site_end .= $changeImageScript . PHP_EOL; return $this->site_end; } }
  23. burt

    Attribute Images

    Hard coded. Hook advice: make a product_info hook utilising the injectBodyEnd listener.
  24. hungryfrank

    Attribute Images

    like jquerry.php shop/sitewide/ and condition it for if php_self= product_info.php or maybe you can make a pi module. or header_tag module I think u can put it
  25. LeeFoster

    Attribute Images

    Yeah that's my preference but where to hook? Or do we need a new one?
  26. hungryfrank

    Attribute Images

    you have to put the script in a hook or module.
  1. Load more activity
×