News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Cart login box for anonymous users

Started by thefbi, November 07, 2019, 10:31:34 AM

Previous topic - Next topic

thefbi

Hello,

i want now put a text for anonymous users that the bank transfer in no available. I have tried to change the traduction string "COM_VIRTUEMART_CHECKOUT_AS_GUEST" but it appear in the button too.
Can you tell me what file i have to modify in the view to add a text string (see screenshot) ?
I dont find the view in the folders.

Regards,
Frédéric

VM 3.6.8 10197
Joomla 3.9.13

Milbo

I would create an override for select_payment.php of the cart view.

There is a foreach

foreach ($this->paymentplugins_payments as $paymentplugin_payments) {
if (is_array($paymentplugin_payments)) {
foreach ($paymentplugin_payments as $paymentplugin_payment) {
echo '<div class="vm-payment-plugin-single">'.$paymentplugin_payment.'</div>';
}
}
}


I would add an if, checking for the id of the method, if it appears, show no text, if not, show text



$there = false
foreach ($this->paymentplugins_payments as $paymentplugin_payments) {
if (is_array($paymentplugin_payments)) {
foreach ($paymentplugin_payments as $id=> $paymentplugin_payment) {
echo '<div class="vm-payment-plugin-single">'.$paymentplugin_payment.'</div>';
if($id ="3") $there =true;
}
}
}
if(!$there) echo ....


Something like, I am not sure if foreach ($paymentplugin_payments as $id=> $paymentplugin_payment) { has really the correct Id, but I think I wrote the array that way
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/