Skip to content

Instantly share code, notes, and snippets.

View chakravarthykalyan90's full-sized avatar

Kalyan Chakravarthi chakravarthykalyan90

View GitHub Profile
@chakravarthykalyan90
chakravarthykalyan90 / companion-product
Created July 22, 2020 14:03 — forked from tkirrane/companion-product
Add a companion product to cart page
{% comment %}
To add a companion product to the cart automatically if a primary product is in cart:
1. Create a new link list under your Navigation tab.
2. In that link list, make the first link point to companion product.
3. Copy your link list handle where indicated at line 8:
{% endcomment %}
{% assign linklist = linklists['put-your-link-list-handle-here'] %}
{% comment %}
@chakravarthykalyan90
chakravarthykalyan90 / media-query.css
Created November 19, 2018 06:32 — forked from gokulkrishh/media-query.css
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
//CSS
<?php
$dir = "/var/www/html/location/";
chdir($dir);
array_multisort(array_map('filemtime', ($files = glob("*.*"))), SORT_ASC, $files);
foreach($files as $filename)
{
echo "<li>".substr($filename, 0, -4)."</li>";
rename($filename, '/var/www/html/location/archive/'.$filename);
}
SELECT `quote_id`,
COUNT(`quote_id`) AS `duplicate_count`,
`increment_id` AS `first_increment_id`,
GROUP_CONCAT( `increment_id` SEPARATOR ' | ' ) AS `increment_ids`,
`created_at`,
`state`,
`status`,
`customer_email`,
`grand_total`
FROM `sales_flat_order`