Skip to content

Instantly share code, notes, and snippets.

View Kayakbabe's full-sized avatar

Kelly Eberhard Allen Kayakbabe

View GitHub Profile
{
"swagger": "2.0",
"info": {
"version": "1.0",
"title": "Ecwid API v3",
"description": "TODO: Add Description"
},
"host": "app.ecwid.com",
"basePath": "/api/v3/14732441",
"schemes": [
<!--
<Note_Add />
One of the following attributes is required:
customer: customer login
business: Business Title
order: Order ID
Examples:
-->
<mvt:comment>
Replace Access token and signature
</mvt:comment>
<mvt:assign name="g.endpoint" value ="'https://version9.mivamerchant.net/mm5/json.mvc'" />
<mvt:assign name="g.access_token" value ="''" />
<mvt:assign name="g.signature" value ="crypto_base64_decode('')" />
<mvt:assign name="g.timestamp" value="' \"Miva_Request_Timestamp\" : ' $ '\"' $ s.time_t $ '\",' " />
<mvt:comment>
GLOBAL Setup
| 1) File Settings
| 2) Initial File Handling
| - Set Offset / Per Page Variables
| - Delete Existing File (if EXISTS)
| 3) Special Character Reference Variables
========================================
</mvt:comment>
<mvt:comment> =1 File Settings </mvt:comment>
@Kayakbabe
Kayakbabe / master_provide.xml
Created October 31, 2018 06:36 — forked from steveosoule/master_provide.xml
Miva - Master XML Provide
<Provision oncomplete="archive|delete">
<Domain>
<Store_Create>
<Code>GES</Code>
<Name>Garth's Equipment Shoppe</Name>
<Manager>admin</Manager>
<LicenseNumber>mvsup-3NMBCP01101</LicenseNumber>
<Owner>McCollough Enterprises</Owner>
<Email>noreply@miva.com</Email>
<Company>miva test</Company>
@Kayakbabe
Kayakbabe / Recently_Viewed_Items.html
Created October 16, 2018 17:36 — forked from steveosoule/Recently_Viewed_Items.html
Recently Viewed Items Functionality. All custom Miva code, not run by module. It stores a list of product codes, and displays up to the 12 most recent products a customer has viewed. It also stores the list to a custom customer field in case the user is logged in and then comes back later.
*****ACLN*****
<mvt:comment>Upon login, read custom field that holds their recently viewed item codes. Then save this value to basket session field for use to display recently viewed items.</mvt:comment>
<mvt:if expr="g.Action EQ 'LOGN'">
<mvt:item name="customfields" param="Read_Customer_ID( g.customer:id, 'recentlyViewed', l.settings:recentlyViewed )" />
<mvt:item name="customfields" param="Write_Basket( 'recentlyViewed', l.settings:recentlyViewed )" />
</mvt:if>
@Kayakbabe
Kayakbabe / check-youtube-id.php
Created April 27, 2018 05:27 — forked from imelgrat/check-youtube-id.php
Verify whether a YouTube video exists using PHP and oEmbed status codes. Instead of actually fetching the video’s URL using a tool suchas a cURL, we can speed things up by just checking the response headers by using PHP’s get_headers() function. Full article: https://imelgrat.me/json-xml/oembed-protocol-embed-videos-news/
<?php
/**
* @author Ivan Melgrati
* @copyright 2018
*/
function YouTube_Check_ID($videoID)
{
$is_valid = true;