Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/21/2022 in all areas

  1. Coming to an IntelliJ IDE (like PHPStorm) near you soon. Live Templates or snippets provide a short way to write repeating code. You enter an abbrevitation and the editor completes the code for you. Here is one example when I want to setup a new module: phpstorm64_aT7Nj2gxSv.mp4 @bernhard Has snippets for VSCode in his great RockMigrations module also, be sure to check them out, if you use VSCode. As I use RockMigrations in every PW installation I also add snippets for migrations: phpstorm64_fAD9MoUJLE.mp4
    5 points
  2. Okay here we go ? "$grandparent" is NULL... checked it with a bd() And here's the Screenshot:
    2 points
  3. @Gideon So Thanks for that input, I didn't know that the API can be accessed also by much simpler scripts withou using the library. @kongondo No, it's not one-off. The product import should be each 15 minutes or so via cronjob. I have edited my post to explain it better.
    1 point
  4. Oh yeah, finally ? I just prefer to use PHPStorm than VSCode ?
    1 point
  5. Just the ProcessWire Code, I have to transform everything manually. Sadly IntelliJ has a weird format for the live templates which are stored in an XML file. Sharing and importing isn't also as easy as copying the files to the root directory. Instead you have to import them as settings for the IDE and restart the IDE afterwards. Live templates are a native function of PHPStorm, I think they were a thing before they existed in VSCode. It is somewhat similar to snippets in VSCode. You have your code and then enter $myvariable$ for inserting user text, or things like $boolean$ or $enum$ and can define values for that.
    1 point
  6. Hi @Nomak. Welcome to the forums. Is this a one-off? If yes, another option is to export the products (in the Products Dashboard in Shopify admin) as CSV and then use that to import the products into ProcessWire. At that point you can use the ProcessWire API + PHP to do the imports or modify the CSV and use a module such as ImportPagesCSV to import to ProcessWire.
    1 point
  7. I understand, and my point to suggest you to ask @ryan directly if his pro module can fit your needs, is because ryan is used to give more flexibility instead of locking the user to a finished functionality. I mean, there is maybe some hooks that can be used to link things to an user. Without speaking about that you benefit ryan's code and insight ? Anyway, I will might buy it for a project and could give more feedbacks. Stay tuned.
    1 point
  8. Are any of the methods here helpful? https://processwire.com/api/ref/markup-pager-nav/ Especially, setBaseUrl(), setQueryString(), setGetVars() Not sure if it is applicable here but in the past I've had to append ?pageNum=1 to the URL of page 1. $input->queryString() might also be helpful to handle your channel strings?
    1 point
  9. Don't know if anything changed since 2017 and just found this post by coincidence but wanted to show how this can be done easily now in 2020 ? $wire->addHookAfter('ProcessPageEdit::getSubmitActions', function(HookEvent $event) { $actions = $event->return; $actions[] = [ 'value' => 'foo', 'icon' => 'check', 'label' => 'foo', ]; $event->return = $actions; }); The value of the clicked submit action is stored in $input->post->_after_submit_action (you can hook Pages::saved or ProcessPageEdit::processInput)
    1 point
×
×
  • Create New...