I ended up switching out the JSON:API and this module and using my own endpoint as I only really needed a few bits of data and JSON:API was overkill in my case.
Patch still works for 1.6 but will need updating for 1.x due to module file change.
Testing on a site and seems like a great adition to the module, would be good to get this merged
Yeah exactly, the price with promotions etc applied
ChrisScrumping → created an issue.
I am using this patch and seems to be working
Been struggling with this issue today and in case its helpful to anyone else I have finally managed to get it working..... I wanted a field group for a product variation type.
Thanks Hamulus you pointed me in the right direction!
First I don't think its possible to use Field Groups that are created on Commerce Product Variations, you must create them on the Commerce Product.
Once you have created the required groups use the example Hamulus provided to move variation fields into the field groups.
Not great for a site builder but at least it works!
Found out I can use the isRevisionable method so have created a PR.
ChrisScrumping → created an issue.
@mvonfire Annoying, maybe webpack would be more configurable in this instance? This theme uses webpack https://git.drupalcode.org/project/prototype but again this is a single theme so might not be that helpful in your case.
Would be good if we can support all themes and modules from a single Vite server, as you say this will hopefully be possible with Vite 6.
@mvonfire Glad its helpful, although I do it quite differently now.
Now this module supports SDC and we have the https://www.drupal.org/project/storybook → module my setup is much simpler. Although yes my Vite config is in the theme folder as per the docs https://git.drupalcode.org/project/vite/-/blob/1.x/README.md
My vite config looks like
import {defineConfig} from 'vite'
import postcssNesting from 'postcss-nesting';
import postcssImport from 'postcss-import';
import postcssCustomMedia from 'postcss-custom-media';
import glob from 'glob';
export default defineConfig({
build: {
manifest: true,
rollupOptions: {
input: [
'assets/css/main.pcss',
...glob.sync('components/**/**/*.pcss'),
]
}
},
css: {
postcss: {
plugins: [
postcssNesting,
postcssImport,
postcssCustomMedia
],
},
},
server: {
host: '192.168.64.100',
port: 5173,
},
})
Which means all the component-style.pcss files compile to .css and Drupal takes care of the rest and I don't need gulp.
Not sure if it would work the same moving Vite to the root but it might/should so long as the paths are correct and the Vite module can find the devServerUrl?
Thanks poker10 great stuff!
Oh I see it now, thanks valic :)
I will try and setup a test for this asap.
I was struggling to get a patch file from the PR, its out of date and does not contain the latest commits.
I tried merging the latest changes into 8.x-1.x on the fork hoping that might mean Gitlab updates the patch file but no luck.
Created manually locally if anyone else needs a copy its here file:///home/chris/Projects/websites/crossover-minirigs/google-apple-pay.patch
I will test Google and Apple pay on our dev account next week.
Should be okay now hopefully?
Would be good get this merged, I am happy to help by applying the suggested changes if that's all that's required?
I somehow set it back to Needs work not sure how...
Great thanks, no worries :)
Following on from my comment in #7 our issue turned out to be a Cloudflare worker with a caching issue since the D10 changes to caching. Since we fixed that its all sorted.
Unless I am miss understanding you I am not sure that would work?
That would move the cart reset after adding items to the cart so items would always get removed?
I have wrapped the whole section in an if cart > do this > else redirect. I will push now.
Doh yeah!
Now creates and array of available items and adds them to the cart later after a cart reset.
Also written a test that should cover this - when the first item in the array is unknown (and unknown skus are allowed) and we want to reset the cart.
Oops VS Code trying to be helpful! Sorted now
Should be all good now
I am using https://github.com/ddev/ddev-drupal-contrib for testing and I needed to add a composer file to bring in Drupal commerce as obviously that's a dependency.
Shall I commit this as well?
{
"name": "drupal/direct_checkout_by_url",
"type": "drupal-module",
"description": "Direct checkout by URL in with Drupal Commerce.",
"homepage": "https://www.drupal.org/project/direct_checkout_by_url",
"license": "GPL-2.0-or-later",
"repositories": [
{
"type": "composer",
"url": "https://packages.drupal.org/8"
}
],
"require": {
"php": "^8.0",
"drupal/commerce": "^2.0"
},
"minimum-stability": "dev"
}
I also note that this also allows you to add multiple items of the same SKU to the cart rather than needing to use the alternative method. Eg
/direct-checkout-by-url?products=1234,5678,1234
Is the same as
/direct-checkout-by-url?products[0][quantity]=2&products[0][sku]=1234&products[1][quantity]=1&products[1][sku]=5678
ChrisScrumping → created an issue.
ChrisScrumping → changed the visibility of the branch 8.x-1.x to hidden.
ChrisScrumping → changed the visibility of the branch 8.x-1.x to active.
ChrisScrumping → changed the visibility of the branch 8.x-1.x to hidden.
ChrisScrumping → created an issue.
I have archived this repo now as it was an experiment and was created pre this module supporting Vite 5
https://github.com/ChrisScrumping/drupal-vite-alpine-theme/tree/main
I might bring it back at some point but no time to update at the moment.
I have Vite 5 and components working great now inside my theme folder however I am also interested in the recommended way to use this module with components in the theme and modules.
Are you supposed to have several instances of vite or one instance that compiles everything across modules and theme folders?
Looks like this pull request has fallen behind, can we rebase?
Came across this issue today although not exactly the same as the original post its almost identical to whats described in #6.
The problem for us was that we were not able to reproduce anywhere apart from prod. Even after cache clears and rebuilds it only happened on prod and consistantly happened even after a cache clear.
Setting my local php max_input_vars really low and ensuring that all Drupal caching was turned on seems to replicate the issue so hoping this is a fix for prod. Although will be a few days before we can test and push anything.
Created a new patch with 2.0.0-alpha1 merged. Not tested yet but will report back if we find any issues
I was able to get passed this by moving the handlPresave inside of the $revision instanceof condition.
Finally once I had deleted all my test nodes and ran cron I was able to delete the block type (after applying #50).
As said previously in this thread feels like an issue that could do with a better work around at very least. At least some way of seeing what content is stopping the delete would be useful.
Tested #50 and getting an error trying to apply the patch.
Unable to decode output into JSON: Syntax error
TypeError: Drupal\layout_builder\InlineBlockEntityOperations::handlePreSave(): Argument #1 ($entity) must be of type Drupal\Core\Entity\EntityInterfa
ce, null given, called in /var/www/web/core/modules/layout_builder/layout_builder.post_update.php on line 125 in Drupal\layout_builder\InlineBlockEnt
ityOperations->handlePreSave() (line 172 of /var/www/web/core/modules/layout_builder/src/InlineBlockEntityOperations.php).
I also can't delete a test block after testing layout builder on a dev branch, which is blocking me from moving to another branch without layout builder as I can't import the config until all the blocks are gone.
I was trying to test this and the command has changed.
```drush generate sdc:theme```
Tested #17 and it works.
Tested this and seems to be working. Used with this repo as my start point: https://github.com/cosmicdreams/drupal-storybook once installed I could generate components and view them in storybook right away.
This caught me out earlier
ChrisScrumping → created an issue.