• Resolved élisson Costa

    (@nossileee)


    Hello!

    On the product page, when simulating, I have a carrier that does not show the deadline along with the title, but in the description, see how it looks on the product page:

    View post on imgur.com

    But if I go to the cart, you can see the deadline in the description:

    View post on imgur.com

    Would it be possible to help me so that the description of the shipping method is also available on the product page?

    If you want, you can test on the website link

    Thank you.

    The page I need help with: [log in to see the link]

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author rajeshsingh520

    (@rajeshsingh520)

    You will have to contact the shipping method plugin that you are using and find out on which action hook they are adding this message

    Thread Starter élisson Costa

    (@nossileee)

    Hello! I spoke to him yesterday, asking why the delivery time was not included in the title and he replied this:

    “This is a limitation of the simulation plugin, it must be adjusted. Term and title are separate entities, so they are separate. The plugin does not have the unify option”

    I sent your question above to him, I’m waiting for his answer.

    Thread Starter élisson Costa

    (@nossileee)

    Here’s the developer’s answer to your question:

    “is a metadata called jadlog_delivery_time inside the delivery object”

    ====================================

    He complemented saying this, because I asked what other submission plugin I use, the title and deadline go together:

    this is neither right nor wrong. it’s a developer’s choice. woocommerce does not have a general rule.

    But I choose to separate because:

    1. who wants to leave the site organized can modify the style
    2. title and term are related but not the same thing. The post office plugin separates tbm, for example
    3. You may want to refer to this information separately.
    4. in your case you might not care about design or don’t have advanced usage

    regardless of the rules, just follow the standards that it is possible to work.

    He said he has a simulator that works 100% on the cart, but I don’t like his.

    Do you need the plugins to parse?

    Plugin Author rajeshsingh520

    (@rajeshsingh520)

    sorry but i did not understood the response properly

    Try out this below code

    
    add_filter('pisol_ppscw_shipping_method_name', function($title, $rate){
    	$meta_data = $rate->get_meta_data();
    	if(isset($meta_data['jadlog_delivery_time'])){
    		$title .= '('.$meta_data['jadlog_delivery_time'].')';
    	}
    	return $title;
    },10,2);
    Thread Starter élisson Costa

    (@nossileee)

    Hello!
    I tested it here, and it almost worked…

    On the product page, it only included the “7”.
    How do I include a text together, for example:
    “Delivery within 7 business days”

    View post on imgur.com

    Plugin Author rajeshsingh520

    (@rajeshsingh520)

    you can try it like this

    add_filter('pisol_ppscw_shipping_method_name', function($title, $rate){
    	$meta_data = $rate->get_meta_data();
    	if(isset($meta_data['jadlog_delivery_time'])){
    		$title .= '(Delivery within '.$meta_data['jadlog_delivery_time'].' business days)';
    	}
    	return $title;
    },10,2);
    Thread Starter élisson Costa

    (@nossileee)

    Note: There in the result it was like this:
    Jadlog: BRL 70.42(7)

    It would be possible for the term to be next to the title like this:
    Jadlog (7 working days): BRL 70.42

    Thread Starter élisson Costa

    (@nossileee)

    View post on imgur.com

    almost there =)

    Thread Starter élisson Costa

    (@nossileee)

    Obs:

    This is the most used plugin in Brazil for deliveries.
    https://br.www.ads-software.com/plugins/woocommerce-correios/

    He also fails to show the delivery time on his simulator.

    I believe that if you find it interesting, install it and test.
    If it works for him, it will probably work for everyone else.

    Plugin Author rajeshsingh520

    (@rajeshsingh520)

    Uset this code

    add_filter('pisol_ppscw_shipping_method_name', function($title, $rate){
    	$meta_data = $rate->get_meta_data();
    	if(isset($meta_data['jadlog_delivery_time'])){
    		$delivery_msg = sprintf( _n( ' (Delivery within %s business day)', ' (Delivery within %s business days)', $meta_data['jadlog_delivery_time'], 'woocommerce' ), $meta_data['jadlog_delivery_time'] );
    		$parts = explode(':', $title);
    		$title = $parts[0].$delivery_msg.': '.($parts[1] ?? '');
    	}
    	return $title;
    },10,2);
    Thread Starter élisson Costa

    (@nossileee)

    Dude, it was perfect!

    You are too wild!

    Thank you very much ??

    campossmatheus

    (@campossmatheus)

    I’m having the same issue, I applied the code above and it worked for the “Jadlog” shipping method, but I can’t make it work with other methods.

    The plugin for shipping methods is the same (https://br.www.ads-software.com/plugins/woocommerce-correios/), but this time I could’t reach them out to get the right action hook for “Pac” and “Sedex”. That plugin is free and low supported.

    I wonder if you guys could help me out, I think that just replacing the action hook will do it, but either way I don’t know how to get it.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘shipping methods do not appear in your description’ is closed to new replies.