integry / livecart

PHP e-commerce storefront software
http://livecart.com
Open Software License 3.0
18 stars 16 forks source link

1.4.0.2 Update problems #44

Open Iamdbat opened 12 years ago

Iamdbat commented 12 years ago

I could not upgrade via the modules and updates - that didn't work so I upgraded via the update file instead

I now Find that I cannot upload Product images - This is crucial so a quick fix to this would be much appreciated - When uploading in the back end the thumbnail doesn't show - Click on the thumbnail it will show but will not show in the store front end

also this issue isn't resolved in this bug fix release : http://qa.livecart.com/2/why-do-i-see-_your_account_shopping_cart_sign_out

integry commented 12 years ago

I'm not experiencing problems with this. If you could email me the access details to your server, I could take a look what's causing the issue.

Iamdbat commented 12 years ago

I've reverted back to 1.4.0.1 because I didn't think that you would reply so soon (of which I am very grateful) so I don't know whether I need to do the update again so you can see what's going on

I will send you server details via linked in

Also - would you be available for custom work anytime soon? if you can just give an idea of a timeframe so I can prepare a specification for you that makes sense

Thanks Gerry

-----Original Message----- From: Rinalds Uzkalns Sent: Wednesday, November 02, 2011 7:35 PM To: Iamdbat Subject: Re: [livecart] 1.4.0.2 Update problems (#44)

I'm not experiencing problems with this. If you could email me the access details to your server, I could take a look what's causing the issue.

Reply to this email directly or view it on GitHub: https://github.com/integry/livecart/issues/44#issuecomment-2608343

integry commented 12 years ago

Hi,

I'm setting up a classifieds module demo for you today, will send another email later. Apologies for the late reply, but I have been extremely busy with delivering two big projects that I have been working on lately. Now I'm a bit more free and could start accepting new work.

I'll take a look at your server later today as well.

Regards, Rinalds

On 11/02/2011 09:43 PM, Iamdbat wrote:

I've reverted back to 1.4.0.1 because I didn't think that you would reply so soon (of which I am very grateful) so I don't know whether I need to do the update again so you can see what's going on

Access details - username - sparepar / password / setanta - for cpanel

Also - would you be available for custom work anytime soon? if you can just give an idea of a timeframe so I can prepare a specification for you that makes sense

Thanks Gerry

-----Original Message----- From: Rinalds Uzkalns Sent: Wednesday, November 02, 2011 7:35 PM To: Iamdbat Subject: Re: [livecart] 1.4.0.2 Update problems (#44)

I'm not experiencing problems with this. If you could email me the access details to your server, I could take a look what's causing the issue.

Iamdbat commented 12 years ago

Fatal error: Cannot redeclare class ResultSet in /home/sparepar/public_html/shop/library/creole/ResultSet.php on line 53

Got this error trying to go into backend after reupgrading files - hope i didn't mess the whole thing up

Regards Gerry

-----Original Message----- From: Rinalds Uzkalns Sent: Wednesday, November 02, 2011 8:02 PM To: Iamdbat Subject: Re: [livecart] 1.4.0.2 Update problems (#44)

Hi,

I'm setting up a classifieds module demo for you today, will send another email later. Apologies for the late reply, but I have been extremely busy with delivering two big projects that I have been working on lately. Now I'm a bit more free and could start accepting new work.

I'll take a look at your server later today as well.

Regards, Rinalds

On 11/02/2011 09:43 PM, Iamdbat wrote:

I've reverted back to 1.4.0.1 because I didn't think that you would reply so soon (of which I am very grateful) so I don't know whether I need to do the update again so you can see what's going on

Access details - username - sparepar / password / setanta - for cpanel

Also - would you be available for custom work anytime soon? if you can just give an idea of a timeframe so I can prepare a specification for you that makes sense

Thanks Gerry

-----Original Message----- From: Rinalds Uzkalns Sent: Wednesday, November 02, 2011 7:35 PM To: Iamdbat Subject: Re: [livecart] 1.4.0.2 Update problems (#44)

I'm not experiencing problems with this. If you could email me the access details to your server, I could take a look what's causing the issue.

Reply to this email directly or view it on GitHub: https://github.com/integry/livecart/issues/44#issuecomment-2608717

Iamdbat commented 12 years ago

Cannot get into the admin same error shows

Fatal error: Cannot redeclare class ResultSet in /home/sparepar/public_html/shop/library/creole/ResultSet.php on line 53

integry commented 12 years ago

Hi,

It was necessary to remove the /library/creole directory as it has been moved to /library/activerecord/creole as of 1.4.0.1.

Everything seems to be working, including the image upload. I didn't yet manage to complete the module setup, hopefully the demo should be up tomorrow.

Regards, Rinalds

On 11/04/2011 01:16 AM, Iamdbat wrote:

Cannot get into the admin same error shows

Fatal error: Cannot redeclare class ResultSet in /home/sparepar/public_html/shop/library/creole/ResultSet.php on line 53


Reply to this email directly or view it on GitHub: https://github.com/integry/livecart/issues/44#issuecomment-2624676

Iamdbat commented 12 years ago

Thank you Thank you Thank You - I owe you a truck load of beer but the image upload still doesn't work - It just hangs there - tell me how to demonstrate an example or perhaps if I record the screen via you tube would that help in communicating the problem?

Once again I am so grateful for your input and time - I just don't know what to say

Regards Gerry

-----Original Message----- From: Rinalds Uzkalns Sent: Thursday, November 03, 2011 11:51 PM To: Iamdbat Subject: Re: [livecart] 1.4.0.2 Update problems (#44)

Hi,

It was necessary to remove the /library/creole directory as it has been moved to /library/activerecord/creole as of 1.4.0.1.

Everything seems to be working, including the image upload. I didn't yet manage to complete the module setup, hopefully the demo should be up tomorrow.

Regards, Rinalds

On 11/04/2011 01:16 AM, Iamdbat wrote:

Cannot get into the admin same error shows

Fatal error: Cannot redeclare class ResultSet in /home/sparepar/public_html/shop/library/creole/ResultSet.php on line 53


Reply to this email directly or view it on GitHub: https://github.com/integry/livecart/issues/44#issuecomment-2624676


Reply to this email directly or view it on GitHub: https://github.com/integry/livecart/issues/44#issuecomment-2625230

integry commented 12 years ago

Hi,

I just tried to upload an image again for the first product in the list and it worked fine. I see that there was an empty image already. Perhaps there's a problem in the image itself? Have you tried uploading other images?

Regards, Rinalds

On 11/04/2011 02:07 AM, Iamdbat wrote:

Thank you Thank you Thank You - I owe you a truck load of beer but the image upload still doesn't work - It just hangs there - tell me how to demonstrate an example or perhaps if I record the screen via you tube would that help in communicating the problem?

Once again I am so grateful for your input and time - I just don't know what to say

Regards Gerry

-----Original Message----- From: Rinalds Uzkalns Sent: Thursday, November 03, 2011 11:51 PM To: Iamdbat Subject: Re: [livecart] 1.4.0.2 Update problems (#44)

Hi,

It was necessary to remove the /library/creole directory as it has been moved to /library/activerecord/creole as of 1.4.0.1.

Everything seems to be working, including the image upload. I didn't yet manage to complete the module setup, hopefully the demo should be up tomorrow.

Regards, Rinalds

On 11/04/2011 01:16 AM, Iamdbat wrote:

Cannot get into the admin same error shows

Fatal error: Cannot redeclare class ResultSet in /home/sparepar/public_html/shop/library/creole/ResultSet.php on line 53


Reply to this email directly or view it on GitHub: https://github.com/integry/livecart/issues/44#issuecomment-2624676


Reply to this email directly or view it on GitHub: https://github.com/integry/livecart/issues/44#issuecomment-2625230


Reply to this email directly or view it on GitHub: https://github.com/integry/livecart/issues/44#issuecomment-2625695

Iamdbat commented 12 years ago

I actually have - tell me what steps you took because I have tried to do this with several products - I will try another now - OK - Picked a random product and tried to upload from pictures / product images in windows 7 as a secondary image - it just hangs ... could it be that the image extension is the problem ie jpg / gif etc?

PS - I'm creating a video via camtasia studio of some layout changes for custom work at the moment and hope to make it really simple for you to interpret what my requirements are - this will take me a few days I'm sure but its better than a textual explaination and then I will upload this to you tube via a private chanel and send you the link/s

Regards Gerry

-----Original Message----- From: Rinalds Uzkalns Sent: Friday, November 04, 2011 12:26 AM To: Iamdbat Subject: Re: [livecart] 1.4.0.2 Update problems (#44)

Hi,

I just tried to upload an image again for the first product in the list and it worked fine. I see that there was an empty image already. Perhaps there's a problem in the image itself? Have you tried uploading other images?

Regards, Rinalds

On 11/04/2011 02:07 AM, Iamdbat wrote:

Thank you Thank you Thank You - I owe you a truck load of beer but the image upload still doesn't work - It just hangs there - tell me how to demonstrate an example or perhaps if I record the screen via you tube would that help in communicating the problem?

Once again I am so grateful for your input and time - I just don't know what to say

Regards Gerry

-----Original Message----- From: Rinalds Uzkalns Sent: Thursday, November 03, 2011 11:51 PM To: Iamdbat Subject: Re: [livecart] 1.4.0.2 Update problems (#44)

Hi,

It was necessary to remove the /library/creole directory as it has been moved to /library/activerecord/creole as of 1.4.0.1.

Everything seems to be working, including the image upload. I didn't yet manage to complete the module setup, hopefully the demo should be up tomorrow.

Regards, Rinalds

On 11/04/2011 01:16 AM, Iamdbat wrote:

Cannot get into the admin same error shows

Fatal error: Cannot redeclare class ResultSet in /home/sparepar/public_html/shop/library/creole/ResultSet.php on line 53


Reply to this email directly or view it on GitHub: https://github.com/integry/livecart/issues/44#issuecomment-2624676


Reply to this email directly or view it on GitHub: https://github.com/integry/livecart/issues/44#issuecomment-2625230


Reply to this email directly or view it on GitHub: https://github.com/integry/livecart/issues/44#issuecomment-2625695


Reply to this email directly or view it on GitHub: https://github.com/integry/livecart/issues/44#issuecomment-2625802

Iamdbat commented 12 years ago

I would like to add a really efficient and fast Treeview representation of Categories - It can be done via css3 which works fantastic but there is a lot, no weeks of of work in that - can you think of the best solution here? Database calls take time and like the top menu I'm working on via a css only solution is definitely my preference - would you consider making a little separate application to do this? - I know that that is not a little task btw but it might pay you to give it a go in the near future and make Livecart 2 a force of nature

Regards Gerry

-----Original Message----- From: Rinalds Uzkalns Sent: Friday, November 04, 2011 12:26 AM To: Iamdbat Subject: Re: [livecart] 1.4.0.2 Update problems (#44)

Hi,

I just tried to upload an image again for the first product in the list and it worked fine. I see that there was an empty image already. Perhaps there's a problem in the image itself? Have you tried uploading other images?

Regards, Rinalds

On 11/04/2011 02:07 AM, Iamdbat wrote:

Thank you Thank you Thank You - I owe you a truck load of beer but the image upload still doesn't work - It just hangs there - tell me how to demonstrate an example or perhaps if I record the screen via you tube would that help in communicating the problem?

Once again I am so grateful for your input and time - I just don't know what to say

Regards Gerry

-----Original Message----- From: Rinalds Uzkalns Sent: Thursday, November 03, 2011 11:51 PM To: Iamdbat Subject: Re: [livecart] 1.4.0.2 Update problems (#44)

Hi,

It was necessary to remove the /library/creole directory as it has been moved to /library/activerecord/creole as of 1.4.0.1.

Everything seems to be working, including the image upload. I didn't yet manage to complete the module setup, hopefully the demo should be up tomorrow.

Regards, Rinalds

On 11/04/2011 01:16 AM, Iamdbat wrote:

Cannot get into the admin same error shows

Fatal error: Cannot redeclare class ResultSet in /home/sparepar/public_html/shop/library/creole/ResultSet.php on line 53


Reply to this email directly or view it on GitHub: https://github.com/integry/livecart/issues/44#issuecomment-2624676


Reply to this email directly or view it on GitHub: https://github.com/integry/livecart/issues/44#issuecomment-2625230


Reply to this email directly or view it on GitHub: https://github.com/integry/livecart/issues/44#issuecomment-2625695


Reply to this email directly or view it on GitHub: https://github.com/integry/livecart/issues/44#issuecomment-2625802

Iamdbat commented 12 years ago

http://www.youtube.com/watch?v=nqpdjwiqWdU

Here is a video showing the problem - private video

ilia2 commented 12 years ago

http://qa.livecart.com/114/image-upload-error-ver-1-4-0-2

ilia2 commented 12 years ago

After installing version 1.4.0.2 I have a problem with uploading photos. I installed a new clean version 1.4.0.2. with a new clean / empty / mSQL database. After entering a first product and push the button "add image". He began to think and not upload the picture.

The problem is found in file ImageDriverGD.php. Old version of the file /1.4.0.0/ works OK with livecart 1.4.0.2

Copy from old and paste in new: \library\image\ImageDriverGD.php

kitko commented 12 years ago

The problem is here in \library\image\ImageDriverGD.php:

private function save($type, $img, $path, $quality) { switch($type) { case IMAGETYPE_GIF: imagegif($img, $path); break; case IMAGETYPE_PNG: imagepng($img, $path); break; case IMAGETYPE_JPEG: default: imagejpeg($img, $newPath, $quality); <<<------ $newPath have to be $path break; } }

Iamdbat commented 12 years ago

THATS THERE AREADY!

<?php

require_once('ImageDriver.php'); class ImageDriverGD extends ImageDriver { public function resize(ImageManipulator $image, $newPath, $newWidth, $newHeight) { $path = $image->getImagePath(); $height = $image->getHeight(); $width = $image->getWidth();

    $this->setMemoryForImage($path);

    $newimg = $this->getGDImage($path);

    if($newimg)
    {
        // resize large images in two steps - first resample, then resize
        // http://lt.php.net/manual/en/function.imagecopyresampled.php
        if ($width > 1500 || $height > 1200)
        {
            list($width, $height) = $this->resample($newimg, $image, $width, $height, 1024, 768, 0);
        }

        $resized = $this->resample($newimg, $image, $width, $height, $newWidth, $newHeight);

        if(!is_dir(dirname($newPath)))
        {
            mkdir(dirname($newPath), 0777, true);
        }

        // simply copy images that do not need to be resized
        if (!$resized)
        {
            copy($path, $newPath);
            return true;
        }

        $this->save($image->getType(), $newimg, $newPath, $image->getQuality());

        imagedestroy($newimg);
        return true;
    }
    else
    {
        return false;
    }
}

private function getGDImage($path)
{
    $imageInfo = getimagesize($path);

    switch($imageInfo[2])
    {
        case IMAGETYPE_GIF:   return imagecreatefromgif($path); break;
        case IMAGETYPE_JPEG:  return imagecreatefromjpeg($path); break;
        case IMAGETYPE_PNG:   return imagecreatefrompng($path); break;
        default: throw new ApplicationException('Invalid image type: ' . $imageInfo[2]);
    }
}

public function getValidTypes()
{
    return array(1, /* GIF */
                 2, /* JPEG */
                 3  /* PNG */
                 );
}

public function watermark(ImageManipulator $image, $watermarkImage, $isLeft, $isTop, $marginX, $marginY)
{
    // Load the stamp and the photo to apply the watermark to
    $stamp = $this->getGDImage($watermarkImage);
    $im = $this->getGDImage($image->getPath());

    // Set the margins for the stamp and get the height/width of the stamp image
    $sx = imagesx($stamp);
    $sy = imagesy($stamp);

    $left = $isLeft ? $marginX : imagesx($im) - $sx - $marginX;
    $top = $isTop ? $marginY : imagesy($im) - $sy - $marginY;

    // Copy the stamp image onto our photo using the margin offsets and the photo
    // width to calculate positioning of the stamp.
    imagecopy($im, $stamp, $left, $top, 0, 0, $sx, $sy);

    // Output and free memory
    $this->save($image->getType(), $im, $image->getPath(), $image->getQuality());

    imagedestroy($im);
}

private function save($type, $img, $path, $quality)
{
    switch($type)
    {
        case IMAGETYPE_GIF: imagegif($img, $path); break;
        case IMAGETYPE_PNG: imagepng($img, $path);  break;
        case IMAGETYPE_JPEG:
        default:
            imagejpeg($img, $newPath, $quality);
        break;
    }
}

private function setMemoryForImage($filename)
{
    $imageInfo = getimagesize($filename);
    $MB = 1048576;
    $K64 = 65536;
    $TWEAKFACTOR = 4;
    $memoryLimitMB = 32;
    if (!isset($imageInfo['channels']))
    {
        $imageInfo['channels'] = 4;
    }
    $memoryNeeded = round( ( $imageInfo[0] * $imageInfo[1]
                                           * $imageInfo['bits']
                                           * $imageInfo['channels'] / 8
                             + $K64
                           ) * $TWEAKFACTOR
                         );

    //ini_get('memory_limit') only works if compiled with "--enable-memory-limit" also
    //Default memory limit is 8MB so well stick with that.
    //To find out what yours is, view your php.ini file.
    $memoryLimit = $memoryLimitMB * $MB;
    $newLimit = memory_get_usage() + $memoryNeeded;
    $currentLimit = substr(ini_get('memory_limit'), 0, -1);
    if (function_exists('memory_get_usage') && ($newLimit > $memoryLimit) && ($newLimit > $currentLimit) )
    {
        $newLimit = $memoryLimitMB + ceil( ( memory_get_usage()
                                            + $memoryNeeded
                                            - $memoryLimit
                                            ) / $MB
                                        );
        ini_set('memory_limit', $newLimit . 'M');
        return true;
    }
    else
    {
        return false;
    }
}

private function resample(&$img, ImageManipulator $source, $owdt, $ohgt, $maxwdt, $maxhgt, $quality = 1)
{
    // make sure the image doesn't get enlarged
    $maxwdt = min($maxwdt, $owdt);
    $maxhgt = min($maxhgt, $ohgt);

    if(!$maxwdt)
    {
        $divwdt = 1;
    }
    else
    {
        $divwdt = max(1, $owdt/$maxwdt);
    }

    if(!$maxhgt)
    {
        $divhgt = 1;
    }
    else
    {
        $divhgt = max(1, $ohgt/$maxhgt);
    }

    if($divwdt >= $divhgt)
    {
        $newwdt = round($owdt/$divwdt);
        $newhgt = round($ohgt/$divwdt);
    }
    else
    {
        $newhgt = round($ohgt/$divhgt);
        $newwdt = round($owdt/$divhgt);
    }

    // return same image if resizing is not necessary
    if (($newwdt == $owdt) && ($newhgt == $ohgt))
    {
        return false;
    }

    $tn = imagecreatetruecolor($newwdt, $newhgt);

    if (in_array($source->getType(), array(IMAGETYPE_GIF, IMAGETYPE_PNG)))
    {
        $trnprt_indx = imagecolortransparent($img);

        // If we have a specific transparent color
        if ($trnprt_indx >= 0)
        {
            // Get the original image's transparent color's RGB values
            $trnprt_color = imagecolorsforindex($img, $trnprt_indx);

            // Allocate the same color in the new image resource
            $trnprt_indx = imagecolorallocate($tn, $trnprt_color['red'], $trnprt_color['green'], $trnprt_color['blue']);

            // Completely fill the background of the new image with allocated color.
            imagefill($tn, 0, 0, $trnprt_indx);

            // Set the background color for new image to transparent
            imagecolortransparent($tn, $trnprt_indx);
        }

        // Always make a transparent background color for PNGs that don't have one allocated already
        elseif ($source->getType() == IMAGETYPE_PNG)
        {
            // Turn off transparency blending (temporarily)
            imagealphablending($tn, false);

            // Create a new transparent color for image
            $color = imagecolorallocatealpha($tn, 0, 0, 0, 127);

            // Completely fill the background of the new image with allocated color.
            imagefill($tn, 0, 0, $color);

            // Restore transparency blending
            imagesavealpha($tn, true);
        }
    }

    if ($quality)
    {
        imagecopyresampled($tn,$img,0,0,0,0,$newwdt,$newhgt,$owdt,$ohgt);
    }
    else
    {
        imagecopyresized($tn,$img,0,0,0,0,$newwdt,$newhgt,$owdt,$ohgt);
    }

    imagedestroy($img);

    $img = $tn;

    return array($newwdt, $newhgt);
}

}

?>

Iamdbat commented 12 years ago

Still doesn't work

kitko commented 12 years ago

on line with

imagejpeg($img, $newPath, $quality);

change $newPath to $path

Iamdbat commented 12 years ago

Did this - doesn't make any difference unless clearing the cache will - I'll try that

gags70 commented 12 years ago

Has this image problem gone away. Just installed the latest version, and it still seems to be there. I dont have an access to earlier versions of 1.4.0.0 version, so how can I get the old file to replace the new one. I have tried to change from "new path" to "path"- doesn't seem to work either. Can someone mail me the old version of the ....GD.php file, which I could use ?

Iamdbat commented 11 years ago

Hi Rinalds

Just dropping a line to let you know some of LC failings in some areas that you may look at if you get the time (if your not informed ... you can’t do anything about it so that’s my motive here)

1: Checkout Fails at the payment point when customers use SAFARI – Customers put in all the details including payment details only to be redirected back to nowhere after them making a payment which never shows as a new order – only an abandoned shopping cart in the back end – I have had quite a lot of these and I can’t help wondering could these sales have been captured – when I say quite a lot – I mean an uncomfortable amount of potential lost sales

2: I have quite a lot of payments from customers whereby they put in their debit / credit card info and because the cart suggests an expiry date by default they skip this part only to have me call them to say that their card will not be processed because the information is incorrect – usually the expiry date is skipped over as it is already filled in! – This is something that could be improved

3: Shipping is an enigma – I just don’t understand how to do it right – maybe I’m stupid but instruction on screen in the admin would be brilliant – maybe you can have a look at this – I would like to offer shipping estimates via .... I’m going top call it stuff for now because I’m too tired to explain – but it is very hard to understand in LC

Just a few lines of encouragement

I know you haven’t got the reward from LC that you rightfully deserve – but I would suggest that you don’t give up – LC in my humble opinion is THE best cart that is out there architecturally speaking – you can’t get / pay or download better – you have got a worldwide niche that no other cart or developer / developer company actually has the savvy to see and your are definitely a great and powerful OZ

You have and still have loyal supporters but I realize the workload is overwhelming – just don’t give up on it

I have tried loads of carts

Magento / Opencart / Zencart / OCCommerce / CSCart / ahhhhhh ..... loads more but none of them come close to LC

Here is an idea ... instead of selling modules – what if – all modules were ‘built in’ to LC in the core and just need to be ‘turned on’ for a fee? – would that be an efficient way of doing things?

I suppose I’m talking nonsense

Best Regards Gerry