Forum Replies Created

Viewing 15 replies - 31 through 45 (of 50 total)
  • @iarovuo @ksansone Very strange… I use a child theme of Divi (latest version installed) that doesn’t break the Square plugin as you’ve described. I wonder what the difference is between my setup and yours.

    What is your system of record, square or WC?

    @robbcool It could be an extension/plugin or security setting in your Chrome browser. I’ve had similar issues that were resolved by disabling all my extensions. Something to keep in mind if you prefer working in Chrome.

    Absolutely can not have system of record as WooCommerce, there are over 6000 inventory items in Square. My client uses the Square POS hardware in their physical store front.

    When Square is set as the system of record, any editing of products that are synced to Square need to be handled in Square itself, as it will override anything done in the Products section of WooCommerce with information from Square.

    There is no place in Square to set weights and measurements which is needed for shipping calculations. So are you saying that in order to set weights and measurements in order to do shipping calculations, WooCommerce has to be set as the system of record? I’m not changing stock quantity, or any data columns that are synced with Square, only weights and measurements. Changing these fields should have no effect on it’s stock, and therefore, no effect on syncing with Square. It makes no sense.

    I wish not using Square was an option but that is the POS of my clients brick-n-mortar record shop and they have 6K+ products in it and use Square’s hardware POS in the store. I’ve experienced many bugs with 2.x as well and wish I could just use the last 1.x version, but thats not an option due to lack of some features. For the most part, I have managed to trouble-shoot and work around most of the bugs of 2.x, mostly through custom “hacks” in the themes functions.php file and I suppose one could work-around this issue as well by either immediately going back into quick edit to input the stock then change the “sync to square” to “yes” again… or by bulk editing the entire inventory to set “sync to square” to “yes” then going to “update” section in the square plugin settings to run a manual update/sync to correctly set the stock on those items. But, although this works in my current situation, it won’t work in every situation, and it’s tremendously inefficient.

    I just created a post regarding the same issue before I saw this. I am using quick edit to set weights and measurements for hundreds of products but when I make ANY edits using quick edit it changes the stock to zero and turns off sync to square. Didn’t even notice it before I got through 40+ products. Don’t know if this is something to do with core WooCommerce or the Square plugin. I can’t correctly setup my shipping without setting weights and measurements so this is HUGE pain in the back-side. Any advice to remedy this would be appreciated. @avianaddiction if you come across a solution please let me know!

    I noticed you are running a 5.x version of PHP. I’d update it if you can. If not, this will get the soap client installed on your server:

    sudo apt-get install php-soap
    sudo systemctl restart apache2

    You need to install/enable the Soap Client class in your PHP config. Square will not work without it. You may not even be able to do this depending on what kind of hosting you have. If it’s a shared hosting envorinment you may be out of luck. But if you can SSH into your server and install the soap client and edit your php.ini file to enable it, you should be good.

    Check your php.ini file for something like this: extension=php_soap.dll or extension=soap and remove the semicolon to the left of it to uncomment it, save the file, and restart your server. If you can’t find anything like that in your php.ini file then you likely don’t have the soap client installed. To install it on Debian based Apache servers the following should work:

    sudo apt-get install php7.0-soap
    sudo systemctl restart apache2.service

    The version number in that first line, php7.0-soap, depends on the version of PHP the site is running. So if it’s PHP 7.2 you should change it to php7.2-soap

    • This reply was modified 4 years, 11 months ago by Richard Bakos.
    • This reply was modified 4 years, 11 months ago by Richard Bakos.
    Thread Starter Richard Bakos

    (@resonancedesigns)

    Indeed it did sync the product descriptions. Thanks!

    Thread Starter Richard Bakos

    (@resonancedesigns)

    Since when? I had to use 2.0.x versions before on other sites and the product description most certainly did sync, that’s why I upgraded on this site. There’s no way to force a product description to sync? Nothing I can add the theme’s function file?

    I’m all on board with “downgrading”… 1.x just works and 2.x does not.

    I was trying to get an online shop launched for Black Friday and it’s been nothing but problems out of the gate.

    Attributes don’t sync, syncs constantly stall, I get error messages saying I don’t have priveledges to sync certain inventory items when I try to do a manual sync from “update”, it’s not grabbing some of the products images, visitors get a timeout every single time they submit an order even though the order does go through to the site and square, and customer emails are not being sent even though notification emails are being sent to admins/store owners.

    I have gone through ALL of the troubleshooting. The server is fine, it meets all specifications and beyond, and I’ve disabled every plugin with exception of the woocommerce and used the default theme. Everything still craps out the same regardless.

    Why on earth you guys released this to the public I haven’t the foggiest as it’s evident you cleary didn’t do enough testing before putting this out in the wild.

    Richard Bakos

    (@resonancedesigns)

    Same issue. The Square account info and the information in the WooCommerce settings match. Latest versions of all plugins and WordPress… Just ignoring the message for now as it looks as though it IS connected. I created my own fork of the plugin that I plan on mainting for myself to try and fix this and to add other features, like scheduling products to be published on a future date from when they are synced from Square in order to give foot traffic of the physical store priority over the online store since this isn’t possible with the hooks they make available to devs/theme builders.

    Richard Bakos

    (@resonancedesigns)

    I have this same issue currently. Latest version of Divi (3.29.3) and latest version of Swift Performance Lite (2.1)

    I did as suggested and disabled both “Static CSS File Generation” in the Divi settings and “Merge Styles” in the Swift settings.

    In the console I see:
    TypeError: e is undefined in bundle.js

    This leads me to believe it’s an issue with Swift interrupting Divi’s JS generation/bundling or something along those lines.

    Previously, I had been using Divi 3.23.1 with Swift and it was working fine. I chose not to update Divi until now so it’s since that 3.23.1 version that the issue crept in.

    Thread Starter Richard Bakos

    (@resonancedesigns)

    Another way to go about this just occurred to me… Could the plugin be told to check the date for inventory items in Square as it’s looping though them, BEFORE it imports them into the WP database? … some kind of if statement that only imports records that are at least a month old? As well as addressing the root issue, an option like this would also help to reduce unnecessarily used database storage and resources.

    Thread Starter Richard Bakos

    (@resonancedesigns)

    I’m back… So I tried this, and it works to set certain post statuses and product visibility but there is no way to set a date with that filter. Ideally I want to set the post status to ‘future’ and then set a future date so the product will automatically be scheduled to go live on the site on that date…. Here is the simplest approach I tried in my functions.php file:

    function square_sync_delay( $data ) {
    	$data['status'] = 'future';
    	$data['date'] = '2020-02-23 18:57:33';
    	return $data;
    }
    add_filter('woocommerce_square_create_product_data', 'square_sync_delay');

    Products still sync using that, nothing breaks, but it doesn’t take the date and the status defaults to ‘draft’ since the date isn’t being set in the future…

    I was able to get this to work exactly how I want, but only in a DESTRUCTIVE manner by adding to the plugins /includes/Sync/Product_Import.php file:

    $new_product = [
        'post_title'   => wc_clean( $data['title'] ),
        'post_status'  => isset( $data['status'] ) ? wc_clean( $data['status'] ) : 'future', // RD: Changed from 'publish' to 'future' - MAKE DYNAMIC
        'post_type'    => 'product',
        'post_date'    => '2020-02-23 18:57:33', // RD: Added date customization - MAKE DYNAMIC
        'post_content' => isset( $data['description'] ) ? $post_content : '',
        'post_author'  => get_current_user_id(),
        'menu_order'   => isset( $data['menu_order'] ) ? (int) $data['menu_order'] : 0,
    ];

    The comments in the code explain what I changed/added. By default, the plugins product constructor code sinppet I modified doesn’t specify ‘post_date’ so it uses the WP default of the current date and time. With it modified like this though, it works just as I would expect and want it to.

    In addition to this I would also love to make the ‘post_date’ and ‘post_status’ data dynamic and put options for them in the admin woocommerce-square settings for “Publish Settings” where admins can pick the default post status for synced products from a dropdown (published, draft, future) as well as date presets with options like “1 Week from Sync”, “1 Month from Sync”, “3 Months from Sync” etc…

    I would love a way to either A) At least be able to do this from my theme. Or B) See this in a future iteration of the plugin.

    Is there a git repo for this plugin that I can fork? I’ve already started building this myself and am willing to maintain my own modified branch of the plugin just so I can have this feature.

    If there is in fact a way I can do this in my theme using that filter or perhaps a combination of some things, and I am just missing something, please clue me in… but I really think it’d be a nice thing to bake into the plugin itself.

    • This reply was modified 5 years, 2 months ago by Richard Bakos.
    Thread Starter Richard Bakos

    (@resonancedesigns)

    I was not able to download this file before it was deleted and so the error still persists. Please, upload it again and I promise to be prompt about retrieving the file this time.

Viewing 15 replies - 31 through 45 (of 50 total)