Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
457 commits
Select commit Hold shift + click to select a range
f9f6702
Merge pull request #100 from GiritInteractive/v1.9.0
Apr 4, 2019
6ae3469
v1.9.0: Product Gallery - splitted transformations & publicId
Apr 4, 2019
3d2fc13
Merge pull request #101 from GiritInteractive/v1.9.0
Apr 4, 2019
6b741fc
v1.9.0,CLOUDINARY-119,CLOUDINARY-120,CLOUDINARY-122,CLOUDINARY-124: S…
Apr 10, 2019
502fbce
v1.9.0,CLOUDINARY-123: Updated system.xml texts
Apr 10, 2019
f6ec4c9
Merge pull request #102 from GiritInteractive/v1.9.0
Apr 10, 2019
4ee8bf1
CLOUDINARY-102: Replaced array_merge_recursive() with array_replace_r…
Apr 14, 2019
3d878cb
Merge pull request #103 from GiritInteractive/v1.9.0
Apr 14, 2019
a1b0d9d
v1.9.0: Small fix on system.xml
Apr 21, 2019
8683ce7
Merge pull request #104 from GiritInteractive/v1.9.0
Apr 21, 2019
aabf0ec
v1.9.0: Added support for global default free transform on product-ga…
Apr 21, 2019
4ea07a3
Merge pull request #105 from GiritInteractive/v1.9.0
Apr 21, 2019
14d9411
Disabled browser autofill on system config
Apr 24, 2019
436ed79
Merge pull request #106 from GiritInteractive/v1.9.0
Apr 24, 2019
66c4f72
Disabled browser autofill on system config
Apr 24, 2019
c01391f
Merge pull request #107 from GiritInteractive/v1.9.0
Apr 24, 2019
f2adee1
Merge pull request #24 from cloudinary/v1.9.0
Apr 30, 2019
ae26cfd
CLOUDINARY-134: Fixed Magento 2.3.1 issue on wysiwyg from GH issue #29
Jul 3, 2019
3132f7d
Merge pull request #108 from GiritInteractive/v1.9.1
Jul 3, 2019
e091de7
Merge pull request #30 from cloudinary/v1.9.1
Jul 3, 2019
a2fd15b
CLOUDINARY-143: Fixed issue When installing the M2 module the error: …
Jul 8, 2019
be90fcf
CLOUDINARY-133: Fixed issue Cloudinary 1.9.0 incompatible with Magent…
Jul 8, 2019
878d784
CLOUDINARY-144: Fixed GH issues #26 and #27 Magento 2.3.x compatible …
Jul 8, 2019
09590b2
v1.9.2
Jul 8, 2019
6e72156
Merge pull request #109 from GiritInteractive/v1.9.2
Jul 8, 2019
e612f53
Merge pull request #31 from cloudinary/v1.9.2
Jul 9, 2019
3c5aff3
CLOUDINARY-143: Fixed issue When installing the M2 module the error: …
Jul 11, 2019
08d07c4
Merge pull request #110 from GiritInteractive/v1.9.3
Jul 11, 2019
34cdcf6
Merge pull request #32 from cloudinary/v1.9.3
Jul 11, 2019
3cbfdb7
CLOUDINARY-143: Fixed issue When installing the M2 module the error: …
Jul 14, 2019
a29bd85
Merge pull request #33 from cloudinary/v1.9.3
Jul 14, 2019
10e5a0a
Merge pull request #111 from GiritInteractive/v1.9.3
Jul 14, 2019
8953228
v1.9.4
Jul 14, 2019
316e6b4
Merge pull request #34 from cloudinary/v1.9.4
Jul 14, 2019
a8a5c33
Merge pull request #112 from GiritInteractive/v1.9.4
Jul 14, 2019
7b1fd4a
v1.9.5: Fixed Magento 2.2 compilation issue: Class Magento\Framework\…
Jul 14, 2019
2f7c309
v1.9.5: Fixed Magento 2.2 compilation issue: Class Magento\Framework\…
Jul 14, 2019
33bc61a
Merge pull request #113 from GiritInteractive/v1.9.5
Jul 14, 2019
9377114
v1.9.5: Fixed Magento 2.2 compilation issue: Class Magento\Framework\…
Jul 14, 2019
8c15e00
Merge pull request #114 from GiritInteractive/v1.9.5
Jul 14, 2019
9cc8c87
v1.9.5: Fixed Magento 2.2 compilation issue: Class Magento\Framework\…
Jul 15, 2019
311bb4e
Merge pull request #115 from GiritInteractive/v1.9.5
Jul 15, 2019
046b039
Merge pull request #35 from cloudinary/v1.9.5
Jul 16, 2019
5dcd28b
v1.9.6: Filtered out CLD videos with a different cloud names from the…
Jul 17, 2019
b7d25b9
Merge pull request #116 from GiritInteractive/v1.9.6
Jul 17, 2019
484fde9
Merge pull request #36 from cloudinary/v1.9.6
Jul 17, 2019
06a234f
v1.9.7: Added email-validation to 'Automatic login' configuration fie…
Jul 25, 2019
826e538
v1.9.7: CLOUDINARY-172: Fixed global transformations preview, overrid…
Jul 28, 2019
a18cf17
v1.9.7: CLOUDINARY-171: Fixed issue on product videos from CLD when t…
Jul 29, 2019
137b471
v1.9.7: CLOUDINARY-171: Fixed issue on product videos from CLD when t…
Jul 31, 2019
5bb77ba
v1.9.7: CLOUDINARY-171: Fixed issue on product videos from CLD when t…
Jul 31, 2019
afcde86
Merge pull request #37 from cloudinary/v1.9.7
Aug 4, 2019
d55622f
CLOUDINARY-185: Fixed transformations parsing (regex) on media-librar…
Aug 18, 2019
16f9afd
CLOUDINARY-183: Changed getMigratedPath() to always add the media dir…
Aug 20, 2019
9b760f5
v1.9.9: Excluded cloudinary external JS scripts from Magento minifica…
Sep 2, 2019
9c2f9d0
v1.9.8: Change version to 1.9.8
Sep 2, 2019
bf2b10c
Applied magento-coding-standards
Sep 2, 2019
8c5a490
v1.9.8: CLOUDINARY-184: Added alert on media-library errors.
Sep 4, 2019
fdc1d48
Merge pull request #38 from cloudinary/v1.9.8
Sep 12, 2019
34854de
CLOUDINARY-204: Replaced Magento\Framework\Validator\ValidatorInterfa…
Sep 18, 2019
b828f23
Merge pull request #40 from cloudinary/v1.9.9
Sep 18, 2019
4d3aac6
CLOUDINARY-207: Added backward compatibility workarounds for M2.1 on …
Sep 23, 2019
6c57b9d
replaced the CASTING constant with property on ProductGalleryHelper
Sep 23, 2019
3c29c81
Merge pull request #41 from cloudinary/v1.10.0
Sep 23, 2019
0f7dcb8
CLOUDINARY-208: Replaced the CASTING constant with property on Produc…
Sep 23, 2019
c586356
Merge pull request #42 from cloudinary/v1.10.0
Sep 23, 2019
bdb3555
CLOUDINARY-212: ProductGalley - changed 'lightbox' to 'popup'
Oct 10, 2019
2ab7ae9
CLOUDINARY-213: Improved backward compatibility workarounds for M2.1 …
Oct 15, 2019
1446635
Merge pull request #43 from cloudinary/v1.10.1
Oct 23, 2019
097f061
CLOUDINARY-210: Added API endpoints for adding CLD Urls to product ga…
Oct 24, 2019
acddf36
CLOUDINARY-210: Changed version to 1.10.2
Oct 24, 2019
0e4e504
CLOUDINARY-210: Added API endpoints for adding CLD Urls to product ga…
Oct 31, 2019
223306b
CLOUDINARY-210: Added API endpoints for adding CLD Urls to product ga…
Oct 31, 2019
b02fb53
CLOUDINARY-222: Added cloudinary/products/:sku/media endpoint to Clou…
Nov 7, 2019
b414cd8
CLOUDINARY-215: Send identification when loading the ML widget
Nov 7, 2019
a045dde
CLOUDINARY-221: Map ML/API assets to their original CLD publicID
Nov 13, 2019
9d3890c
CLOUDINARY-221: Changed texts on system configurations
Nov 20, 2019
8742ad3
Merge pull request #46 from cloudinary/v1.10.3
Nov 21, 2019
efc6cac
CLOUDINARY-224: replaced getDispersionPath() with getDispretionPath()…
Nov 21, 2019
d9810d2
Merge pull request #47 from cloudinary/v1.10.4
Nov 21, 2019
046a35a
CLOUDINARY-224: replaced getDispersionPath() with getDispretionPath()…
Nov 21, 2019
e51f0ad
Merge pull request #48 from cloudinary/v1.10.4
Nov 21, 2019
b55d63e
v1.10.5: Added support for CLD URLs (images & videos) on Magento imports
Dec 8, 2019
dc436c3
v1.10.5: Improved support for roles on ProductGallery API
Dec 23, 2019
e042bb4
CLOUDINARY-240: Fixed Cloudinary icon on Store Configuration
Jan 8, 2020
e15f9d6
Merge pull request #51 from cloudinary/v1.10.5
Jan 16, 2020
de8cef6
v1.10.6: Minor fix for CodeSniffer test
Jan 26, 2020
660ef8a
Merge pull request #52 from cloudinary/v1.10.6
Jan 26, 2020
8e7e349
mend
Jan 26, 2020
69ac956
Merge pull request #53 from cloudinary/v1.10.6
Jan 26, 2020
79132b4
v1.10.6: Minor fix for CodeSniffer test
Jan 26, 2020
560556d
Merge pull request #54 from cloudinary/v1.10.6
Jan 26, 2020
0009070
Updated Readme
Jan 30, 2020
14a48bc
Merge pull request #55 from cloudinary/updateReadme
Jan 30, 2020
594a7c9
v1.11.0: Added a new Lazyload feature
Feb 13, 2020
8b48fda
v1.11.1: Restricted auto sync on media upload to allowed images
Mar 19, 2020
64b396e
v1.11.1: Added extenstion to publicId on product gallery
Mar 19, 2020
ef5b185
Changed version to v1.11.1
Mar 19, 2020
e134573
v1.11.0: Changed comment text on lazy-load settings
Mar 22, 2020
e93bbac
v1.11.1: Added label and disabled support to ProductGalleryManagement…
Mar 25, 2020
02da255
v1.11.1: Added module version to system configuration area
Mar 25, 2020
b4db282
Merge pull request #59 from cloudinary/v1.11.1
Apr 12, 2020
a8caf91
v1.11.1.1: Replaced md5() with hash(sha256) in order to meat marketpl…
Apr 23, 2020
7bda14c
Merge pull request #60 from cloudinary/v1.11.1.1
Apr 23, 2020
52e9938
v1.11.1.1: Replaced md5() with hash(sha256) in order to meat marketpl…
Apr 23, 2020
d91dad7
Merge pull request #61 from cloudinary/v1.11.1.1
Apr 23, 2020
2068c48
v1.11.2: Replaced md5() with hash(sha256) in order to meat marketplac…
Apr 23, 2020
846d41e
Merge branch 'master' into v1.11.2
Apr 23, 2020
59ca092
Merge pull request #62 from cloudinary/v1.11.2
Apr 23, 2020
eaa0a28
v1.11.2: Replaced echo() usage with short php tags
Apr 23, 2020
57d01ae
v1.11.2: removed return type :string from class method
Apr 23, 2020
25e82fb
Merge pull request #63 from cloudinary/v1.11.2
Apr 23, 2020
75e8b7d
v1.11.3,CLOUDINARY-273: Fixed depracation error on _urlBuilder->addSe…
May 11, 2020
1d2311c
Merge pull request #64 from cloudinary/v1.11.3
May 11, 2020
0b877d2
v1.12.0,CLOUDINARY-269: Improved product-gallery-api - now supports b…
May 11, 2020
06d6acf
v1.12.0,CLOUDINARY-269: fixes on ProductGalleryApiQueue process
May 14, 2020
ee6f770
v1.12.0,CLOUDINARY-269: fixes on ProductGalleryApiQueue process
May 14, 2020
e7efe99
v1.12.0,CLOUDINARY-270: Added CSP whitelist
May 14, 2020
8399260
v1.12.0: Change version to 1.12.0
May 17, 2020
9ed2cd6
v1.12.0: Changed CSP to restrict mode
May 17, 2020
e749700
v1.13.0,CLOUDINARY-261: Add support for spinset asset types - step 1
May 17, 2020
ae5dc36
v1.13.0,CLOUDINARY-261: Adding spinset support to PGW
May 20, 2020
86e9cca
v1.13.0,CLOUDINARY-276: Added preg_quote to parseCloudinaryUrl()
May 20, 2020
fabbb93
v1.13.0,CLOUDINARY-261: Adding spinset support to PGW
May 20, 2020
4bc4836
v1.13.0,CLOUDINARY-261: Adding spinset support to PGW
May 20, 2020
d76d15e
CLOUDINARY-277: Changed texts on system.xml
May 24, 2020
84488e9
v1.12.0: Fixed set limit on ProductGalleryApiQueue
May 24, 2020
ce91e96
CLOUDINARY-277
May 24, 2020
c939648
CLOUDINARY-277
May 24, 2020
1926554
CLOUDINARY-277
May 24, 2020
4b4352f
CLOUDINARY-277
May 24, 2020
fb932fd
v1.13.0: Updated CSP whitelist
May 27, 2020
f1491c3
v1.13.0: minor fix on product-gallery plugin
May 31, 2020
b7bad3d
Update fotorama-add-video-events.js
sanganinamrata Jun 1, 2020
d70d2cc
v1.13.0,CLOUDINARY-276: Increased max filename size to 180 on Uploade…
Jun 1, 2020
a015820
v1.13.0,CLOUDINARY-257: Removed extension from publicId on PGW for vi…
Jun 3, 2020
aaf42fe
v1.13.0,CLOUDINARY-281: Allow addig product videos without file exten…
Jun 7, 2020
51b53f8
v1.13.0,CLOUDINARY-261: Added UI for adding spinsets to product gallery
Jun 14, 2020
9d8f863
v1.13.0: spinset minor fixes
Jun 21, 2020
2aad5f2
v1.13.0: csp whitelist update
Jun 21, 2020
fdd33d8
v1.13.0: csp whitelist update
Jun 21, 2020
4671e2f
CLOUDINARY-261: minor changes on spinset
Jun 24, 2020
8b4de7a
v1.13.0: Minor changes on spinset popup design
Jul 5, 2020
d569a5c
v1.13.0: Added CLD spinset support to the product-gallery API
Jul 8, 2020
db5310b
v1.13.0: Improved system.xml for product-gallery
Jul 8, 2020
3018728
Merge pull request #68 from cloudinary/v1.13.0
Jul 27, 2020
b3ec3ce
v1.13.0: fixed typo
Jul 29, 2020
8b4ae1b
Merge pull request #69 from cloudinary/v1.13.0
Jul 29, 2020
24ecd26
Merge pull request #1 from cloudinary/master
ankurvr Aug 10, 2020
4c547a0
Simplified merging of component default options and user defined options
ankurvr Aug 10, 2020
6c94458
CLOUDINARY-275: Added page-builder support to allow CLD videos & pick…
Jul 20, 2020
e423ba1
v1.14.0: fixed a typo
Aug 12, 2020
a1b8b91
v1.14.0: very minor coding standards changes
Aug 12, 2020
edb54f2
v1.14.1: Adjustments for Magento 2.4 with backward compatibility
Aug 19, 2020
7e3da02
v1.14.1: Adjustments for Magento 2.4 with backward compatibility
Aug 19, 2020
5856a1f
v1.14.1: Adjustments for Magento 2.4 with backward compatibility
Aug 19, 2020
3fb0146
v1.14.1: Adjustments for Magento 2.4 with backward compatibility
Aug 19, 2020
6fff172
v1.14.1: Fixed a typo on ProductGalleryManagement API
Aug 20, 2020
0e0194f
Merge pull request #73 from cloudinary/v1.14.1
Sep 6, 2020
4fa6f32
ankurvr-ankurvr-patch-1: fixed conflicts
Sep 17, 2020
3bf8d69
Merge branch 'ankurvr-ankurvr-patch-1' into v1.14.2
Sep 17, 2020
dbd545b
Merge pull request #65 from sanganinamrata/patch-1
Sep 17, 2020
d7f5508
Fixed a typo in BatchUploader.php notes
Sep 17, 2020
873cf09
v1.14.2: changed CSP whitelist
Oct 4, 2020
326f075
Merge pull request #74 from cloudinary/v1.14.2
Oct 4, 2020
4e73982
v1.14.3: changed CSP whitelist
Oct 5, 2020
682ccb6
Merge pull request #75 from cloudinary/v1.14.3
Oct 5, 2020
11a5e58
v1.14.4: Updated CSP whitelist
Oct 7, 2020
abb3aae
Merge pull request #76 from cloudinary/v1.14.4
Oct 7, 2020
dac5f65
Merge pull request #2 from cloudinary/master
ankurvr Dec 18, 2020
b91940e
Handled 'no_selection' image when there are no image in product to sh…
ankurvr Dec 18, 2020
46860a0
Merge pull request #77 from ankurvr/ankurvr-patch-no_selection
Jan 11, 2021
0a924d3
v1.14.5: Updated CSP whitelist
Jan 11, 2021
cbf8552
v1.14.5: Fixed ImageHelper plugin
Jan 20, 2021
0f66d7e
v1.14.6: Fixed cloudinary_php SKD version
Feb 11, 2021
712e9ea
Merge pull request #81 from cloudinary/v1.14.6
Feb 11, 2021
15b9944
v1.14.6: Fixed cloudinary_php SKD version
Feb 11, 2021
4f2b7ba
Merge pull request #82 from cloudinary/v1.14.6
Feb 11, 2021
3dd121f
v1.14.7: Improved symlinked media dir support on manual upload migration
Feb 25, 2021
ea03c19
v1.14.7: Wrapped cleanConfigCache() with try-catch on Configuration o…
Feb 25, 2021
32f3e9d
v1.14.7: Allowed manual sync from CLI withot enabling CLD
Mar 1, 2021
c503948
Merge pull request #85 from cloudinary/v1.14.7
Mar 1, 2021
acf870a
v1.14.8: Added CLD-ENV-VAR header to productGallery API and fixed pat…
Mar 8, 2021
ee15c12
v1.14.8: Moved appConfig->reinit() under try{} on config observer
Mar 18, 2021
0592673
v1.14.8: Added enabled condition to plugins and synchronization process
Mar 22, 2021
1818c82
v1.14.8: Wrapped more cache cleans with try-catch
Apr 1, 2021
dd970f9
v1.14.8:CLOUDINARY-314: Fixed deprecation error on ApiClient.php
Apr 4, 2021
1d4d7aa
v1.14.8: Removed try catch from programatically cache-clears
Apr 4, 2021
60032b1
v1.14.8,CLOUDINARY-318: Fix error on CLI when installing with Magento
Apr 5, 2021
fd0e1dc
v1.14.8: Added url encode & regex escape to ML and video scripts in o…
Apr 5, 2021
fe21383
v1.14.8: Added a fallback for missing video thumbnail
Apr 25, 2021
bef17b3
v1.14.8: Fixed empty ajaxUrl on product free transformations form
Apr 26, 2021
494ed3b
v1.14.8: Added a fallback for missing video thumbnail [FIX]
Apr 26, 2021
2c6680c
Merge pull request #86 from cloudinary/v1.14.8
Apr 28, 2021
c2d39ce
v1.14.8: minor fix
Apr 28, 2021
75ca002
v1.14.8: minor fix
Apr 28, 2021
916ffc6
Merge pull request #88 from cloudinary/v1.14.8
Apr 28, 2021
6aadeea
v1.14.8: minor fix
Apr 28, 2021
d5c34a0
Merge pull request #89 from cloudinary/v1.14.8
Apr 28, 2021
8069fa8
v1.14.9: Queries optimization for synchronization table
May 9, 2021
b300712
v1.14.9: Added registry cache to SynchronizationChecker
May 10, 2021
4ff0035
v1.14.9: Added registry cache to SynchronizationChecker
May 10, 2021
1021bcc
v1.14.9: Queries optimization for synchronization table
May 10, 2021
17bb87d
v1.14.9: Added registry cache to transformation queries
May 10, 2021
7085d89
v1.14.9: Removed registry cache from transformation queries - needs i…
May 10, 2021
576d216
v1.14.9: Added registry cache to transformation queries
May 10, 2021
4197855
Merge pull request #90 from cloudinary/v1.14.9
May 10, 2021
5a97ad7
v1.14.9: Removed registry cache from transformation queries - needs i…
May 10, 2021
cd23e6f
Merge pull request #91 from cloudinary/v1.14.9
May 10, 2021
9bbf32b
v1.14.9: Fixed an issue on BulkUpload
May 11, 2021
9c6ae51
Merge pull request #92 from cloudinary/v1.14.9
May 11, 2021
14e2113
v1.14.10: Added jpeg to ImageRepository (for BulkUpload)
May 13, 2021
1808085
Merge pull request #93 from cloudinary/v1.14.10
May 13, 2021
bbcccab
v1.14.11: Added registry cache on free transformation in order to red…
May 19, 2021
8f61236
Merge pull request #94 from cloudinary/v1.14.11
May 20, 2021
5f5106d
v1.14.12: Removed AutomaticLoginUser
Jun 2, 2021
ea3c2cf
v1.14.13: Added API endpoints for getting product CLD media URLs
Jun 9, 2021
2d74305
v1.14.13: Added a note to the product gallery configuration
Jun 9, 2021
be2f817
Merge pull request #96 from cloudinary/v1.14.13
Jun 17, 2021
c8adf00
v1.14.13: Added a note to the product gallery configuration
Jun 9, 2021
9e55f92
Merge branch 'master' into v1.14.13
Jun 27, 2021
526d519
Merge pull request #97 from cloudinary/v1.14.13
Jun 27, 2021
7f69819
v1.15.1: Bumped version to 1.15.1
Jun 30, 2021
4f83fa4
Merge pull request #98 from cloudinary/v1.15.1
Jun 30, 2021
ec7b515
v1.15.2: Added default image global transformation
Jul 7, 2021
ea9e82e
v1.15.2: Fixed import error when the CSV has multiple CLD video URLs
Jul 8, 2021
858be21
Merge pull request #99 from cloudinary/v1.15.2
Jul 12, 2021
b497be3
v1.15.3,CLOUDINARY-329: Trigger auto-upload dir mapping using a butto…
Jul 25, 2021
1a23509
Bumped version to 1.16.0
Aug 1, 2021
8ee2420
Merge pull request #101 from cloudinary/v1.16.0
Aug 1, 2021
b0a392b
v1.17.0: Improved URL encoding on JS video thumbnail generation
Aug 12, 2021
b3e260d
Bounced version to 1.16.1 [hotfix for JS encoding on video thumbnail …
Sep 13, 2021
5b52107
Merge pull request #104 from cloudinary/v1.16.1
Sep 13, 2021
84733e9
v1.17.0,CLOUDINARY-332: Added analytics param to PG asset URLs
Aug 5, 2021
35f597b
v1.17.0: Updated CLD Logos
Aug 12, 2021
d8c224e
v1.17.0:CLOUDINARY-209: Allow applying products-global transformation
Sep 9, 2021
9c91124
v1.17.0:CLOUDINARY-209: Allow applying products-global transformation
Sep 9, 2021
efe12c4
CLOUDINARY-347: Fix for Transformations keep_frame is not working (GH…
pniel-cohen Oct 4, 2021
0dccae7
add: GraphQL support for query Cld images
mayashavin Dec 8, 2021
9478bed
CLOUDINARY-332: Added analytics query param to all CLD URLs
pniel-cohen Dec 7, 2021
6f54a7e
MAG-431,CLOUDINARY-356: Added a note to the auto-upload-mapping confi…
pniel-cohen Dec 9, 2021
9a877ef
MAG-773,CLOUDINARY-358: Fixed video URL validation on page-builder to…
pniel-cohen Dec 9, 2021
f866985
Merge pull request #108 from mayashavin/master
Dec 13, 2021
23b75ca
MAG-777: Improved URL encoding-decoding on admin JS
pniel-cohen Dec 16, 2021
167c4fb
MAG-777: Updated js parts for get-video-information after Magento cor…
pniel-cohen Dec 19, 2021
5001a8a
Merge pull request #106 from cloudinary/v1.17.0
Jan 10, 2022
1c53997
working graphql, broken rest
zerbfra Feb 16, 2022
d48be19
working rest and graphql
zerbfra Feb 16, 2022
13173ba
working cloudinary images
zerbfra Feb 16, 2022
2d45dd8
fix get all images
zerbfra Feb 16, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions Api/ProductGalleryManagementInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<?php

namespace Cloudinary\Cloudinary\Api;

interface ProductGalleryManagementInterface
{

/**
* [!] DEPRECATED, please use addProductMedia() instead.
* Add product gallery item from Cloudinary URL.
* @method addItem
* @param string $url
* @param string $sku
* @param string|null $publicId
* @param string|null $roles
* @param string|null $label
* @param bool|int|null $disabled
* @param string $cldspinset
* @return string
*/
public function addItem($url = null, $sku = null, $publicId = null, $roles = null, $label = null, $disabled = 0, $cldspinset = null);

/**
* Add multiple gallery items to one or more products from Cloudinary URLs.
* @method addItems
* @param mixed $items
* @return string
*/
public function addItems($items);

/**
* Add product gallery items from Cloudinary URLs.
* @method addItem
* @param string $sku
* @param mixed $urls
* @return string
*/
public function addProductMedia($sku, $urls);

/**
* Get product gallery items as Cloudinary URLs.
* @method getProductMedia
* @param string $sku
* @return string
*/
public function getProductMedia($sku);

/**
* Get product gallery items.
* @method getProductMedia
* @param string $sku
* @return string
*/
public function getProductMediaData($sku);

/**
* Get products gallery items as Cloudinary URLs.
* @method getProductsMedia
* @param mixed $skus
* @return string
*/
public function getProductsMedia($skus);
}
9 changes: 9 additions & 0 deletions Api/ResourcesManagementInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,22 @@ interface ResourcesManagementInterface

/**
* GET for getImage api
*
* @return string
*/
public function getImage();

/**
* GET for getVideo api
*
* @return string
*/
public function getVideo();

/**
* GET for getSpinestFirstImage api
*
* @return string
*/
public function getResourcesByTag();
}
4 changes: 2 additions & 2 deletions Api/SynchronisationRepositoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
interface SynchronisationRepositoryInterface
{
/**
* @param SearchCriteriaInterface $searchCriteria
* @param SearchCriteriaInterface $searchCriteria
* @return SearchResultsInterface
*/
public function getList(SearchCriteriaInterface $searchCriteria);

/**
* @param string $imagePath
* @param string $imagePath
*
* @return SearchResultsInterface
*/
Expand Down
85 changes: 85 additions & 0 deletions Block/Adminhtml/Cms/Wysiwyg/Images/Content.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
<?php

namespace Cloudinary\Cloudinary\Block\Adminhtml\Cms\Wysiwyg\Images;

use Cloudinary\Cloudinary\Helper\MediaLibraryHelper;
use Magento\Backend\Block\Widget\Context;
use Magento\Framework\Json\EncoderInterface;

/**
* Wysiwyg Images content block
*
* @api
* @since 100.0.2
*/
class Content extends \Magento\Cms\Block\Adminhtml\Wysiwyg\Images\Content
{
/**
* MediaLibraryHelper
* @var array|null
*/
protected $mediaLibraryHelper;

/**
* @param Context $context
* @param EncoderInterface $jsonEncoder
* @param MediaLibraryHelper $mediaLibraryHelper
* @param array $data
*/
public function __construct(
Context $context,
EncoderInterface $jsonEncoder,
MediaLibraryHelper $mediaLibraryHelper,
array $data = []
) {
parent::__construct($context, $jsonEncoder, $data);
$this->mediaLibraryHelper = $mediaLibraryHelper;
}

/**
* Get Cloudinary media library widget options
*
* @param bool $multiple Allow multiple
* @param bool $refresh Refresh options
* @return string
*/
public function getCloudinaryMediaLibraryWidgetOptions($multiple = false, $refresh = false)
{
if (!($cloudinaryMLoptions = $this->mediaLibraryHelper->getCloudinaryMLOptions($multiple, $refresh))) {
return null;
}

try {
//Try to add session param on Magento versions prior to 2.3.5
$imageUploadUrl = $this->_urlBuilder->addSessionParam()->getUrl('cloudinary/cms_wysiwyg_images/upload', ['type' => $this->_getMediaType()]);
} catch (\Exception $e) {
//Catch deprecation error on Magento 2.3.5 and above
$imageUploadUrl = $this->_urlBuilder->getUrl('cloudinary/cms_wysiwyg_images/upload', ['type' => $this->_getMediaType()]);
}

return $this->_jsonEncoder->encode(
[
'cldMLid' => 'wysiwyg_media_gallery',
'imageUploaderUrl' => $imageUploadUrl,
'triggerSelector' => '.media-gallery-modal',
'triggerEvent' => 'fileuploaddone',
'cloudinaryMLoptions' => $cloudinaryMLoptions,
'addTmpExtension' => false,
'cloudinaryMLshowOptions' => $this->mediaLibraryHelper->getCloudinaryMLshowOptions("image"),
]
);
}

/**
* Return current media type based on request or data
*
* @return string
*/
protected function _getMediaType()
{
if ($this->hasData('media_type')) {
return $this->_getData('media_type');
}
return $this->getRequest()->getParam('type');
}
}
8 changes: 4 additions & 4 deletions Block/Adminhtml/Form/Field/Free.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ class Free extends Field
private $model;

/**
* @param Context $context
* @param Context $context
* @param ConfigurationInterface $configuration
* @param FreeBackendModel $model
* @param array $data
* @param FreeBackendModel $model
* @param array $data
*/
public function __construct(
Context $context,
Expand All @@ -48,7 +48,7 @@ protected function _beforeToHtml()
}

/**
* @param AbstractElement $element
* @param AbstractElement $element
* @return string
*/
protected function _getElementHtml(AbstractElement $element)
Expand Down
83 changes: 67 additions & 16 deletions Block/Adminhtml/Product/Edit/NewVideo.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,37 +5,65 @@
*/
namespace Cloudinary\Cloudinary\Block\Adminhtml\Product\Edit;

use Cloudinary\Cloudinary\Core\ConfigurationBuilder;
use Cloudinary\Cloudinary\Core\ConfigurationInterface;
use Magento\Backend\Block\Template\Context;
use Magento\Framework\Data\FormFactory;
use Magento\Framework\Json\EncoderInterface;
use Magento\Framework\Registry;
use Magento\Framework\UrlInterface;
use Magento\ProductVideo\Helper\Media;

/**
* @SuppressWarnings(PHPMD.DepthOfInheritance)
*/
class NewVideo extends \Magento\ProductVideo\Block\Adminhtml\Product\Edit\NewVideo
{
/**
* @var array|null
*/
protected $_cloudinaryConfig;

/**
* @var \Cloudinary\Cloudinary\Core\ConfigurationBuilder
* @var ConfigurationInterface
*/
private $configuration;

/**
* @var ConfigurationBuilder
*/
protected $_cloudinaryConfigurationBuilder;

/**
* @param \Magento\Backend\Block\Template\Context $context
* @param \Magento\Framework\Registry $registry
* @param \Magento\Framework\Data\FormFactory $formFactory
* @param \Magento\ProductVideo\Helper\Media $mediaHelper
* @param \Magento\Framework\Json\EncoderInterface $jsonEncoder
* @param \Cloudinary\Cloudinary\Core\ConfigurationBuilder $cloudinaryConfigurationBuilder
* @param array $data
* @method __construct
* @param Context $context
* @param Registry $registry
* @param FormFactory $formFactory
* @param Media $mediaHelper
* @param EncoderInterface $jsonEncoder
* @param ConfigurationInterface $configuration
* @param ConfigurationBuilder $cloudinaryConfigurationBuilder
* @param array $data
*/
public function __construct(
\Magento\Backend\Block\Template\Context $context,
\Magento\Framework\Registry $registry,
\Magento\Framework\Data\FormFactory $formFactory,
\Magento\ProductVideo\Helper\Media $mediaHelper,
\Magento\Framework\Json\EncoderInterface $jsonEncoder,
\Cloudinary\Cloudinary\Core\ConfigurationBuilder $cloudinaryConfigurationBuilder,
Context $context,
Registry $registry,
FormFactory $formFactory,
Media $mediaHelper,
EncoderInterface $jsonEncoder,
ConfigurationInterface $configuration,
ConfigurationBuilder $cloudinaryConfigurationBuilder,
array $data = []
) {
parent::__construct($context, $registry, $formFactory, $mediaHelper, $jsonEncoder, $data);
parent::__construct(
$context,
$registry,
$formFactory,
$mediaHelper,
$jsonEncoder,
$data
);
$this->configuration = $configuration;
$this->_cloudinaryConfigurationBuilder = $cloudinaryConfigurationBuilder;
}

Expand All @@ -49,6 +77,7 @@ protected function getCloudinaryConfig()
$this->_cloudinaryConfig['api_url'] = "https://api.cloudinary.com/v1_1/{$this->_cloudinaryConfig['cloud_name']}/";
}
}

return $this->_cloudinaryConfig;
}

