Payment name in Customer Panel

  • Posts: 190
  • Thank you received: 0
11 years 7 months ago #66730

Hi,
in Customer Panel / Command History
when commands are created and not payed, customers have the ability to go again to the payment site, clicking on the Payment button.



But why the payment available the listbox is "paypal1" ?
Could it be possible (and where ?) to name it just "Paypal" ?
Thanks.
Regards

Attachments:
Last edit: 11 years 7 months ago by codewarrior.

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
11 years 7 months ago #66930

Hi codewarrior,

The name used in the dropdown is the name of your plugin.
You can change the name in HikaShop > Payment methods, rename the "paypal 1" plugin to, for example "PayPal" and it will be ok.

Please Log in or Create an account to join the conversation.

  • Posts: 190
  • Thank you received: 0
11 years 7 months ago #68098

I'm sorry, but if I sent the post, it's because it's already named "PayPal".
I don't see another configuration element to change !

Please Log in or Create an account to join the conversation.

  • Posts: 81605
  • Thank you received: 13083
  • MODERATOR
11 years 7 months ago #68186

Hi,

You need to change the line:
$method->$name = $method->$type_name.' '.$method->$id_name;

to:
$app = JFactory::getApplication();
$method->$name = $method->$type_name.($app->isAdmin()?' '.$method->$id_name:'');

in the file "administrator/components/com_hikashop/types/plugins.php and that should avoid that.

Please Log in or Create an account to join the conversation.

  • Posts: 190
  • Thank you received: 0
11 years 7 months ago #68257

Unfortunately Nicolas, it's always the same with IE9 or FF
PS : I cleared all caches before

Please Log in or Create an account to join the conversation.

  • Posts: 81605
  • Thank you received: 13083
  • MODERATOR
11 years 7 months ago #68446

My bad. It should be:
$app = JFactory::getApplication();
$method->$name = $method->$type_name.(!$app->isAdmin()?' '.$method->$id_name:'');

Please Log in or Create an account to join the conversation.

  • Posts: 190
  • Thank you received: 0
11 years 6 months ago #70959

Nicolas,
I'm really sorry, but it doesn't change anything.
I still have "paypal1" displayed.
Tested on IE9 & FF, cleared all caches before.

Please Log in or Create an account to join the conversation.

  • Posts: 81605
  • Thank you received: 13083
  • MODERATOR
11 years 6 months ago #71460

I checked on our end and the code I gave in the post #68186 was actually the good one.
I tested the solution and it's working fine. It will be in next release.

Please Log in or Create an account to join the conversation.

  • Posts: 190
  • Thank you received: 0
11 years 6 months ago #73964

Sorry Nicolas, but it doesn't change....

I tried to put
$method->$name = 'test';
before
$this->values[] = JHTML::_('select.option', $method->$type_name.'_'.$method->$id_name, $method->$name );
and it still displays 'paypal1'
is /administrator/components/com_hikashop/types/plugins.php the right file ?

Please Log in or Create an account to join the conversation.

  • Posts: 81605
  • Thank you received: 13083
  • MODERATOR
11 years 6 months ago #74353

That's the right file.

Try to also replace the line:
$name = $type.' '.$id;

by:
$app = JFactory::getApplication();
$name = $type.($app->isAdmin()?' '.$id:'');

in that same file

Please Log in or Create an account to join the conversation.

  • Posts: 190
  • Thank you received: 0
11 years 5 months ago #75552

Hi Nicolas,
now I get "paypal" in lowercase which seems to be the Plugin element name
but not my Hikashop plugin name : "PayPal Test"

The whole code is :

				if(empty($method->$name)){
					if(empty($method->$type_name)){
						$method->$name = '';
					}else{
						// $method->$name = $method->$type_name.' '.$method->$id_name;
						$app = JFactory::getApplication();
						$method->$name = $method->$type_name.($app->isAdmin()?' '.$method->$id_name:''); 
					}
				}
				$this->values[] = JHTML::_('select.option', $method->$type_name.'_'.$method->$id_name, $method->$name );
			}
		}
		if(!$found && !is_array($type)){
			if(empty($type)){
				$name = JText::_('HIKA_NONE');
			}else{
				// $name = $type.' '.$id;
				$app = JFactory::getApplication();
				$name = $type.($app->isAdmin()?' '.$id:'');
			}
			$this->values[] = JHTML::_('select.option', $type.'_'.$id, $name );
		}

Please Log in or Create an account to join the conversation.

  • Posts: 81605
  • Thank you received: 13083
  • MODERATOR
11 years 5 months ago #75878

Hi,

Normally, the payment name is used in the dropdown. But it the system doesn't find it, it uses the payment type instead, which is the case on your website.

We were not able to reproduce the problem though.
I checked your website, but I don't see why you have that dropdown since you only have paypal on your website. You could just remove it altogether by turning off the option "Allow customers to change their payment method after checkout" of the configuration.

Please Log in or Create an account to join the conversation.

  • Posts: 190
  • Thank you received: 0
11 years 5 months ago #77800

Hi Nicolas,
do you mean that there should be no listbox, because I have only one payment method enabled ?

The strange thing is that in my Report editions, I see a SIPS ATOS method with Paypal.
A long time ago, I edited SIPS plugin, but it is now disabled.

I don't know how to remove it.
Regards

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
11 years 5 months ago #77921

Hi,

I have the dropdown too on my end (with only one payment method), so I think that it's normal.

Is it working as you want since you have disabled the option "Allow customers to change their payment method after checkout" ?

Please Log in or Create an account to join the conversation.

Time to create page: 0.098 seconds
Powered by Kunena Forum