Jump to content
thirty bees forum

wakabayashi

Trusted Members
  • Posts

    2,010
  • Joined

  • Last visited

  • Days Won

    167

wakabayashi last won the day on March 18

wakabayashi had the most liked content!

5 Followers

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

wakabayashi's Achievements

  1. Thanks a lot for this new feature! It will be very helpful. Something similair was on my ToDo list as well 😏 I will have break in early april. Afterwards I will update our system to new PHP version and will also upgrade again to bleeding edge. Then I can test it with my live site 🤩
  2. Good to know. The question is now, if this makes any sense for anyone. I really don't know why the core does this. The fact that you have issues and me too, makes this part of the code really dubious.
  3. It might be, that I got pissed by this issue too in the past. Cause I just checked my override and there I only check for this: if ($orderDetailList[$idOrderDetail]['quantity'] > 0) { if (Tools::isSubmit('reinjectQuantities')) { $this->reinjectQuantity($orderDetail, $orderDetailList[$idOrderDetail]['quantity'], false, Configuration::get('PS_STOCK_CUSTOMER_ORDER_REASON')); } } So basically I remove the hasBeenDelivered() function...
  4. Hard to say. I use this feature too, but with multiple overrides. The logic happens in AdminOrdersController.php -> postProcess() -> Tools::isSubmit('partialRefund') Also in AdminOrdersController there is function reinjectQuantity(), but IMO this should not even be called your case. if (!$order->hasBeenDelivered() || ($order->hasBeenDelivered() && Tools::isSubmit('reinjectQuantities')) && $orderDetailList[$idOrderDetail]['quantity'] > 0) { $this->reinjectQuantity($orderDetail, $orderDetailList[$idOrderDetail]['quantity']); } I would wonder, what your $order is returning on hasBeenDelivered(). Also the question is about which quantity you are talking. Are you using advanced stock management?
  5. Go also under modules->positions and check for this:
  6. I don't remember exactly, what I did. But for me it's working (css/js). How is your css file named? Is only one file loaded or multiple?
  7. I believe it's not possible to fill the APCu cache by a cronjob. This is a big drawback in my use case. I am trying to use redis now. Doesn't seem to be much more complex 😏
  8. I could solve it. In Plesk there are multiple settings. Some of them are globally on the server and some per domain. I had to adjust it in global settings 🥵
  9. I am working a lot with cronjobs, to not slow down my website when calling heavy processes. While this works solid, it's also getting a bit messy and I see that the core offers an ultra professional way of handling jobs. 😲 But there is not much documentation. @datakick Can you give me a short overview, how this is working and what be the simplest implentation to start with? This is, what I believe at the moment: I need to implement WorkQueueTaskCallable with one function execute(). When such a task is executed, an entry is saved to table 'ps_workqueue_task'. When I want to such a task to be executed I need to call createTask() There are schedulded tasks in addition, that trigger the WorkQueueTaskCallable in a certain frequency. Probably I have to implement InitializationCallback for that. If a scheduld task was startet it's saved to 'ps_schedulded_task_execution' table Not sure, if this is correct and probably there is much more. What I wonder: What does actually execute the whole process? Do I need only one cronjob, that somehow fires the schedulded task? Is the TriggerController doing this from time to time as well? But why so? Multiple cronjobs can to things parallel (at least, this is what I believe). Is this working queue the same or will one job be executed after the other? Let's say the packs quantity is updating some products, can I update on the same time currencies with a task (random example). My goal is to cache more resources. That for I need a clever way to rebuild the cache. Do only the minimum on the fly the rest should be handled behind. For example I wan't to cache the reviews of product/category pages. When someone posts a new product review, I need to rebuild multiple caches. This working queue system should be ideal for jobs like this, right?
  10. No, I was below 32M. My initial setup was: apc.shm_segments=1 apc.shm_size=512M Then I tried also with apc.shm_segments=3. But I am not totally sure, what it means. Does it mean 3x 512M or does it mean I have three "segments" with 512M/3? If I understand you right, I should just let the cache be filled and see what happens when I reach 32M right? Cause the 32M are the default value.
  11. I really like to work with APCu. But I noticed today, that already 20% of my cache was filled. Then I noted, that the system only uses 32M instead of my defined apc.shm_size=512M. Any idea, what could be the reason? I already tried to restart php and nginx server (that's why the full 32M are now available).
  12. Thanks a lot! @the.rampage.rado and @datakick. The topic "cache" is still puzzling me, but the longer I think about, the more sense it makes. Your answers helped me a lot to understand. Raising the following questions to myself, helped as well: how would the system know, that this content is always the same for each customer? how would it know, if the the content is the same for logged in, but differs for not logged in? how would it know that it's always the same content, after some actions by visitor or merchant in BO? You can ask hundreds such questions and the system just can't know the answer 🥴 So yeah, to make this cache globally would be a disaster. 😅 And now I also understand, why the full page cache was introduced. It makes a lot of sense in theory. But in pratice, it's kind of impossible for a merchant to set it up correctly. In general module devs should handle it. Good to know, that there is still a lot of room for improvements on my side 👍 I just learnt that in smarty we can use something like: {include 'sub_template.tpl' caching} Probably useful, if you include always the same content 🫠
  13. @datakick shouldn't the method Tools::enableCache() be called somewhere? I am not sure, if this is done correctly. echo $this->context->smarty->caching_type.'<br>'; echo (int)$this->context->smarty->caching.'<br>'; // returns ssc 0 I am pretty sure, that it's broken somehow. It doesn't even have todo with ssc. The file cache was the same. Now I just called myself Tools::enableCache(). And Tada: the array is filled with lots of tpl stuff 😅 👍 Edit: or is my understanding completly wrong and $this->isCached() needs to be called, so that any cache is happening? Cause I see modules calling it, but the core doesn't really. @the.rampage.rado how does your array looks like? Is there only module stuff inside or also theme stuff?
  14. Sure. I thought it must be my configuration, but I did a simple test: $query = new \DbQuery(); $query->select('*'); $query->from('product'); $query->limit(500); $result = \Db::getInstance()->ExecuteS($query); $cache = Cache::getInstance(); $cache->set('GENZO_TEST', $result, 6000); This is is now in the cache array. So the caching seems to work. I don't use multistore anymore. The Configuration Values seem to be correct. I haven't installed the module @the.rampage.rado has mentioned... I will make some further tests.
  15. I am playing around with APCu Cache in combo with smarty. How do I know, if it's working correctly? print_r(apcu_cache_info()); // it returns: Array ( [num_slots] => 4099 [ttl] => 0 [num_hits] => 0 [num_misses] => 0 [num_inserts] => 0 [num_entries] => 0 [expunges] => 0 [start_time] => 1733873009 [mem_size] => 0 [memory_type] => mmap [cache_list] => Array ( ) [deleted_list] => Array ( ) [slot_distribution] => Array ( ) ) This looks somehow wrong to me!? What does it mean in practice? Just using $smarty->fetch() is correct, right?
×
×
  • Create New...