Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

message stack?


Recommended Posts

I added the following code to upload.php so I could catch large files (over 1400px max width or height) but the message stack is not displaying any messages.


The code is working, but I am not getting my error message. I can put "die('some message')" in but then all info about new product can/will be lost.

here is the code;


  $size = getimagesize($this->file['tmp_name']);
  if ($size[0] > MAX_PRODUCT_IMAGE_WIDTH || $size[1] > MAX_PRODUCT_IMAGE_HEIGHT) {
    if ($this->message_location == 'direct') {
	  $messageStack->add(ERROR_FILE_TO_LARGE, 'error');
    } else {
	  $messageStack->add_session(ERROR_FILE_TO_LARGE, 'error');
    return false;

Link to comment
Share on other sites

I know this is brutally obvious, but did you add the definition of "ERROR_FILE_TO_LARGE" to the appropriate language file? I ask because that's my usual fail mode for things like this.


[you decide]


-- Trying to figure it out, just like everyone else --

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...