opencart / opencart

A free shopping cart system. OpenCart is an open source PHP-based online e-commerce solution.
https://www.opencart.com/
Other
7.41k stars 4.82k forks source link

Extension already installed! - How to upgrade extension to new version if we can't upload #11673

Open padaliyajay opened 1 year ago

padaliyajay commented 1 year ago

What version of OpenCart are you reporting this for? Opencart 4

Describe the bug If extension was already installed before and if new version available then i can't upload same named file again. if you upload then get error "Extension already installed".

To Reproduce Steps to reproduce the behavior:

  1. Go to 'Extension -> installer'
  2. Click on 'Upload button'
  3. See error

Expected behavior It should be accept file and overwrite existing extension files so we can update extension to new version

danielkerr commented 1 year ago

uninstall and delete

danielkerr commented 1 year ago

then reinstall. i will try to come up with a quick fix before next release.

padaliyajay commented 1 year ago

ok but this is not right way because if we uninstall extension then it will also remove it database.

So it should be. 1). upload file 2). if already installed then delete existing extension files and add new files 3). change extension version in oc_extension_install table and reset file path in oc_extension_path

danielkerr commented 1 year ago

i did have it so it would not delete but then caused other issues., ill add a upgrqade method befofe the next release.

padaliyajay commented 1 year ago

Thanks daniel for your attention on this problem.

BuslikDrev commented 1 year ago

i did have it so it would not delete but then caused other issues., ill add a upgrqade method befofe the next release.

Do a version check.

In install.json opencart.ocmod.zip the error is an extra comma.