Plugin Directory

Changeset 2514743


Ignore:
Timestamp:
04/14/2021 10:33:33 AM (5 years ago)
Author:
rider7991
Message:

Added popup with information about successful link copying on the cart page
Changes in detecting if Woocommerce is active

Location:
share-that-cart/trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • share-that-cart/trunk/copy.js

    r2287149 r2514743  
    66}
    77if (document.getElementById('sc__button')){
     8    const popup = document.querySelector('#sc__popup');
    89    const button = document.getElementById('sc__button');
    910    button.addEventListener('click', (e)=>{
    1011        e.preventDefault();
    1112        copy();
     13        popup.style.display = "block";
    1214    });
     15
     16    popup.addEventListener('click', ()=>{
     17        popup.style.display = "none";
     18    });
     19
     20
    1321}
  • share-that-cart/trunk/languages/share-that-cart-pl_PL.po

    r2287149 r2514743  
    22msgstr ""
    33"Project-Id-Version: \n"
    4 "POT-Creation-Date: 2020-04-15 11:36+0200\n"
    5 "PO-Revision-Date: 2020-04-15 11:37+0200\n"
     4"POT-Creation-Date: 2021-04-14 12:22+0200\n"
     5"PO-Revision-Date: 2021-04-14 12:22+0200\n"
    66"Last-Translator: \n"
    77"Language-Team: \n"
     
    1717"X-Poedit-SearchPath-0: share-that-cart.php\n"
    1818
    19 #: share-that-cart.php:22
     19#: share-that-cart.php:19
    2020msgid ""
    2121"Plugin NOT activated: Share That Cart requires the WooCommerce plugin to be "
     
    2828msgid "Share That Cart"
    2929msgstr "Skopiuj link do zawartości koszyka"
     30
     31#: share-that-cart.php:61
     32msgid ""
     33"Done! You can now share link to this cart by simply pasting it. It is in "
     34"your clipboard!"
     35msgstr ""
     36"Gotowe! Możesz teraz udostępnić ten koszyk wklejając link, który masz teraz "
     37"w schowku w dowolnym miejscu."
  • share-that-cart/trunk/readme.txt

    r2514703 r2514743  
    1414== Description ==
    1515This plugin adds "Share this cart" button to the cart page.
    16 Want to share items from your cart? Click the "Share That Cart" button (now you have got special URL in clipboard), send a link to a friend and items from your cart will appear in his cart!
     16It's really simple and easy to use. No settings. No additional tables in database.
     17Want to share items from your cart? Just click the "Share That Cart" button (now you have got special URL in clipboard), send a link to a friend and items from your cart will appear in his cart!
    1718
    1819== Installation ==
  • share-that-cart/trunk/share-that-cart.php

    r2514701 r2514743  
    1010defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
    1111
    12 register_activation_hook(__FILE__, 'sc_active');
    13 
    1412add_action('woocommerce_after_cart_contents', 'sc_button');
    1513add_action('wp_loaded', 'sc_add_products');
     14register_activation_hook(__FILE__, 'sc_active');
    1615
    1716function sc_active() {
    1817    if ( !in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {
     18        deactivate_plugins( basename( __FILE__ ) );
    1919        die(_e('Plugin NOT activated: Share That Cart requires the WooCommerce plugin to be installed and active.', 'share-that-cart'));
     20        return false;
     21    } else {
     22        return true;
    2023    }
    2124}
     
    5457        </td>
    5558    </tr>
     59    <div class="sc__popup" id="sc__popup">
     60        <?php
     61        echo _e('Done! You can now share link to this cart by simply pasting it. It is in your clipboard!', 'share-that-cart');
     62        ?>
     63    </div>
    5664    <?php
    5765}
  • share-that-cart/trunk/style.css

    r2287149 r2514743  
    77  margin: 0;
    88  padding: 0; }
     9.sc__popup {
     10  display: none;
     11  position: fixed;
     12  bottom: 0;
     13  width: 100%;
     14  padding: 15px 0;
     15  text-align: center;
     16  background: #0073aa;
     17  left: 0;
     18  color: #fff;
     19  z-index: 99999; }
    920
    1021/*# sourceMappingURL=style.css.map */
  • share-that-cart/trunk/style.css.map

    r2287149 r2514743  
    11{
    22"version": 3,
    3 "mappings": "AACC,YAAW;EACV,QAAQ,EAAE,QAAQ;AAGnB,SAAQ;EACP,QAAQ,EAAE,QAAQ;EAClB,IAAI,EAAE,OAAO;EACb,MAAM,EAAE,IAAI;EACZ,MAAM,EAAE,CAAC;EACT,OAAO,EAAE,CAAC",
     3"mappings": "AACC,YAAW;EACV,QAAQ,EAAE,QAAQ;AAGnB,SAAQ;EACP,QAAQ,EAAE,QAAQ;EAClB,IAAI,EAAE,OAAO;EACb,MAAM,EAAE,IAAI;EACZ,MAAM,EAAE,CAAC;EACT,OAAO,EAAE,CAAC;AAOX,UAAS;EACR,OAAO,EAAE,IAAI;EACb,QAAQ,EAAE,KAAK;EACf,MAAM,EAAE,CAAC;EACT,KAAK,EAAE,IAAI;EACX,OAAO,EAAE,MAAM;EACf,UAAU,EAAE,MAAM;EAClB,UAAU,EAAE,OAAO;EACnB,IAAI,EAAE,CAAC;EACP,KAAK,EAAE,IAAI;EACX,OAAO,EAAE,KAAK",
    44"sources": ["style.scss"],
    55"names": [],
  • share-that-cart/trunk/style.scss

    r2287149 r2514743  
    1515
    1616    }
     17
     18    &__popup {
     19        display: none;
     20        position: fixed;
     21        bottom: 0;
     22        width: 100%;
     23        padding: 15px 0;
     24        text-align: center;
     25        background: #0073aa;
     26        left: 0;
     27        color: #fff;
     28        z-index: 99999;
     29    }
    1730}
Note: See TracChangeset for help on using the changeset viewer.