I have a variety of prices in the backend for the shipping rates. These can and do change and I would like to reflect these changes in a frontend page that can be client edited, i.e. a CMS page or static block.
Is there any {{ }} bracket way to pull config variables out of the backend?
Static blocks are those pieces of content you can display practically on every page of your Magento 2 store. You can show CMS block on category page to notify your customers about the top products, add a static block to the CMS page or even another CMS block to diversify their content.
Navigate to Content > Pages, choose the CMS page you want to display the CMS block on and in the Action section choose Edit. 2. Unfold the Content section and press the Widget button to insert the widget. Set the CMS Static Block as the Widget Type to continue.
Use
{{config path="some/config/path"}}
Where path
is the same value you might use in a Mage::getStoreConfig()
call.
NB: This won't calculate the actual shipping since that needs to be performed on individual orders.
Go to Admin->System->Permission->Variables and there add your config path first to access it in static block. Because after SUPEE 6788, there are restrictions to use all config paths. Once you added there than you can use
{{config path="some/config/path"}}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With