Forum Replies Created

Viewing 14 replies - 46 through 59 (of 59 total)
  • Right-o, well that changes the error into something more understandable ??

    So the code I was using looks like this:
    add_action("wp_enqueue_scripts", function(){\Jigoshop\Helper\Styles::remove("jigoshop.shop.list-css");},100);

    As far as I can tell an additional argument after “jigoshop.shop.list-css” is optional. Styles.php disagrees!

    Fatal error: Uncaught ArgumentCountError: Too few arguments to function Jigoshop\Helper\Styles::remove(), 1 passed in /var/www/foxbox/wp-content/themes/twentyfifteen/functions.php on line 3 and exactly 2 expected in /var/www/foxbox/wp-content/plugins/jigoshop-ecommerce/src/Jigoshop/Helper/Styles.php on line 88

    ArgumentCountError: Too few arguments to function Jigoshop\Helper\Styles::remove(), 1 passed in /var/www/foxbox/wp-content/themes/twentyfifteen/functions.php on line 3 and exactly 2 expected in /var/www/foxbox/wp-content/plugins/jigoshop-ecommerce/src/Jigoshop/Helper/Styles.php on line 88

    However if I add a blank option it doesn’t crash:
    add_action("wp_enqueue_scripts", function(){\Jigoshop\Helper\Styles::remove("jigoshop.shop.list-css","");},100);

    Except the format of the style to remove isn’t quite right. A bit of experimentation led to this:

    add_action("wp_enqueue_scripts", function(){\Jigoshop\Helper\Styles::remove("jigoshop.shop.list","");},100);
    add_action("wp_enqueue_scripts", function(){\Jigoshop\Helper\Styles::remove("jigoshop.shop","");},100);
    add_action("wp_enqueue_scripts", function(){\Jigoshop\Helper\Styles::remove("jigoshop.shop.product","");},100);
    add_action("wp_enqueue_scripts", function(){\Jigoshop\Helper\Styles::remove("jigoshop.shop.related_products","");},100);
    add_action("wp_enqueue_scripts", function(){\Jigoshop\Helper\Styles::remove("jigoshop.shop.checkout","");},100);
    add_action("wp_enqueue_scripts", function(){\Jigoshop\Helper\Styles::remove("jigoshop.shop.cart","");},100);

    Added at the bottom of my theme’s functions.php file.

    It looks like specifying the stylesheets is unnecessary.
    add_action("wp_enqueue_scripts", function(){\Jigoshop\Helper\Styles::remove("jigoshop.shop","");},100);

    Seems to have the same effect.

    However the style doesn’t apply like it used to because many elements have different classes.

    E.g. the Add to cart button used to be:
    class="button"
    It’s now:
    class="btn btn-primary btn-block"

    I’m guessing there’s no way to change that back so I don’t need to play “hunt the changes”?

    From what I can tell the idea is to call JigoShop 2.x’s Styles helper (/src/Jigoshop/Helper/Styles.php ) and use its remove function to get rid of the relevant stylesheets.

    However when I attempt to add something like this to the top of a theme’s functions.php file:
    add_action("wp_enqueue_scripts", function(){Styles::remove("jigoshop.shop.list-css");},100);

    I get this:

    Fatal error: Uncaught Error: Class 'Styles' not found in /var/www/foxbox/wp-content/themes/twentyfifteen/functions.php on line 3
    ( ! ) Error: Class 'Styles' not found in /var/www/foxbox/wp-content/themes/twentyfifteen/functions.php on line 3

    Perhaps I’m not supposed to put this code in the theme’s functions.php file?

    Putting it at the bottom gets the same result as putting it at the top.

    It’s kind of amazing that migrating hundreds of products and orders went smoothly but getting my old theme working is what’s keeping my shop closed. Strangely it also only shows five products per page, despite being set to show 30 in the JigoShop settings. Not sure what’s going on there but if that’s still a problem after fixing this one I’ll create a separate topic.

    I’ve been trying to implement this and I really can’t seem to understand what exactly I’m supposed to be doing. I don’t understand the inner workings of WordPress or JigoShop and it seems a bit much to have to do all the required reading when before this was a toggle button.

    What exactly should I be adding?
    Which file? (My theme’s functions.php?)
    Where in that file?

    Just so I’m clear: in JigoShop 1.x there was the option to disable JigoShop’s built-in CSS. I had that enabled. That option is missing. I need to turn of JigoShop’s CSS so my theme works properly.

    I’ve just performed the upgrade and I’m having the same problem. How do I disable JigoShop’s built-in CSS?

    Adding:
    Styles::remove([style_hook]);

    to the end of my theme’s functions.php just breaks the entire site:

    Fatal error: Uncaught Error: Class 'Styles' not found in /var/www/foxbox/wp-content/themes/easel/functions.php on line 427
    PHP7.1 screenshot

    Similarly I don’t understand what this part of the suggested solution means:

    Hooks:
    jigoshop.shop – all shop pages
    jigoshop.user.account – all account pages

    Did you solve the problem in the end @rickblackdog?

    Thread Starter Flamekebab

    (@flamekebab)

    1. That workaround looks to be a workable solution but I’m glad that there’s going to be a proper fix in the near future.

    2. You should now have the login details in your email account.

    Thread Starter Flamekebab

    (@flamekebab)

    Right-o!

    I thought the distinction between product and cart discount was that one would affect just the products in the cart (but not the shipping) and the other would affect everything in the cart.

    I’m experimenting with it now and have found some further strange behaviour.

    1. I don’t have the free shipping method enabled for the coupon and even with a minimum order amount set (e.g. min. £2.99) shipping is considered part of the total that gets discounted. The idea with these coupons is to be able to give free products but shipping is not supposed to be free. Free products are fine but shipping comes out of a separate budget and paying that on some international orders would incur a fairly large loss quite quickly!

    2. Changing quantities in the cart make the coupon appear invalid. Removing it and adding it again fixes the problem.

    I’ve created a short screen capture video to illustrate that problem:
    https://youtu.be/n3SSrLi9yvI

    I’m guessing the solution to all of these problems is to buy the Smart Coupons extension?

    If so I’ll have to keep an eye out for a sale. At the current price ($49) I’d be better off just paying for the shipping costs out of pocket.

    Thread Starter Flamekebab

    (@flamekebab)

    Still waiting on a response, guys.

    Thread Starter Flamekebab

    (@flamekebab)

    This has just happened again.

    I did contact you via email and you reported that you were unable to place an order with incorrect quantities. I thought the problem was solved but apparently whatever is causing the problem is still in the codebase.

    I’m running the latest version of Jigoshop (system report below) and the “do not allow backorders” setting is still not being respected by the checkout.

    Please, please, please look into this issue. I don’t know how to recreate it but I’ll do whatever I can to help figure out what’s causing it.

    ### WordPress Environment ###
    
    Home URL: https://fox-box.co.uk
    Site URL: https://fox-box.co.uk
    Jigoshop Version: 1.17.7
    Jigoshop Database Version: 1503180
    Log Directory Writable: /var/www/foxbox/wp-content/uploads/jigoshop-logs/
    WP Version: 4.3
    WP Multisite: –
    WP Memory Limit: 96 MB
    WP Debug Mode: –
    Language: en_GB
    
    ### Server Environment ###
    
    Server Info: Apache/2.4.7 (Ubuntu)
    PHP Version: 5.5.9-1ubuntu4.9
    PHP Post Max Size: 40 MB
    PHP Time Limit: 30
    PHP Max Input Vars: 1000
    SUHOSIN Installed: –
    MySQL Version: 5.5.43
    eAccelerator: ?
    APC: ?
    OpCache:
    Short Open Tag:
    Allow URL fopen:
    Session:
    Cookie Path: /
    Save Path: /var/lib/php5
    Use Cookies:
    Use Only Cookies:
    Max Upload Size: 40 MB
    Default Timezone is UTC:
    fsockopen/cURL:
    SoapClient:
    Remote Post:
    Remote Get: 
    
    ### Server Locale ###
    
    decimal_point: .
    thousands_sep: N/A
    mon_decimal_point: N/A
    mon_thousands_sep: N/A
    
    ### Active Plugins (16) ###
    
    Akismet: by Automattic – 3.1.3
    Force non-SSL: by Ian Dunn – 0.4
    Google Analyticator: by SumoMe – 6.4.9.5
    Google XML Sitemaps: by Arne Brachhold – 4.0.8
    Jetpack by WordPress.com: by Automattic – 3.6.1
    JigoShop Statistics: by James Kemp – 1.0.1
    Jigoshop Video Product Tab: by Sebs Studio – 1.0
    Jigoshop: by Jigoshop Limited – 1.17.7
    Premium Shipping for Jigoshop: by Jigoshop – 1.4.7
    SEO Ultimate: by SEO Design Solutions – 7.6.5.7
    Site Offline or Coming Soon: by wpecommerce – 1.6.4
    PluginChief Twitter Badge Widget: by Andy Clark
    Brandon Camenisch
    Jason Bahl – 1.75
    
    UK Cookie Consent: by Catapult – 1.8.2
    WP-Mail-SMTP: by Callum Macdonald – 0.9.5
    WP-PageNavi: by Lester 'GaMerZ' Chan – 2.88
    WP-reCAPTCHA: by  – 4.1
    
    ### Settings ###
    
    Taxes Enabled: –
    Shipping Enabled:
    Force SSL: –
    Currency: GBP (£)
    Currency Position: left
    Thousand Separator: ,
    Decimal Separator: .
    Number of Decimals: 2
    
    ### Jigoshop Pages ###
    
    Shop Base: #164 - /shop/
    Cart: #98 - /shopping-basket/
    Checkout: #390 - /checkout/
    Pay: #40 - /pay/
    Thanks: #107 - /checkout-2/thanks/
    My Account: #36 - /my-account/
    Edit Address: #37 - /my-account/edit-address/
    View Order: #38 - /my-account/view-order/
    Change Password: #39 - /my-account/change-password/
    Track Order: #35 - /order-tracking/
    Terms: Page not set
    
    ### Taxonomies ###
    
    Product Types: configurable (configurable)
    downloadable (downloadable)
    grouped (grouped)
    simple (simple)
    variable (variable)
    virtual (virtual)
    
    ### Theme ###
    
    Name: Easel
    Version: 2.0.7
    Author URL: https://frumph.net
    Child Theme: ? – If you're modifying Jigoshop or a parent theme you didn't build personally we recommend using a child theme. See: How to create a child theme
    Jigoshop Support: Not Declared
    
    ### Templates ###
    
    Overrides: easel/index.php
    Thread Starter Flamekebab

    (@flamekebab)

    I’d happily pay $15 to resolve the problem I’m just not okay with the notion that an extra plugin/extension is the answer ??

    Thread Starter Flamekebab

    (@flamekebab)

    The option “do not allow back orders” doesn’t work. That is a bug.

    Thread Starter Flamekebab

    (@flamekebab)

    Thread Starter Flamekebab

    (@flamekebab)

    I gave it another shot and it seems to have worked. Thanks!

    Thread Starter Flamekebab

    (@flamekebab)

    Nope, the problem is still there ??

    Thread Starter Flamekebab

    (@flamekebab)

    minified

    Is that because I’ve got the optimisation option of Jigoshop turned on? Would disabling that be of any help in diagnosing the problem?

    Thanks for your help regardless ??

Viewing 14 replies - 46 through 59 (of 59 total)