storefront | Official theme for WooCommerce | Content Management System library
kandi X-RAY | storefront Summary
kandi X-RAY | storefront Summary
Please read this document explaining the current status of Storefront development.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Render the radio button .
- Enqueue jQuery UI .
storefront Key Features
storefront Examples and Code Snippets
Community Discussions
Trending Discussions on storefront
QUESTION
I want to add a custom message on the cart page in WooCommerce. The message should appear depending on the shipping class assigned to the product, in the woocommerce_cart_shipping_method_full_label
hook.
I already have code that does it, but it doesn't work when I assign it to that hook, it only works if I assign it to the woocommerce_before_calculate_totals
hook.
When I want to add it to the woocommerce_cart_shipping_method_full_label
hook, I get the message:
Fatal error: Uncaught Error: Call to a member function get_cart()
Could someone advise me on what I'm doing wrong? I am using the storefront template with a child theme.
Based on Cart Message for a Specific Shipping Class in WooCommerce answer code, this is the code I'm using in the functions.php:
...ANSWER
Answered 2022-Mar-25 at 17:56Mapping code written for one hook to another hook sometimes takes some tweaking, depending on the original hook and the newly mapped hook:
- For example,
$cart
is not passed to the callback function, and hence the error message you get wc_clear_notices()
andwc_add_notice()
are not applicable, as the hook you wish to use is to change the$label
if ( did_action( 'woocommerce_cart_shipping_method_full_label' ) >= 2 )
does not exist
So you get:
QUESTION
I’m trying to get JSON with products details from the website https://www.highspiritsuae.com/shop?Collection=WINE by sending request.get
.
I’m very new in interaction with web, however by using of developer tools in Chrome was able to find element that gives this JSON and look at headers, Chrome sends to get it.
I have created few rows of code, however, receive 401 as a result. As per google it means authorization issue, but when I open website through browser it does not require any login/password.
...ANSWER
Answered 2022-Mar-05 at 14:12how to emulate this request?
What am I suggesting is to open network of browser dev tools and see if there is no authorization
header in browser request then it probably uses cookies.
The easy way to emulate the request is to make right-click on the request and copy it as cURL then using cURLConverter you can convert your request to Python's requests
and compare it with your code.
QUESTION
We are launching a Shopware 6 website and want to acomplish the following URL strucutre:
https://example.com/de -> German Language https://example.com/en -> English Language
We currently have tree entries in the the Storefront's domain configuration:
The problem here is, that the language switcher always defaults to the shortest (?) URL when switching stores, i.e. when switching from EN to DE, it picks https://example.com instead of https://example.com/de.
We have the entry (1) in the domain configuration, because without it, plugins break (they cannot properly generate their API URLs anymore).
Is this a problem in the plugins and should it be possible to just delete (1) or are we supposed to make the configuration differently?
...ANSWER
Answered 2022-Feb-17 at 07:08Based on the comments of @j_elfering and @mnaczenski I reported to the plugin vendor who released a fix very quickly.
I believe this is the important change in the module. It's not really accessing the store API but a normal controller:
diff:
QUESTION
**I am using latest version of the react-router (v6) where I am navigating from the navbar in header component to other pages.
The main question is that, how can I go to the other pages(routes) when I am on a certain page. Like when I am on the Games page and I have to move forward to the careers page, then the route exception occurs, so every time I have to go to other pages, first we have to move the home pages, then we have to move again on another page.
This is my heroku deployed link of reactjs app : plomx.herokuapp.com
&& This is my code of app.js
ANSWER
Answered 2022-Feb-02 at 06:40From what I can see, all your navigation actions use relative linking. I believe the issue you are describing is being on one of the pages, like "/games" and clicking the menu button to navigate("metaverse")
and the result is that you are relatively navigated to "/games/metaverse"
instead of absolutely navigated to "/metaverse
.
The difference between relative and absolute paths is the leading slash "/"
. Absolute paths start with "/"
.
Update your buttons to use absolute paths.
QUESTION
We want to display customer (actually customer-group) specific information on product detail pages in Shopware 6.
There seems to be the HTTP cache and we are afraid that the page would be cached if a specific customer group displays the page and the information would be leaked to non-customers.
Is this assumption correct?
The documentation does not reveal much information about this.
Is there a way to set specific cache tags, so that the information is only displayed to the correct customer group?
Or do we need to fetch the data dynamically via AJAX?
Bonus question: Can the HTTP cache be simulated in automatic tests to ensure the functionality works?
What I found out so far:
The is annotation
@httpCache
for controller, which seems to control whether a page is cached or notThe cache key is generated in
\Shopware\Storefront\Framework\Cache\HttpCacheKeyGenerator::generate
. It take the full request URI into account, and somecacheHash
which is injected. I believe it would not take the customer group into accountMaybe this
generate()
method could be decorated, but I am not sure if that is the right way.There is a cookie being set
sw-cache-hash
which influences the caching. It takes the customer into account.
...sw-cache-hash
is created here:
ANSWER
Answered 2022-Jan-28 at 10:51As you can see in the last code snippet, it takes into account the active Rule ids. This means that if you create a rule (through Settings > Rule Builder) that is active on a certain group, but not on another or no group, it will be taken into account & create a different cache hash for the different customer groups.
QUESTION
I want to use CSRF in ajax mode - Use CSRF protection
Currently I edited the storefront.yaml in vendor/shopware folder, but that shouldn't be right? For config changes, I should create a new .yaml file, but where do I put it?
Thanks
...ANSWER
Answered 2022-Jan-25 at 16:34I think it should go to config/packages/storefront.yaml
QUESTION
I've added to my storefront a new extension based on commercewebservices and I've tested several sample services directly through swagger and the ones that doesn't need any kind of authorization works perfect. However, the webservices annotated with @ApiBaseSiteIdAndUserIdParam
when I set the userId and siteParam the controller that interecepts this petition doesn't set in session the user I pass, it always returns anonymous user. I've tried creating special OAuth credentials but it doesn't work it always returns anonymous user.
ANSWER
Answered 2022-Jan-18 at 13:13If you are using OCC web services, these services are stateless. So you cannot get any values from session variables. Generally facades using by storefront and storefronts are using sessions.
QUESTION
I was wondering how can i change the default styles of Mollie Plugin in Shopware 6?
what i tried so far:
- using css to change credit-card components styles
- using jQuery and Javascript to overwriting CSS in JS files
- tried to change Plugin JS files directly but I need to
build:storefront
(and with next update it all will lost)
all things that I already tried didn't work. please if you have any idea i really appreciated.
I need to change this red color:
...ANSWER
Answered 2022-Jan-19 at 19:11The code is in an iframe, you cannot change it directly.
But if you look at the src of the iframe, the Moolie server accepts parameters for the background color. This can theoretically be changed from Shopware 6 side by adapting the module. (see https://docs.mollie.com/components/styling)
Anyways, the Mollie module does not seem to use the standard error color from the Theme. I would consider this a shortcoming / bug in the module and recommend you try to report it to the module vendor.
QUESTION
I recently upgraded to macOS Monterey and noticed that I cannot do any git commands that affect an onliene repo. Commands that are affected so far are
...ANSWER
Answered 2022-Jan-06 at 23:14The upgrade to Monterey seems to break macOS ssh
. I solved this by installing openssh from Homebrew:
QUESTION
Within @Storefront/storefront/base.html.twig
the blocks base_header
and base_navigation
are defined. I would like t move base_navigation
into base_header
to achieve a markup like this:
ANSWER
Answered 2021-Nov-10 at 21:19You can empty the block in your twig file and load the original block with the block function (https://twig.symfony.com/doc/3.x/functions/block.html)
Your file then looks something like this:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install storefront
PHP requires the Visual C runtime (CRT). The Microsoft Visual C++ Redistributable for Visual Studio 2019 is suitable for all these PHP versions, see visualstudio.microsoft.com. You MUST download the x86 CRT for PHP x86 builds and the x64 CRT for PHP x64 builds. The CRT installer supports the /quiet and /norestart command-line switches, so you can also script it.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page