-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PHP 8.1 compatiblity & Magento 2 tables update (utilities) #108
base: magento2
Are you sure you want to change the base?
Conversation
@@ -262,6 +262,8 @@ public function getRemoteFile($url, $dest, $authmode = null, $cookies = null) | |||
$context = $this->createContext($url); | |||
$ch = $context['curlhandle']; | |||
$dl_opts = $context['opts']['dl']; | |||
|
|||
$dest = str_replace("pub/pub", "pub", $dest); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is this change for?
@@ -482,13 +483,19 @@ public function copyImageFile($imgfile, &$item, $extra) | |||
// magento image value (relative to media catalog) | |||
$impath = "/$i1/$i2/$bimgfile"; | |||
// target directory; | |||
$l2d = "pub/media/catalog/product/$i1/$i2"; | |||
|
|||
if(!strstr(getcwd(), "pub")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add brackets around "if" body and
"else" body
@@ -38,7 +58,8 @@ public function runUtility() | |||
} | |||
|
|||
//clean url rewrites for products | |||
$sql = "DELETE FROM ".$this->tablename("core_url_rewrite")." WHERE product_id IS NOT NULL AND is_system=1"; | |||
//$sql = "DELETE FROM ".$this->tablename("core_url_rewrite")." WHERE product_id IS NOT NULL AND is_system=1"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove the comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the patch. please fix some nitpics
Apologies, it's been a while since I made that fix, but if memory serves
me right, it was because I experience great difficulties importing
remote images. For some reason $dest was always "pub/pub" instead of
just "pub" and even though the files got imported, they weren't being
created/written in the right path, i.e. pub/media/catalog/product/...
I am more than happy to fix it at source if you prefer, i.e. where
getRemoteFile() is being called (or higher up), but this fix seemed the
easiest/quickest, and safest.
Example of import csv:
"sku","type","name","url_key","description","short_description","categories","status","store","websites","attribute_set","retail_price","price","check_by_mail_price","ebay_auction_price","ebay_store_price","base
_price","real_time_base_price_formula","material_content","material_price","material_price_date","live_pricing","margin_percent","markup_percent","mule","currency_other","currency_fr_number","currency_denominati
on","currency_date_series","currency_type","currency_star","currency_error","currency_nbn_title","currency_nbn_city","currency_nbn_state","currency_nbn_ch","cc_material","cc_mintcode","is_ebay_item","is_collecto
rs_corner_item","upc","cost","qty","meta_keyword","is_in_stock","visibility","tax_class_id","manage_stock","use_config_manage_stock","notify_stock_qty","max_sale_qty","qty_increments","cd_certification","cc_cert
ificatenumber","grade","prefix_grade","cc_grade","cc_gradingservice","cd_denomination","cd_mintmark","cd_luster","cd_year","material","cd_condition","cd_eyeappeal","cd_cleaned","cd_strike","cd_description","is_b
argain_bin","manufacturer","image","small_image","thumbnail","media_gallery"
"BBDM13957","simple","1921-P Morgan Silver Dollar - ERROR Struck
Thru","1921-p-morgan-silver-dollar-error-struck-thru-bbdm13957","","","Coins
by Type/U.S. Dollars (1794-Present)/U.S. Morgan Dollars (1878-1904, 1
921)","1","default","base","COINSBARGAINBIN","47.00000","40.00000","39.00000","41.00000","41.00000","37.00000","","","","","0","45","81","","","","","","","","","","","","","Silver","P","1","1","","25.90000","1.
00000","1921-P, 247898, Do, Dollar, ERROR, Morgan, Silver, Struck,
Thru","1","Catalog,
Search","None","1","1","1","10000","1","","","","","","","Morgan Silver
Dollar","P","","1921","Silver","Circulated","","",""
,"","1","US Mint"*,"http://url.com/IMAGES/2-23 FEBRUARY/021 BARGAIN
BIN/011 DOLLARS/04 MORGAN/BBDM13957_1.PNG","http://url.com/IMAGES/2-23
FEBRUARY/021 BARGAIN BIN/011 DOLLAR**
**S/04 MORGAN/BBDM13957_1.PNG","http://url.com/IMAGES/2-23 FEBRUARY/021
BARGAIN BIN/011 DOLLARS/04
MORGAN/BBDM13957_1.PNG","http://url.com/IMAGES/2-23 FEBRUARY/021 BARGAIN
BIN**
**/011 DOLLARS/04 MORGAN/BBDM13957_2.PNG"*
magmi is installed in pub/magmi
the import file is in pub/import/import.csv
On 28/08/2023 03:31, Tymoteusz Motylewski wrote:
***@***.**** commented on this pull request.
------------------------------------------------------------------------
In magmi/inc/remotefilegetter.php
<#108 (comment)>:
> @@ -262,6 +262,8 @@ public function getRemoteFile($url, $dest, $authmode = null, $cookies = null)
$context = $this->createContext($url);
$ch = $context['curlhandle'];
$dl_opts = $context['opts']['dl'];
+
+ $dest = str_replace("pub/pub", "pub", $dest);
what is this change for?
—
Reply to this email directly, view it on GitHub
<#108 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABR3CEWUU74ZBXA6MWISWYTXXRCLNANCNFSM6AAAAAA362VSMU>.
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
Michael Mussulis
mobilePhone
+ 1 772 418 3463 <tel:+%201%20772%20418%203463>
emailAddress
***@***.*** ***@***.***>
website
https://www.linkedin.com/in/michaelmussulis/
<https://www.linkedin.com/in/michaelmussulis/>
|
Done.
On 28/08/2023 03:31, Tymoteusz Motylewski wrote:
***@***.**** commented on this pull request.
------------------------------------------------------------------------
In
magmi/plugins/extra/itemprocessors/imageprocessor/imageitattributeemprocessor.php
<#108 (comment)>:
> @@ -482,13 +483,19 @@ public function copyImageFile($imgfile, &$item, $extra)
// magento image value (relative to media catalog)
$impath = "/$i1/$i2/$bimgfile";
// target directory;
- $l2d = "pub/media/catalog/product/$i1/$i2";
+
+ if(!strstr(getcwd(), "pub"))
please add brackets around "if" body and
"else" body
—
Reply to this email directly, view it on GitHub
<#108 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABR3CETLPYFWOVLT6YPUW33XXRCORANCNFSM6AAAAAA362VSMU>.
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
Michael Mussulis
mobilePhone
+ 1 772 418 3463 <tel:+%201%20772%20418%203463>
emailAddress
***@***.*** ***@***.***>
website
https://www.linkedin.com/in/michaelmussulis/
<https://www.linkedin.com/in/michaelmussulis/>
|
Done.
On 28/08/2023 03:32, Tymoteusz Motylewski wrote:
***@***.**** commented on this pull request.
------------------------------------------------------------------------
In magmi/plugins/utilities/clearproducts/clearproduct.php
<#108 (comment)>:
> @@ -38,7 +58,8 @@ public function runUtility()
}
//clean url rewrites for products
- $sql = "DELETE FROM ".$this->tablename("core_url_rewrite")." WHERE product_id IS NOT NULL AND is_system=1";
+ //$sql = "DELETE FROM ".$this->tablename("core_url_rewrite")." WHERE product_id IS NOT NULL AND is_system=1";
please remove the comment
—
Reply to this email directly, view it on GitHub
<#108 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABR3CETEKFTJFVODUP56VHTXXRCRRANCNFSM6AAAAAA362VSMU>.
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
Michael Mussulis
mobilePhone
+ 1 772 418 3463 <tel:+%201%20772%20418%203463>
emailAddress
***@***.*** ***@***.***>
website
https://www.linkedin.com/in/michaelmussulis/
<https://www.linkedin.com/in/michaelmussulis/>
|
No problem. Done and pushed.
On 28/08/2023 03:33, Tymoteusz Motylewski wrote:
***@***.**** requested changes on this pull request.
thanks for the patch. please fix some nitpics
—
Reply to this email directly, view it on GitHub
<#108 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABR3CEWEKRG37INI7KDABQ3XXRCTPANCNFSM6AAAAAA362VSMU>.
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
Michael Mussulis
mobilePhone
+ 1 772 418 3463 <tel:+%201%20772%20418%203463>
emailAddress
***@***.*** ***@***.***>
website
https://www.linkedin.com/in/michaelmussulis/
<https://www.linkedin.com/in/michaelmussulis/>
|
there are plenty of error_log() calls, seems like they are a leftover from debugging? |
Yes, I did have lots of error_log() calls but I removed them when I did
committed. And I did 2 more commits after the first one. I just checked
again and I can see I missed some. I'll clean them up and commit.
On 08/09/2023 04:39, Tymoteusz Motylewski wrote:
there are plenty of error_log() calls, seems like they are a leftover
from debugging?
—
Reply to this email directly, view it on GitHub
<#108 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABR3CETTK5IK3MSID77TJ6DXZLKTNANCNFSM6AAAAAA362VSMU>.
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
Michael Mussulis
mobilePhone
+ 1 772 418 3463 <tel:+%201%20772%20418%203463>
emailAddress
***@***.*** ***@***.***>
website
https://www.linkedin.com/in/michaelmussulis/
<https://www.linkedin.com/in/michaelmussulis/>
|
Done. Please check now.
On 08/09/2023 04:39, Tymoteusz Motylewski wrote:
there are plenty of error_log() calls, seems like they are a leftover
from debugging?
—
Reply to this email directly, view it on GitHub
<#108 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABR3CETTK5IK3MSID77TJ6DXZLKTNANCNFSM6AAAAAA362VSMU>.
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
Michael Mussulis
mobilePhone
+ 1 772 418 3463 <tel:+%201%20772%20418%203463>
emailAddress
***@***.*** ***@***.***>
website
https://www.linkedin.com/in/michaelmussulis/
<https://www.linkedin.com/in/michaelmussulis/>
|
Fixed: