Skip to content

Instantly share code, notes, and snippets.

View projoomexperts's full-sized avatar

projoomexperts

View GitHub Profile
@projoomexperts
projoomexperts / add-ajax-extended.php
Created May 11, 2021 12:42 — forked from obiPlabon/add-ajax-extended.php
Register ajax action hook.
<?php
/**
* Register ajax action hook.
*
* When you have lots of ajax actions in your theme or plugin then
* this utility function is going to be quite handy!
* By default all actions are for logged in users.
*
* Usage:
* add_ajax( 'get_infinity_posts', 'prefix_get_infinity_posts' ); // for logged in only
<IfModule mod_dtimeout.c>
<Files ~ ".php">
SetEnvIf Request_URI "RTR_data.php" DynamicTimeout=300
</Files>
</IfModule>
@projoomexperts
projoomexperts / gist:ab800bd5a06ea3244a8a7861d99e4497
Created October 8, 2019 01:58
siteground dynamic timeout increase
<IfModule mod_dtimeout.c>
<Files ~ ".php">
SetEnvIf Request_URI "RTR_data.php" DynamicTimeout=300
</Files>
</IfModule>
@projoomexperts
projoomexperts / shopify-product-description-tabs.liquid
Last active May 18, 2021 08:39
Very simple code to show tabs in your shopify product description. All you need is to replace {{ product.description }} with the code below. It will separate every <h3> tag and contents after it into a tab. feel free to contact me if you want it implemented on your website for a small one time fee. `projoomexperts@gmail.com` "Shopify product des…
{% assign description = product.description | replace: '<h3', '</div><div class="tab-content"><h3' %}
<div class="prod_description">
<div class="spacer">
{{ description }}
</div>
</div>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
{% for collection in section.blocks %}
{%- assign category = collections[collection.settings.category] -%}
<div class="slide-categoria-home w-slide" {{ block.shopify_attributes }}>
<a href="{{ category.url }}" class="categorias-home w-inline-block">
<div class="bloque-titulo-categoria-home">
<p class="titulo-categoria-home">
{{ category.title }}
</p>
</div>
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?example.com$
RewriteCond %{REQUEST_URI} !^/newsite18/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /newsite18/$1
RewriteCond %{HTTP_HOST} ^(www.)?example.com$
RewriteRule ^(/)?$ newsite18/index.php [L]
</IfModule>
@projoomexperts
projoomexperts / gist:a5ac46a0a1f386ee4f78632eda46e3d0
Created April 15, 2018 08:49
Bigcommerce Sidebar Category List VMENU
<nav>
<div class="sidebarBlock">
<h5 class="sidebarBlock-heading">Categories</h5>
<div class="u-vmenu">
<ul>
{{#each categories}}
<li>
{{#if children}}
<a href="{{url}}">
// Scheduled Action Hook
function gnc_woo_cron_update( ) {
// Get currency conversion rate from settings
$currentcy_settings = get_option( 'gnc_currency_settings' );
$rate = $currentcy_settings[gnc_currency_text_field_0];
<table class="table"> <thead> <tr> <th> S-M-L </th> <th> USA </th> <th> UK/AU/NZ</th> <th> Italy </th> <th> France </th> <th> Germany</th> <th> Japan </th> <th> Russia </th> </tr> </thead> <tbody> <tr class="odd"> <td>S</td> <td>2</td> <td>6</td> <td>38</td> <td>34</td> <td>32</td> <td>7</td> <td>40</td> </tr> <tr class="even"> <td>S</td> <td>4</td> <td>8</td> <td>40</td> <td>36</td> <td>34</td> <td>9</td> <td>42</td> </tr> <tr class="odd"> <td>M</td> <td>6</td> <td>10</td> <td>42</td> <td>38</td> <td>36</td> <td>11</td> <td>44</td> </tr> <tr class="even"> <td>M</td> <td>8</td> <td>12</td> <td>44</td> <td>40</td> <td>38</td> <td>13</td> <td>46</td> </tr> <tr class="odd"> <td>L</td> <td>10</td> <td>14</td> <td>46</td> <td>42</td> <td>40</td> <td>15</td> <td>48</td> </tr> <tr class="even"> <td>L</td> <td>12</td> <td>16</td> <td>48</td> <td>44</td> <td>42</td> <td>17</td> <td>50</td> </tr> <tr class="odd"> <td>XL / 1X</td> <td>14</td> <td>18</td> <td>50</td> <td>46</td> <td>44</td> <td>19</td> <td>52</td> </tr>
@projoomexperts
projoomexperts / orderapi.php
Created March 16, 2018 03:02
Bigcommerce Order API
array(2) {
[0]=>
object(Bigcommerce\Api\Resources\Order)#14 (6) {
["fieldMap":protected]=>
array(1) {
["shipments"]=>
string(2) "id"
}
["fields":protected]=>
object(stdClass)#4 (64) {