Expand All @@ -66,7 +95,7 @@ public function getWidgetOptions()
'htmlId' => $this->getHtmlId(),
'youTubeApiKey' => $this->mediaHelper->getYouTubeApiKey(),
'videoSelector' => $this->videoSelector,
'cloudinaryPlaceholder' => $this->getViewFileUrl('Cloudinary_Cloudinary::images/cloudinary_logo_for_white_bg.jpg')
'cloudinaryPlaceholder' => $this->getPlaceholderUrl(),
]
);
}
Expand All @@ -85,11 +114,13 @@ protected function getNoteVideoUrl()
} else {
$result .= __(', YouTube');
}

if (!$this->getCloudinaryConfig()) {
$messages .= __('<br>*To add Cloudinary video, please <a href="%1">enter your Cloudinary Account Credentials</a> first.', $this->getCloudinaryConfigUrl());
} else {
$result .= __(', Cloudinary');
}

return $result . $messages;
}

Expand All @@ -107,4 +138,24 @@ protected function getCloudinaryConfigUrl()
]
);
}

/**
* @return string
*/
protected function getPlaceholderUrl()
{
$storeManager = $this->configuration->getStoreManager();
$configPaths = [
'catalog/placeholder/image_placeholder',
'catalog/placeholder/small_image_placeholder',
'catalog/placeholder/thumbnail_placeholder',
];
foreach ($configPaths as $configPath) {
if (($path = $storeManager->getStore()->getConfig($configPath))) {
return $storeManager->getStore()->getBaseUrl(UrlInterface::URL_TYPE_MEDIA) . 'catalog/product/placeholder/' . $path;
break;
}
}
return $this->getViewFileUrl('Cloudinary_Cloudinary::images/cloudinary_cloud_glyph_blue.png');
}
}
Loading