Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by Mikie

  1. Mikie

    Hanna Code

    That is actually part of what confused me. What that says is the opposite of my experience as outlined above, ie $page in the Hanna Code snippet wasn't scoped to the page with the hanna code.
  2. Mikie

    Hanna Code

    Just writing all that out made me wonder if render accepts more arguments, which it does: https://github.com/ryancramerdesign/ProcessHannaCode/blob/5801578889bad3786e951427e64f3bc2146d3ba4/TextformatterHannaCode.module#L230 Passing $p from example above as second argument works: echo $hanna->render($p->body, $p);
  3. Mikie

    Hanna Code

    Thanks @kongondo I saw that... when I try that from a script that is bootstrapping processwire the $page variable is not available in the Hanna code snippet. Eg when visiting "test.php" in site root in the browser the below setup results in "Title: 404 not found', the $page variable populated to the Hanna snippet appears to be the 404 resulting from visiting test.php. "body" field content on page /path/to/page/ [[title]] /site/assets/cache/HannaCode/title.php <?php $title = $page->title; echo "Title: $title"; /test.php <?php include "./index.php"; $hanna = wire("modules")->get('TextformatterHannaCode'); $p = wire("pages")->get("/path/to/page/"); echo $hanna->render($p->body);
  4. Mikie

    Hanna Code

    Hi apologies if I have missed this previously. Can hannacode work from the api? Specifically I am trying to render email body templates from pages via a cli script, and need access to the page data.
  5. Hi, If you want stock management double check your PadCart module settings. Allow Negative Stock needs to be unchecked and pad_quantity needs to be selected in the Quantity Field dropdown and added to your product and / or product variation templates. The cart page can be any page you want, the basic example would be create a "cart" template and then create a "Cart" page using that template. Follow step 4 here for rendering cart https://www.padloper.pw/documentation/installing-padloper/ and see this https://www.padloper.pw/documentation/making-it-ajax/ for more info around the cart. Hope that helps.
  6. Just dropping in to say thanks for this module! Saving me soooo much time on a current job. 👍
  7. As far as I remember ProDrafts got an update at some point to work with RepeaterMatrix. Could be wrong but I feel it was in a blog post. Edit: here's the post, with caveats about auto-save https://processwire.com/blog/posts/processwire-3.0.75-and-a-new-version-of-prodrafts/
  8. Will second https://www.11ty.dev/ as an awesome static site generator, really great product. For a list of lots of options check https://www.staticgen.com/ Gatsby isn’t really a pure static site generator, it’s more a framework for creating progressive single page app websites with react. It has a heavy reliance on graphql and can handle server side rendering like next / nuxt / sapper. It would actually be pretty overkill to use gatsby just for a completely static site (ie one that doesn’t use a database of any kind). The power of these frameworks is data is pulled in from one or more sources at build time which is used to programatically create pages / populate content. This data can come from the file system, from a csv file, but mostly it is stored in a cms. There are lots of “headless cms” out there (I like to think of these as more cms as a service) that you will read about being used with gatsby. The most promising of these in my opinion is https://www.sanity.io/ which is a pretty amazing product. However there is nothing stopping you from using PW for this. 11ty makes it super easy to grab data from anywhere to use at build time (unlike gatsby where it all has to be ported into its own graphql instance), and if you wanted you could have all your content stored in PW, create some json api endpoints manually or using a module like the graphql one, and use that data to build a flat HTML static site with 11ty that you host on netlify or zeit. Obviously this requires rebuilds when content changes, and doesn’t allow much interactivity, which is where the more complex feature set of gatsby comes in... server side rendering etc. Another project I am really digging at the moment which I think more meets the topic of this post is https://saber.land/ If you are into vue definitely check it out.
  9. Also check out http://devilbox.org/ its cross platform, mature and actively developed.
  10. Interested in updates on how deep any of you went with Shopify PW integration. Like: What were the edge cases? How did you deal with users and auth? Did you set up CRUD for products directly in PW admin directly? Just finished one Shopify site and starting work on another, OMG the content management outside products in Shopify is a complete and utter disaster. I am really reticent to build this new store as a shopify theme simply because of how broken Shopify content management is... even the upcoming sections everywhere architecture seems wrong to me in lots of ways. Here are some of the more interesting things I have found: https://github.com/sellfino/sellfino Self hosted open source App Store with a content builder app that from my research is the only shopify app anywhere that offers a flexible content field (a la Repeater Matrix). https://github.com/ctrl-alt-del-world/midway Gatsby stater for shopify + https://www.sanity.io. Sanity is an amazing product with very attractive pricing but I wouldn't touch Gatsby with a 10 inch pole. https://saleor.io Seems very mature and capable but the massive install freaked me out since I have never used Django nor python much besides writing my own little sublime plugins. I can't really tell if this is meant for smaller merchants or massive enterprises. https://github.com/panoply/shopify-sync If you are developing a shopify theme this is a great little node syncing library so you can drop themekit and run whatever build system you like. Works a treat.
  11. Ah thanks for the heads up @bernhard I never got to play with them all I thought at least one of them let you edit. Sorry for the red herring.
  12. Hey, no offense but your client sounds like a real punish. Here is a simple definition of a relational database pulled from the web: "A relational database organizes data into tables which can be linked—or related—based on data common to each". In PW each field gets its own table in the db, and each of these tables starts with a "pages_id" column (the primary key) that "relates" the data in a row to a specific page. This is by definition an example of following the relational model in database design. If you are seeing empty tables in the db, that is because you have fields that have no data associated with them. Perhaps try cleaning up some of your unused / redundant fields. It seems that some of @bernhard 's amazing Rock modules might help here. Have a look at the below, and check the post on the original RockGrid module (the precursor to RockTabulator) for examples of how it can be used:
  13. I haven’t read to deeply on this thread but just wanted to point out quickly that infinite scroll libraries lean towards leaving HTML page markup in place for seo reasons in that you most likely want those pages indexed like any other paginated content.
  14. Nice one Ryan. Looking forward to the new ProCache! Already one of the best modules out there, interested to see what is different.
  15. Hi @Andoro I don't believe Padloper 1 has a site profile unfortunately. Someone will correct me if I am wrong. Best bet is to follow the installation instructions here https://padloper.pw/documentation/installing-padloper/
  16. @DV-JF Kongongdo has outlined in his first post the billing / license structure will be similar to Ryan's pro modules, and that current Padloper users will get an upgrade discount on release. No mention of free upgrades however, and no way of knowing the actual pricing of upcoming Padloper version or when it will be released. Just my opinion but if you have experience with current Padloper seems like a no-brainer to me, you can charge the license cost on to your client for less than a month or two of shopify.
  17. Having built a semi complicated site with original Padloper, I have a few questions: 1. Customer Accounts: by this I mean something like WooCommerce's My Account, ie a user registration / login process and front end customer dashboard for editing account info, viewing order status etc. I bought this up a while back and it was determined this won't be part of Padloper. This is fine, but my question is how easily will Padloper integrate with Processwire users. For example a major problem with original Padloper was there was no direct way to manage different customer billing and shipping addresses... I had to hack the Padloper module files to do this which is obviously not ideal. A standard offering in all e-commerce platform is optional account creation and management. 2. Order status pages: following on from the above, will there be a concept similar to the Shopify "order status page"? This is a self contained url endpoint for an order that a customer can visit any time to track order delivery information. Generally this is linked to from order confirmation emails, so even if a user has checkout out as guest they can still visit a page to see delivery status updates. I am not sure if Shopify put this behind some kind of auth process, but doing so might be a nice touch. 3. Performance: WooCommerce is notorious for slowing down considerably with more than a few hundred products. Magento requires 1 cpu core per 2 simultaneous backend requests https://devdocs.magento.com/guides/v2.3/performance-best-practices/hardware.html 🔥💥!!!! Whilst I am sure this has been a consideration, I'm still interested in the performance characteristics of the new Padloper. Will we processwire devs need to get more familiar with solutions other projects use like Redis for object caching? Does it inherently benefit from being built on top of Processwire and thus scale easier? Hope this is all relevant and makes sense. Cheers! Edit: removed first question as I was confused about Stripes offering.
  18. Hi @DV-JF I would look into SnipWire for now. Original Padloper is essentially a dead project, and is complicated enough that the time spent trawling the forum for answers won't pay off your end.
  19. I have personally found errors related to imagick and pageimage.php to be misleading as the failure can happen at the server / imagick module level and can be due to issues with multi-threading. Are you in a multi-threaded (ie two or more cpu cores) environment and are the timeouts happening much faster than 30 seconds?
  20. Thanks @bernhard, didn't know about ProcessEmailToPage. Yup, extensions are pretty easy I've made a few for personal use, eg one for emulating a user scrolling a page to capture consistent videos of page scrolls. What you suggest is exactly what I thought, could distribute builds to each user with a unique token.
  21. Random question, but does anyone have any guidance or experience in alternate methods for posting content as an authenticated user. Basically as a personal covid-19 project I want to set up a site for my friends to post YouTube videos, but allow them to do so in the easiest / quickest possible way. Ideas I have had so far are: creating a custom browser extension that works with one click when on a YouTube url setting up a system whereby they can email a specific address with the YouTube url as the subject line Can't seem to find much info around these two scenarios or other automated posting methods in the forums. Would love some input!
  22. Mikie


    Hey @Wanze, would be good to be able to set default change frequency to null by default. See here for info from google rep: https://www.seroundtable.com/google-priority-change-frequency-xml-sitemap-20273.html
  23. Yeah I didnt even know about this until the replies here.
  24. In reply to the my post above, disabling automatic rendering in the Factory lets me render pages / templates however I want. Much more flexible imo, and solves my issue.
  • Create New...