Output flushing can have inconsistent performance based on the server and client setup for a given web-request (See "The Flush Checklist"), but the following is a basic example of how miva_output_flush can work with a Miva server.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <PriceGroup_Add> | |
| <Name>New Customer Discount</Name> | |
| <Eligibility>Coupon</Eligibility> | |
| <Module>discount_basket</Module> | |
| <Settings> | |
| <Type>Percent</Type> <!-- Fixed,Percent --> | |
| <Discount>5.00</Discount> | |
| </Settings> | |
| </PriceGroup_Add> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <mvt:comment> | |
| | | |
| | Points and Loyalty Bonus for New Customers | |
| | | |
| | Further Reading: https://docs.miva.com/how-to-guides/points-loyalty#functions | |
| | | |
| </mvt:comment> | |
| <mvt:assign name="l.just_created_customer_account" value="(g.Action EQ 'ICST' OR g.Action EQ 'ICSQ') AND NOT g.UI_Exception AND g.Basket:cust_id" /> | |
| <mvt:if expr="l.just_created_customer_account"> | |
| <mvt:assign name="l.settings:transaction:cust_id" value="g.Basket:cust_id" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <mvt:comment> | |
| <!-- Determine Order To Load --> | |
| </mvt:comment> | |
| <mvt:if expr="g.order_id GT 0"> | |
| <mvt:assign name="l.order_id" value="int(trim(g.order_id))" /> | |
| <mvt:else> | |
| <mvt:assign name="l.order_id" value="200000785" /> | |
| </mvt:if> | |
| <mvt:comment> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <mvt:comment> | |
| # Sort Some Facets Numerically | |
| Miva's facets are often sorted in a method that users do not expect for numerical values, so this is an attempt to make them display in true numerical order. | |
| ## Algorithm | |
| Instead of sorting by facet_value:prompt, we create a seperate memeber to perform the QuickSortArray on: :sort_value | |
| :sort_value starts as the prompt and then is modified/normalized as follows: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Delete all of the local and remote branches (except master, main, develop) that have been merged into the current branch | |
| alias git-prune='git fetch --prune && git pull && git branch --merged | egrep -v "(^\*|master|main|develop)" | xargs git branch -d' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Request | |
| { | |
| "Store_Code": "{{Store_Code}}", | |
| "Miva_Request_Timestamp": "{{$timestamp}}", | |
| "Function": "BusinessAccountCustomerList_Load_Query", | |
| "BusinessAccount_Title": "Miva Inc.", | |
| "__OR_BusinessAccount_ID": 4, | |
| "__FILTER_DOCS": "https://docs.miva.com/json-api/list-load-query-overview", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <mvt:comment> | |
| | | |
| | Configure Query | |
| | | |
| </mvt:comment> | |
| <mvt:assign name="l.query:offset" value="0" /> | |
| <mvt:assign name="l.query:max" value="10" /> | |
| <mvt:assign name="l.query:sort_by" value="'id_desc'" /><mvt:comment><!-- Available Options: id_desc, name_asc, name_desc, code_asc, code_desc, total_asc, total_desc, firstdate_asc, firstdate_desc, lastdate_asc, lastdate_desc, nextdate_asc, nextdate_desc, payment_asc, payment_desc, shipping_asc, shipping_desc, termrem_asc, termrem_desc, termproc_asc, termproc_desc --></mvt:comment> | |
https://github.com/andreasbm/web-skills/blob/master/README.md
Web Skills is a visual overview of useful skills to learn as a web developer. Go to https://andreasbm.github.io/web-skills to check out the visual overview or scroll through this readme to get the overview as a list. If you like the project you are very welcome to become a stargazer 🤩
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <mvt:do file="g.Module_Feature_SCH_UT" name="l.success" value="ScheduledTask_Trigger( 'Foobar Task Name' )" /> |