Payment name in Customer Panel

  • Posts: 190
  • Thank you received: 0
12 years 2 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: 12 years 2 months ago by codewarrior.

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

  • Posts: 13201
  • Thank you received: 2322
12 years 2 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
12 years 1 month 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: 82868
  • Thank you received: 13376
  • MODERATOR
12 years 1 month 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
12 years 1 month 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: 82868
  • Thank you received: 13376
  • MODERATOR
12 years 1 month 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
12 years 1 month 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: 82868
  • Thank you received: 13376
  • MODERATOR
12 years 1 month 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
12 years 3 weeks 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: 82868
  • Thank you received: 13376
  • MODERATOR
12 years 3 weeks 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
12 years 2 weeks 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: 82868
  • Thank you received: 13376
  • MODERATOR
12 years 2 weeks 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
12 years 6 days 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
12 years 5 days 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.090 seconds
Powered by Kunena Forum