-
Posts
2,027 -
Joined
-
Last visited
-
Days Won
175
Content Type
Profiles
Forums
Gallery
Downloads
Articles
Store
Blogs
Everything posted by wakabayashi
-
@datakick I am bit surprised how many function we have about getting ImageTypes and Image Link. It seems to me, that this is often about guessing, how an image type could be named. Multiple times we even search for something like '_default'. Why is this needed? I had the idea to use ImageTypes in a different way. There are a few thoughts: A theme designer always knows the image_type name (he has no problem to generate a link) A core dev and module dev don't know the images types for sure. (they might have a problem) BUT: always when you want to get an image_type it's actually about sizing (correct me if this is wrong?). So why don't we create a function getImageTypeBySize($min_height, $min_width), that does return the best existing/matching image_type. Of course we could then even improve this by something getImageLinkBySize(). Couldn't we drop then all the "guessing" like: Link::getProductImageUri() Link::getProductDefaultImageUri() ImageType::resolveImageTypeNameWithoutCache() These things are actually not totally related to image extension, but it's quite complicated to cleanup files at some points. It's very hard to forseen, what happens if you replace a hardcoded '.jpg' with something like $imageExtension that could be everything.
-
@the.rampage.rado Btw can you tell me more about the Warehouse usage of jpg? How and where are this images be loaded? Is this in a tpl file and '.jpg' is hardcoded?
-
That's what the fallback mechanism is good for. Sure I will hold them too. The question is in which Extension we should hold them. At the moment it's forced to be always jpg. I don't like that. I guess it's best to hold the format, that was uploaded.
-
I plan to really simplify things (get rid of some code). Some questions arise in this context... The idea is, that you select one image format and that all generated files (thumbnails) are saved in this format. Should it be possible to hold original files in the original file format? Let's say you use webp, but upload a png. Should the original file always be converted in webp or should it be possible to hold it as png? The later makes things more complex and bit slower. Which formats should we allow to upload in BO? jpg, gif, png and webp? Which formats should be allowed for thumbnails. jpg and webp for sure, but png as well? Edit: Also I hope that we can get a more consistent wording. The word "type" is used for at least 3 different things. It can mean entityType (product), imageType (cart_default) or imageExtension (jpg). It makes hard, to read the code like this.
-
Project of consistent webp support (and image cleanup in general) started: https://github.com/eschiendorfer/thirtybees/tree/cleanWebpSupport Help by another dev is welcomed π
-
All purchase_supplier_price in order_detail table wrong!?
wakabayashi replied to wakabayashi's topic in English
Ok I have submitted a PR https://github.com/thirtybees/thirtybees/pull/1623. This will allow the usage of fixed fees for carriers. It will also save the costs to the DB. Which means, that your old order profits don't change, if you change your costs config values π -
Da hast du vΓΆllig Recht. TB ist in vielen Dingen funktionsstark, aber das geht auf Kosten der Einfachheit. Da kΓΆnnte man viel herausholen.
-
What is the advantage of it? You can also just install a new theme π
-
Error when try to checkout and pay after update to 1.4
wakabayashi replied to Havouza's topic in English
Oh sorry. I was not aware of such a functionality in core π΅ -
Error when try to checkout and pay after update to 1.4
wakabayashi replied to Havouza's topic in English
You give no information at all how this technically worked... Won't be possible to give any sensible answer. Is it a module? Is it handled on php, javascript or smarty? Core Updater can delete additional files. Even files, that were added manually by yourself but were placed in a core folder. Maybe it's related to a missing or old file. But ok that's just wild guessing from my side. -
Tonight I had the brilliant (not) idea, to look a bit into it. Looks like quite a huge project. But something confused me π€¨ @datakick Are you already working on a consistent image/webp support? I found this: https://github.com/thirtybees/thirtybees/commit/6334306227ee5df399d4b1576d536fc4c3457dec Isn't this the fallback mechanism you were talking about?
-
All purchase_supplier_price in order_detail table wrong!?
wakabayashi replied to wakabayashi's topic in English
Does this tool anything special or is "just" about getting the earning per order correct? -
How easy would it be to implement Cloudflare Turnstile free Captcha?
wakabayashi replied to ukclearance's topic in Modules
Yeah, I know that. But that is with all current modules the same, isnt it? I mean I could implement customController rules. Like https://github.com/Pixel-Open/prestashop-cloudflare-turnstile does. I have thought now a bit about it. IMO a perfect solution would be like this: We implement a new Subclass CaptchaModule (similar to PaymentModule or so). The core and any third party module call a hookRegisterFormCaptcha($controllerName, $submitName). The merchants goes to AdminMetaController and selects all wished forms, that that have been registered in step 2. All active forms (selected in step 3) are handled by the Captcha Module (like my module does it). Do you like this idea? Or is it overcomplicate? IMO this would allow a merchant to install ONE captcha module and he can handle all his forms. If all captcha can work like mine, no override is involved. I see only advantages, but I might be wrong π -
All purchase_supplier_price in order_detail table wrong!?
wakabayashi replied to wakabayashi's topic in English
Who of you is using this configuration? My goal is to set up all costs of an order correctly. Then calculate the net earning and display it on orderpage. Basically this is, what orderprofit stats tries to do. But this stat is not designed correctly. For having consistent numbers, we would have to save per order costs in the tables. Also we shipping fees need to have an absolute costs value (as payment fees already has). If there is interest in the community, I can implement this in the core. If not, maybe I will just do it in own of my modules π -
How easy would it be to implement Cloudflare Turnstile free Captcha?
wakabayashi replied to ukclearance's topic in Modules
Great π While it sounds like it, IMO that's not really true. I have added to the AuthController now, which took me 30 seconds and it seems to work: https://github.com/eschiendorfer/genzo_turnstile/blob/master/genzo_turnstile.php#L167-L173 In general this approach is so simple, that I am not sure, if we really need a new sepecific hook. Actually that hook would be tied very closely βΊοΈ If you have a few free minutes, maybe you can evaluate, if nocaptcharecaptcha module would work with my approach to. I personally will switch to cloudflare... @ukclearance My module is open source: https://github.com/eschiendorfer/genzo_turnstile/. Only thing missing is actually the settings on which controller you want to use the captcha. The rest is working for me. Maybe you can check it out!? -
Using space in Theme Name breaks down generated thumbnails
wakabayashi replied to vallka's question in Bug Reports
This is aksing for a lot of trouble. Spacing in webfolders is never a good idea... Just go for "niaragel"... or "niara-gel" is probably also working. -
Do you know that this project is dead tomorrow, if datakicks or smile "have enough"? Your behaviour is very disrespectful and without any reason. Datakick does merge a huge amount of PR in a fast manner. You seem to have no idea, what it means to lead this project...
-
I wouldn't conclude that. I don't think a lot of merchants are using this at login.
-
How easy would it be to implement Cloudflare Turnstile free Captcha?
wakabayashi replied to ukclearance's topic in Modules
I coded in the night and it looks promising. I believe, that I found a solution for contact form, that needs no override and no file changes at all. Is there any need for something else than contact form? But I am little confused, how complex the ps-module and the nocaptcharecaptcha are working. @datakick My approach is like this: Register hookActionFrontControllerSetMedia (Hint: I am missing a hook like actionFrontControllerInit) Check if controller is instanceOf ContactController If yes, check if Tools::isSubmit('submitMessage') is true If yes, validate captcha If NOT valide I just unset($_POST[$submitToCheck]); Looks quite simple to me. Do you see any problem with it? -
How easy would it be to implement Cloudflare Turnstile free Captcha?
wakabayashi replied to ukclearance's topic in Modules
Interesting! I will look into it, cause I also don't like google too much anymore. I will try to get rid off all their tools (which have direct access on my site)... -
All purchase_supplier_price in order_detail table wrong!?
wakabayashi replied to wakabayashi's topic in English
This is no big problem IMO. You just have to divide original_wholesale_price/o.conversion_rate and not the sum. First taking the sum is even mathematically wrong, isnt it!? π I mean there is not a single static conversion_rate. It changes every day π€ We are on the same page π I will update my PR. -
All purchase_supplier_price in order_detail table wrong!?
wakabayashi replied to wakabayashi's topic in English
PR is out https://github.com/thirtybees/thirtybees/pull/1598 π