Public Ticket #3984412

Añadir características a traves de codigo

Closed
Comments
1 Ticket
Morelav started the conversation 1 year ago on May 6, 2025 at 4:11pm

Deseo realizar varias acciones

  • Agregar la columna de precio unitario al formulario de pedido masivo en el tema clásico. 
  • Agregar la descripción y precio del producto en el resultado de búsqueda del formulario de pedido masivo. 
  • Reordenar los items de la cuenta de usuario "my account"
2,762
KingsPlugins replied 1 year ago on May 8, 2025 at 2:49pm

Hello Morelav,

Thank you for purchasing our plugin,

 

-> Regarding adding the price there:

Unfortunately I do not have a way to create a custom column with the price because this template is quite fixed and doesn't support that.

However, you can add it to search results, by adding this code snippet:

add_filter('b2bking_classic_order_form_display_title', function($title, $product){
	if( $product->is_on_sale() ) {
		$product_price = $product->get_sale_price();
	} else {
		$product_price = $product->get_regular_price();	
	}
	$product_price = wc_price($product_price);


	return $title.' '.$product_price;
}, 10, 2);

This will result in:

5059296626.png

and:

3117560276.png

 

Similarly, in that code, you can also add

$description = $product->get_description();
$short_description = $product->get_short_description();

to get the description and short description and append them to the title. 

For example:

add_filter('b2bking_classic_order_form_display_title', function($title, $product){
	if( $product->is_on_sale() ) {
		$product_price = $product->get_sale_price();
	} else {
		$product_price = $product->get_regular_price();	
	}
	$product_price = wc_price($product_price);

	$description = $product->get_description();
	$short_description = $product->get_short_description();

	return $title.' '.$product_price.' '.$short_description;
}, 10, 2);

 

Search results will then show TITLE + PRICE + SHORT DESCRIPTION.

 

-> It's possible to reorder items under my account using a code snippets or a specialised my account plugin like the Yith account plugin.

We can help send you the code snippet needed, if you let me know what order you wish to achieve.

 

Kind regards,

Stefan

1 Ticket
Morelav replied 1 year ago on May 9, 2025 at 7:30pm

Hola,

Muchas gracias, ha funcionado lo que me has enviado. Aún me quedan dos dudas. 

Primero confirmar la posibilidad de colocar el precio tal como ustedes lo muestran en el tema cream, tal como lo muestran aquí https://b2bkingplugin.com/docs/wholesale-bulk-order-form/#13-toc-title

2376116831.png

Lo segundo es que deseo cambiar el orden y texto en el menú de la cuenta y no sé donde puedo ver los ítems que trae el plug-in. Quiero cambiar el orden o la posición con la que se están mostrando.

4307389968.png

Gracias de antemano, saludos

2,762
KingsPlugins replied 1 year ago on May 14, 2025 at 10:51pm

Hello Morelav,

Thank you for your message. 

1. Regarding displaying the price column in the bulk order form:
It is currently only possible to display the price column in the Cream theme. Unfortunately, this feature is not available in the Classic or Indigo themes.

 

2. Regarding the order of items in the account menu:
I can provide you with custom code to rearrange the items as you wish. Please let me know your specific preferred order (for example: 1. Bulk Order, 2. Dashboard, 3. Orders, etc.) and I will send you the corresponding code.

 

Kind regards,
Stefan

Sign In