Forum Replies Created

Viewing 15 replies - 1 through 15 (of 21 total)
  • Thread Starter amirhmoradi

    (@amirhmoradi)

    hi, i am surprised by your reply which lacks any solution or progress. In your last 2 updates, i still see the dependency on the SPYC library.

    See the screenshot here (https://ibb.co/QXbfBJ0) with the latest execution of “Code Profiler Pro” where you can see that your plugin “BetterLinks” is the most mentioned in the top longest execution scripts, and mainly because of the SPYC dependecy.

    To reproduce, create a demo woocommerce site, and add your plugin with a couple of links, then run codeprofiler…

    Hi @stiofansisland

    Repeater fields are necessary for complex directories. in my use case, I am creating a directory of service providers: I need to be able to list the pricing plans for each service provider. the plans being quite repetitive, it would be very helpful to have repeater fields.

    Best

    Thread Starter amirhmoradi

    (@amirhmoradi)

    Hi @sadhinsabbir ,

    Thanks for your kind words, i hope you are doing great ??

    Great news for the fix and the upcoming refactored plugin. I am of course interested about the beta!

    In the meanwhile, I had some new features implemented on my projects like for example: aggregation of reviews on related products (“related” does not imply woocommerce variations). There are plugins out there that allow you to connect products together, like iconic linked products, but they do not implement review/rating aggregations…. my next challenge is to add this feature to the “product bundles” ??

    Maybe this is a great differentiator feature to be able to aggregate reviews/ratings of different products.

    Best

    Thread Starter amirhmoradi

    (@amirhmoradi)

    Hi @sadhinsabbir

    In the latest version on the plugin (.27, release about 2 months ago), the issue with the wpFluent thing explained in my previous messages is still there and causing errors still.

    I was wondering when are you planning to fix this issue and also I am curious to know about the upcoming new version’s release date?

    Best

    Thread Starter amirhmoradi

    (@amirhmoradi)

    Hi Dennis,

    Thanks for your answer.

    How to fix the incompatibility with CheckoutWC’s “order received” page then?

    Maybe the configuration on Germanized to add the taxes after subtotals everywhere is the culprit?

    Thread Starter amirhmoradi

    (@amirhmoradi)

    I just found this solution:

    In the code i saw there is a way to make your plugin use caching system, but i dont know why it does not show up in the documentation?

    In my functions.php file, i added the below code and now the calculated prices are cached and served from cache:

    if(!defined('WCPBC_CACHE_AJAXGEO_RESPONSE')){
      define('WCPBC_CACHE_AJAXGEO_RESPONSE', true);
    }

    Please confirm if my understanding is correct and update the documentation.

    Best

    Thread Starter amirhmoradi

    (@amirhmoradi)

    Hi, thanks @isaumya for your prompt reply. I checked the link you shared and this is an exciting feature. I will check it out on my website.

    Warmest.

    Thread Starter amirhmoradi

    (@amirhmoradi)

    Hi ??

    Here is what i achieved as a result trying to fix the my orders page, there are still lots of room for improvements, but the basics are there:

    Here is the code snippet to make it happen until a fix is provided by ReviewX team. (the code can be added to the theme’s functions.php or using a code snippet plugin):

    
    // Add the Column
    add_filter('woocommerce_account_orders_columns', function ($columns) {
        // Add a new column for reviews after the order status column
        $new_columns = [];
    
        foreach ($columns as $key => $name) {
            $new_columns[$key] = $name;
            if ('order-status' === $key) {
                // Add the custom column for reviews
                $new_columns['order-reviews'] = __('Product Reviews', 'reviewx');
            }
        }
    
        return $new_columns;
    });
    
    // Populate the Column
    add_action('woocommerce_my_account_my_orders_column_order-reviews', function ($order) {
        echo '<ul>';
    
        // Initialize an array to track which products have been processed.
        $processed_products = [];
    
        foreach ($order->get_items() as $item_id => $item) {
            $product = $item->get_product();
            $product_id = $product->get_id();
    
            // Skip if the product has already been processed.
            if (in_array($product_id, $processed_products)) {
                continue;
            }
    
            // Add the product ID to the array to avoid processing it again.
            $processed_products[] = $product_id;
    
            // Uncomment the line below to enable checking if the product has been reviewed.
            $bAlreadyReviewed = \ReviewX_Helper::check_already_reviewed($product_id, get_current_user_id(), $order->get_id());
    
            echo '<li>' . esc_html($product->get_name());
            
            if ($bAlreadyReviewed) {
                echo ' (<a style="font-size:0.8em;" class="rx_my_account_view_review rx-btn btn-primary btn-sm rx-form-primary-btn btn-review review-off btn-info rx-order-btn " href="'
                    . esc_url(get_permalink($product_id))
                    . '#tab-reviews" target="_blank">'
                    . esc_html__('View review', 'reviewx')
                    . '</a>)';
            } else {
                echo ' (<a style="font-size:0.8em;" class="rx_my_account_submit_review rx-btn btn-primary btn-sm rx-form-primary-btn btn-review review-on btn-info rx-order-btn " '
                    . ' data-product_id="' . $product_id . ' "'
                    . ' data-order="1"' 
                    . ' data-order_status="' . esc_html__(wc_get_order_status_name($order->get_status()), 'woocommerce') . '"'
                    . ' data-order_id="' . $order->get_id() . '"'
                    . ' data-order_url="' . esc_url($order->get_view_order_url()) . '"'
                    . ' data-product_url="' . get_permalink($product_id) . '"'
                    . ' data-product_img="' . esc_url(wp_get_attachment_image_url($product->get_image_id(), 'thumbnail')) . '"'
                    . ' data-product_name="' . $product->get_name() . '"'
                    . ' data-product_quantity="' . $item->get_quantity() . '"'
                    . ' data-product_price="' . $item->get_subtotal() . '"'
                    .' >'
                    . esc_html__('Submit review', 'reviewx')
                    . '</a>)';
            }
            echo '</li>';
        }
    // Dirty fix for styles and hide and show of the review box...
        echo '</ul>';
    	echo '<script>
    	jQuery(document).ready( function() {
    	jQuery(".review-on").on("click", function(){
    	  jQuery(".woocommerce-orders-table").hide();
    	});
    	jQuery(".rx-cancel").on("click", function(){
    	  jQuery(".woocommerce-orders-table").show();
    	});
    	});</script>';
    	echo '<style>
    	.rx-form-btn{
    	    background-color: #fff;
    		border: 1px solid #aaa;
    		border-radius: 10px;
    	}
    	.rx-form-btn:hover{
    	    color:#000!important;
    	}
    	</style>';
    });
    
    // Include the review form in my orders page using hooks.
    function ax_wc_reviewx_custom_myorderpagemods(){
    	/**
         * Get and show value from admin setting page
         */
        $settings                   = \ReviewX\Controllers\Admin\Core\ReviewxMetaBox::get_option_settings();
        $review_criteria            = $settings->review_criteria;    
        $allow_review_title         = get_option('_rx_option_allow_review_title');  
        $allow_img                  = get_option( '_rx_option_allow_img' );
        $allow_recommendation       = get_option( '_rx_option_allow_recommendation' );
        $rating_style               = $settings->rating_style;
        $allow_video                = get_option( '_rx_option_allow_video' );
        $video_source               = get_option( '_rx_option_video_source' );    
        $allow_anonymouse           = get_option( '_rx_option_allow_anonymouse' );   
    
        /**
         * Show product review from from my account page
         */
        include('/var/www/wp-content/plugins/reviewx/partials/storefront/myaccount/add-review.php');
    
        /*=================================
        *
        * Load review edit template
        *
        *==================================*/
        echo apply_filters( 'rx_edit_review_form', '' );
    }
    add_action('woocommerce_after_account_orders','ax_wc_reviewx_custom_myorderpagemods',100);

    In the list of improvements to add ( @sadhinsabbir ):

    • Add a “My Reviews” menu to be able to manage all my reviews (as a customer), from a new page in my account’s dashboard… As seller, in this new page I would show incentives for my users to review products (coupons, goodies…) as well as provide direct customer support access scenarios.
    • The relation between a given review and an order shall be loosened to allow knowing if a review has ever been given by a user for a product_id, independent of its order_id (see \ReviewX_Helper::check_already_reviewed($product_id, get_current_user_id(), $order->get_id())).
    • Showing all order details in the review collection box on my orders page seems useless to me as it only brings confusing info to the user. Only a small box showing the product image + name + short truncated description + a “Buy Again” call to action button would be great enough. –> Keep the focus on review + sales.
    Thread Starter amirhmoradi

    (@amirhmoradi)

    Hi @sadhinsabbir,

    my pleasure :), just sent the email as you requested.

    Best

    Thread Starter amirhmoradi

    (@amirhmoradi)

    Hi @sadhinsabbir,

    I did reproduce the issue over and over and here is the solution you shall implement to correct the issue (may i get a lifetime licence for the pro version as a gift for this please?) :

    • Rename ALL instances of wpfluent in your code (check for all variations: wpFluent, WpFluent, WPFluent, wp-fluent…, and respect the casing in replacements),
    • Rename the framework’s folder name (app/Services/WPFluent)
    • Rename its auto-load main file (app/Services/WPFluent/wp-fluent.php)
    • Pack, publish, mention me in the changelog ?? and Enjoy!

    Your team chose as a replacement name in one of the last modded tries you sent me, wpfluents, which seems to be working as a name, but the folder rename was not done, so it still crashed because of the way php autoload works. I would choose a name more global at your organization level (wpdevelopper) if the framework is used in other products of yours, maybe wpDevFluent or just revXFL ?

    Please let me know if you need help or more info.

    Best regards.

    Thread Starter amirhmoradi

    (@amirhmoradi)

    Hi @sadhinsabbir, thanks for getting back to me.

    There is still some Fatal Errors happening in the latest file you provided, (i tried only to update an order status in woocommerce):

    [11-Feb-2024 18:00:11 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function ReviewX\Controllers\Admin\Email\wpFluents() in /var/www/vhosts/example.com/html/wp-content/plugins/reviewx/app/Controllers/Admin/Email/EmailSettings.php:334
    Stack trace:
    #0 /var/www/vhosts/example.com/html/wp-content/plugins/reviewx/app/Hooks/Backend.php(83): ReviewX\Controllers\Admin\Email\EmailSettings->processSingleEmail()
    #1 /var/www/vhosts/example.com/html/wp-includes/class-wp-hook.php(326): JoulesLabs\Warehouse\Foundation\Application->{closure}()
    #2 /var/www/vhosts/example.com/html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
    #3 /var/www/vhosts/example.com/html/wp-includes/plugin.php(517): WP_Hook->do_action()
    #4 /var/www/vhosts/example.com/html/wp-content/plugins/woocommerce/includes/class-wc-order.php(411): do_action()
    #5 /var/www/vhosts/example.com/html/wp-content/plugins/woocommerce/includes/class-wc-order.php(253): WC_Order->status_transition()
    #6 /var/www/vhosts/example.com/html/wp-content/plugins/woocommerce/includes/admin/meta-boxes/class-wc-meta-box-order-data.php(714): WC_Order->save()
    #7 /var/www/vhosts/example.com/html/wp-includes/class-wp-hook.php(326): WC_Meta_Box_Order_Data::save()
    #8 /var/www/vhosts/example.com/html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
    #9 /var/www/vhosts/example.com/html/wp-includes/plugin.php(517): WP_Hook->do_action()
    #10 /var/www/vhosts/example.com/html/wp-content/plugins/woocommerce/src/Internal/Admin/Orders/Edit.php(303): do_action()
    #11 /var/www/vhosts/example.com/html/wp-content/plugins/woocommerce/src/Internal/Admin/Orders/Edit.php(152): Automattic\WooCommerce\Internal\Admin\Orders\Edit->handle_order_update()
    #12 /var/www/vhosts/example.com/html/wp-content/plugins/woocommerce/src/Internal/Admin/Orders/PageController.php(350): Automattic\WooCommerce\Internal\Admin\Orders\Edit->setup()
    #13 /var/www/vhosts/example.com/html/wp-content/plugins/woocommerce/src/Internal/Admin/Orders/PageController.php(366): Automattic\WooCommerce\Internal\Admin\Orders\PageController->prepare_order_edit_form()
    #14 /var/www/vhosts/example.com/html/wp-content/plugins/woocommerce/src/Internal/Admin/Orders/PageController.php(167): Automattic\WooCommerce\Internal\Admin\Orders\PageController->setup_action_edit_order()
    #15 [internal function]: Automattic\WooCommerce\Internal\Admin\Orders\PageController->handle_load_page_action()
    #16 /var/www/vhosts/example.com/html/wp-content/plugins/woocommerce/src/Internal/Traits/AccessiblePrivateMethods.php(158): call_user_func_array()
    #17 /var/www/vhosts/example.com/html/wp-includes/class-wp-hook.php(324): Automattic\WooCommerce\Internal\Admin\Orders\PageController->__call()
    #18 /var/www/vhosts/example.com/html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
    #19 /var/www/vhosts/example.com/html/wp-includes/plugin.php(517): WP_Hook->do_action()
    #20 /var/www/vhosts/example.com/html/wp-admin/admin.php(237): do_action()
    #21 {main}
      thrown in /var/www/vhosts/example.com/html/wp-content/plugins/reviewx/app/Controllers/Admin/Email/EmailSettings.php on line 334
    • This reply was modified 9 months, 2 weeks ago by amirhmoradi.
    Thread Starter amirhmoradi

    (@amirhmoradi)

    Hi @sadhinsabbir,

    Please let me know if you have a built version with your modifications that you want me to test.

    Best regards

    Thread Starter amirhmoradi

    (@amirhmoradi)

    Sabbir, I found another annoying issue in the styles applied in the admin side by your plugin: it adds css styles to the whole admin area and not only on its pages, this causes issues with other plugins.

    For example, in your file reviewx/resources/assets/admin/css/reviewx-admin.css you have a css class .step with display: none; that breaks another plugin’s UI (Super Page Cache for CloudFlare), making it unusable.

    I think each plugin shall only apply its styles on its own pages and nothing global. Please fix this too.

    Thread Starter amirhmoradi

    (@amirhmoradi)

    Hi Sabbir,

    Thanks for getting back to me. I tried to install the file provided, but I get an error saying ‘Incompatible Archive.’ when I try to install it, maybe it is the dev version of the project and not the “build” one?


    I did some file comparaison and it seems you renamed your framework to wpFluents (the added S at the end) and in theory it shall work.

    If you could provide an installable version of the plugin with your modification, I can test and let you know.

    Thread Starter amirhmoradi

    (@amirhmoradi)

    Hi,

    Any updates on this issue?

    I still get errors related to your use of “wpfluent” framework

    Best

Viewing 15 replies - 1 through 15 (of 21 total)