Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/07/2018 in all areas

  1. Chiming in just to wish you lots of luck with the project @kongondo! Better late than never, right? I'm very curious about the result of your hard work ?
    3 points
  2. I think if they exist as image variations they have to be rebuilt.
    1 point
  3. @benbyf To save myself from the headaches, I only use scrapers anymore. No sandboxed accounts, no setup, no invalidated keys every two weeks. instagram-php-scraper has been working great so far. This is all there is to getting recent media of any user id or name: $userid = env('INSTAGRAM_USER_ID'); $instagram = new \InstagramScraper\Instagram(); $account = $instagram->getAccountById($userid); $username = $account->getUsername(); $latestMedia = $instagram->getMedias($username, 10); foreach ($latestMedia as $media) { if ($media->getType() === 'image') { [...] } }
    1 point
  4. Ok, I probably messed up a few times, but to give an idea of how it could be done (not tested, maybe not the fastest nor the most beautiful code): <?php // Get all the blog posts with blog_post_fav and blog_post_favs unchecked $pageArrayToPrepend = $pages->find("template=blog-post, blog_post_fav=0, blog_post_favs=0, blog_post_sticky!=1"); // Add all posts with blog_post_fav checked without the 1st one $pageArrayToPrepend->add($pages->find("template=blog-post, blog_post_fav=1, blog_post_sticky!=1, sort=-blog_date")->slice(1)); // Add all posts with blog_post_favs checked without the 1st two items $pageArrayToPrepend->add($pages->find("template=blog-post, blog_post_favs=1, blog_post_sticky!=1, sort=-blog_date")->slice(2)); // Remove duplicates $pageArrayToPrepend = $pageArrayToPrepend->unique(); // Sort and limit $pageArrayToPrepend->filter("sort=-blog_date, limit=" . $blogSettings->blog_quantity)); // Prepend $cards (is there anything in $cards, maybe this is useless variable?) $cards->prepend($pageArrayToPrepend); $pages->find returns a PageArray which inherits WireArray with a bunch of useful properties. Read here https://processwire.com/api/ref/wire-array/
    1 point
  5. 1 point
  6. Welcome to the forums @MateThemes Yes. It is here. I quote: You can set up shipping by postcodes, states/provinces, countries or continents. All these are just sub-divisions of the same thing :-). A group of postcodes make a city, a group of cities a state, a group of states countries and a group of countries continents :-). Padloper will not have something like 'what type of shipping zone do you want to create?' Instead, you create the zone and throw in the countries or provinces (optionally delimited by postcodes) you want. If you want a European Union zone, throw in the countries that make up the Union in that zone and the applicable shipping rates. If you want a zone for South America, throw in the countries that make up that continent. If you want zones for Middle, Far and Near East, specify the respective countries for those regions. Please note that it is not an all or nothing system. If you don't want Brazil in your South America zone, then don't include it in the zone but instead create a different zone for it, unless of course you don't ship to Brazil, in which case, just exclude it entirely. Hope this answers your question.
    1 point
  7. https://processwire.com/api/ref/wire-array/get-random/
    1 point
  8. That seems to be the issue - it seems one of my recent attempts to clean things up broke this part. I'll try to get it fixed soon. Thanks for all your testing of this module - it hasn't had any love for a long time and I have never actually used it with repeaters so it certainly needs it ?
    1 point
  9. I test it on a new page and getting the same problem. Having "Rename on Save" unchecked everything seems to be ok. Are you sure that it's working for you with multiple repeater items and with "Rename on Save" checked?
    1 point
  10. All these days I was testing only with already uploaded images. I will test from scratch and will let you know. I thought that this could the problem but it isn't. On the filename format I tried even with just the word "test" and when I was saving the page only some of them were renamed and when I saved again and again more and more images were getting renamed to "test".
    1 point
  11. None of the above is the problem. It seems that the module doesn't work well with repeaters. I tried to add new item on the repeater that is supposed to be working properly and it messed up that too. When I upload the image on the repeater item and saved the page the image gets renamed but I get just a broken blank image. In the files folder I'm getting the following images: test_1544143931.-thumbnail.0x48n.jpg (Broken / blank) test_1544143931.-thumbnail.300x0n.jpg (Broken / blank) This shouldn't be even there yet as I'm generating this variation via API and I didn't visit the frontend page during the test. test_1544143934.260x0.jpg test_1544143934.jpg test_1544143934.-thumbnail.0x48n.jpg test_1544143934.-thumbnail.jpg Also if I try to delete that broken image from the image field that is inside the repeater item I'm getting this:
    1 point
  12. I have a repeater field with 12 repeater items and each item has an image field too. I've added the related rename rule on the module but when I save the page it only renames the top 3 items. I'm using the latest version (1.1.5). EDIT: On another repeater with 5 repeater items everything is working properly. The only difference between those 2 repeaters is that the one with the 12 items is on a hidden page without a template file and it has svg images.
    1 point
  13. Are you sure your hook gets triggered? Always proceed step by step. I usually start with a hook that only outputs "triggered" via tracy: bd("triggered!"); If you don't see the dump in the tracy bar, your hook does not fire and you have something else wrong (and that's the case here). Try this one and then update the inner code: $wire->addHookAfter('Pages::saveReady(template=product)', function($event) { $page = $event->arguments(0); // your logic here bd("hook fired!"); }); To update your field you don't need "setAndSave", just set your field's value like this: $page->yourfield = 'yourvalue'; That's it ?
    1 point
  14. What @LostKobrakai said. :-). I don't think this is something Padloper should handle. If prices need to be adjusted, we have Hooks for such things. Alternatively, you could add custom price fields to the product template and use those instead, following some logic. So, this is up to the dev. On a side note, I'm not sure I get the rationale of adjusting a product's price based on a customer's location. Shipping, yes, but not the actual product price. Is it because of exchange rates? Aren't those handled by the merchants? I'll consider these when we get to that stage, thanks. My initial estimates was 6 months from when I got started (please see first post). I can't promise that though; it could even be shorter! Thanks for the interest.
    1 point
  15. You need to go to your language id folder in site/assets/ and delete the .phrase-index.txt file. I don't think so. The issue is still opened and @ryan will be notified.
    1 point
  16. ..., and you should enable the IMagick Imagesizer Engine if your server supports it! (under PW 3) ..., and additionally to the quality-value, you can try out differend sharpening values (none, soft, medium, strong)
    1 point
  17. By default PHP's bundled GD 2 library is used. If you're using a recent ProcessWire 3 version, ImageMagick is also supported (if you can have it installed on your server of course). Perhaps you could have better results. https://processwire.com/blog/posts/processwire-3.0.10-expands-image-resize-options/ NB: in /wire/config.php you can also see some settings, copy them to /site/config.php and modify them...
    1 point
  18. What's up is that the size() method accepts a 'quality' setting in its $options array: https://processwire.com/api/ref/pageimage/size/ And you can define the default quality setting used for the image sizer in /site/config.php via $config->imageSizerOptions: https://processwire.com/api/ref/config/
    1 point
  19. Just a note to all MODx'ers - I think this is a nice way to transfer some snippets/chunks to ProcessWire as well if people want to go down that route and have some they used to use in body text. Obviously it's not quite the same thing (potentially more powerful depending on your needs), but anything that helps make a transition easier is good in my book Very useful, powerful module ryan!
    1 point
×
×
  • Create New...