-
Posts
6,638 -
Joined
-
Last visited
-
Days Won
360
Everything posted by bernhard
-
Error: Exception: Method RockFrontend::styles does not exist...
bernhard replied to neophron's topic in RockPageBuilder
Hey @neophron thx for the update. You have old ->styles() and ->scripts() calls in that file that you have to remove. I tried to explain what to do and the reason for the breaking change as good as I can here: https://www.baumrock.com/en/processwire/modules/rockfrontend/docs/asset-tools/ I'm also updating the rockfrontend site profile that you can use for inspiration. Does that help? -
Error: Exception: Method RockFrontend::styles does not exist...
bernhard replied to neophron's topic in RockPageBuilder
Hey @neophron sorry for the trouble. But no reason to be desperate - I'm here to help and this one will be quite easy to fix 🙂 Background: Unfortunately I had to introduce a breaking change with how assets are managed and injected. In the old version I relied on RockFrontend's styles() and scripts() methods to inject styles/scripts into the frontend. The new version leaves that up to the user. This means he/she has more control over their final frontend markup (no automatically injected styles and scripts) but it also means more to do during the initial setup. Can you share your _init.php please? Especially around line 9. PM if you don't want to share it here. -
<?php class EventActivityPage { /** * Gets hero image or fallback hero image if one does not exist for this activity */ public function heroImage(): Pageimage { return $this->getFormatted('hero_image.first') ?: $this->eventPage()->getFormatted('activity_fallback_hero_image.first'); } } Using getFormatted + .first you can force the return type so no matter what setting or output formatting is applied your method will return the correct value.
-
Awesome! Thank you! And shame on me - I have not yet given the module a star on github 😮
- 304 replies
-
- 1
-
-
- translation
- language
-
(and 1 more)
Tagged with:
-
Hey @FireWire thx a lot for your work on this. Unfortunately it still behaves the same: HA! I found the issue when making the screenshot for this post: I realised the note below the field! Didn't see this before and expected the textarea to take one string per line! --> now it works as expected! Any reason why you did not make this textarea behave like "one word per line"? That would be a lot easier to read and a lot easier to type imho 🙂
- 304 replies
-
- translation
- language
-
(and 1 more)
Tagged with:
-
I think being on windows is one more reason to look into ddev. You can use it in a WSL linux machine, so your local environment will be linux and your production environment will be as well (most likely). That avoids lot's of issues that you have to deal with when using laragon. For example I've been working on a PDF project and on linux it's easy to just use "poppler-utils" to create JPG from PDF. Not possible with laragon like this, so you need to either hack things together on your production environment or you have to find a way to get it working on your local dev, which means additional work and additional headache. Another example is my current multisite project. In DDEV all you have to do is add "additional_hostnames" to your config and you can access all your local sites via foo.ddev.site and bar.ddev.site and baz.ddev.site and all will be routed to the same ddev/pw project 🚀 I don't think that these two things would be possible with laragon. But I don't know. Oh and switching php versions is as simple as changing the config and running "ddev restart". In laragon it was also not that hard, but I can remember it was also not that easy...
-
Xforum - Proof of Concept front end forum
bernhard replied to breezer's topic in Module/Plugin Development
+1 Please do that. It will help you as a developer and it will help us making exploring your module (and maybe contributing) easier. 2x speed = 12min investment 😉 If you use VSCode Github is integrated into it very well, so you won't even need the commandline. I highly recommend installing this extension: https://marketplace.visualstudio.com/items?itemName=mhutchie.git-graph It has shed so much light on things that I didn't understand before and after using this extension it clicked and things just made sense. -
Would be helpful for sure! I'd need it for my current project... And likely also the next. And the one after.
-
Glad it was helpful 🙂
-
Just added support for product discounts to v1.1.0 😎
-
I'm proud to announce that RockCommerce does now officially supports product discounts 🤘😎💪 Frontend Example: Backend Example: With this update, you can: Create time-limited product discounts with just a few clicks Show attractive discount labels on your product pages Display savings clearly in the shopping cart Manage everything through ProcessWire's familiar interface Get started today and give your customers the deals they deserve! 😉 Docs: https://www.baumrock.com/en/processwire/modules/rockcommerce/docs/discounts/ Any questions? Drop them below! 👇
-
Hey @LMD I can not reproduce the issue. This is what I did: created a new ddev project installed RockShell (to quickly install pw via commandline) installed pw (current dev, blank profile) clicked "install" for all modules (bottom - up) Enabled product variations and it correctly showed the warning: But I have improved that so that it shows the checkbox only if RockGrid is installed: Once RockGrid was installed i checked the box and got this (success, no errors): This is what I get when I view Setup > RockGrid: To add the Variations GUI to your products do this (I'll add this to the docs later): Add fields "rockcommerce_net" and "rockcommerce_variations" to your product template Then edit one of your products and you should see something like this: Then click on "+ new variation" at the top left corner of your variations repeater item: Save that and maybe reload the page to see the variations in the grid. Then you can select variations as mentioned above: Each variation has a price. You can either use "0" as base price and enter the variation price for each variation (eg, 10€ / 20€ / 30€) or sometimes you might want to set a total price. To save you or your clients from the hassle of calculating all price differences there is the "total" column that you can use and RockCommerce will calculate the difference for you: I can't recommend DDEV enough. I've been using Laragon for several years, but trust me, DDEV is so much better so it's really worth trying it out. Installation might be a little harder than with Laragon, but once installed DDEV just runs and runs and it has so many great features that Laragon does not have. And last but not least it makes it easier for me to help you with any issues because we have the same environment. Let me know how it goes.
-
Oh and if you need a quote for the website, this might be a starting point:
-
this was my prompt for the AI (source = me) This is the output of the AI that I got from my prompt. 🙂 I think I used claude 3.5 sonnet but I'm not 100% sure.
-
Hey @LMD thx for your question and of course thx for your purchase 🙂 Great! 🙂 Yeah sorry for that! But I'm always around to help as good as I can 🙂 If prices only change based on shoe size it does not sound complex 🙂 If prices change depending on colour and shoe size than it's a different story 🙈 Adding variations from the backend should be straightforward! You click on "new variation" in the shop tab of your product and get something like this: Then you hit save and you get back to the shop tab. There you can filter all existing variations, so you can type "size" and get this: Then you enter the prices for each size and - important - select all variations that should be displayed on the frontend: To select/deselect variations you have two options: Select all or select a single item. When clicking on the "variation" column you select all, when clicking on the "option" column you can select individual rows: The selected variations should then show up on your frontend: Does that help? Not sure where exactly you are struggling 😉
-
No, spot on! Thx that was very helpful 🙂
-
Hey @teppo and @psy thx for your answers! Looks like I was not precise enough with my question. The import part is not the question - I've imported 1000+ pages for this project already from the old website using RockShell and a custom script. With RockShell it's super easy to create reusable scripts (as you have correctly mentioned as important need @teppo) and it's super easy to watch what's happening and to abort in case anything unwanted happens (just hit CTRL+C). The question is more related to e-commerce and different vendors providing different data. What we got was a total mess. From CSV with thousands of entries in one huge table to excel files with related keys like an excel copy of a relational database. Think of it as a mysql dump of a ProcessWire installation... but without ProcessWire transforming it into something useful and understandable 😅 My guess is that the only way is to understand the data we get from the vendors and then try to transform it into the data format that RockCommerce needs. Sounds like a pain. But manually adding 15k products does not sound better either 😄 So I also thought about scraping the data from their websites... but I'm not sure if that was any easier than reading their messy CSVs... Anybody has some experience with that? Also happy with "no idea/not easy/not possible" answers to help me back what I told my client ^^ PS: A RockShell command to import from CSV is as simple as that if anybody has a similar need: <?php namespace Site; use ProcessWire\Page; use RockShell\Command; use function ProcessWire\wire; class ImportProducts extends Command { public function handle() { while ($row = wire()->files->getCSV('/path/to/data.csv')) { // create page and save it $p = new Page(); // ... echo "Saved page {$p->path}"; } return self::SUCCESS; } } You can then run that command via "rockshell import:products" and watch it do its work 🙂 So the ProcessWire part is easy.......