- Posts: 69
- Thank you received: 0
No shipping method selected
12 years 11 months ago #128780
by dreads
No shipping method selected was created by dreads
How I can set up a message when no shipping method selected?
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 12953
- Thank you received: 1778
12 years 11 months ago - 12 years 11 months ago #128807
by Mohamed Thelji
Replied by Mohamed Thelji on topic No shipping method selected
Hi,
You'll be able to do it by editing the code of your "shipping" file of your "checkout" view of your front-end template through "Hikashop->Display->Views", but some development skill will be required to do that.
A solution will probably be to change this line :
By :
These lines :
By :
And this line :
By :
Note that you'll be able to change the text "Please select a shipping method" by your message.
You'll be able to do it by editing the code of your "shipping" file of your "checkout" view of your front-end template through "Hikashop->Display->Views", but some development skill will be required to do that.
A solution will probably be to change this line :
Code:
foreach($this->rates as $rate) {
Code:
$shipping_checked = 0;
foreach($this->rates as $rate) {
Code:
if((in_array($rate->shipping_type.'@'.$shipping_group_key, $this->shipping_method) && in_array($rate->shipping_id.'@'.$shipping_group_key, $this->shipping_id)) || ($auto_select_default && empty($this->shipping_id) && !$done)) {
$done = true;
$checked = 'checked="checked"';
}
Code:
if((in_array($rate->shipping_type.'@'.$shipping_group_key, $this->shipping_method) && in_array($rate->shipping_id.'@'.$shipping_group_key, $this->shipping_id)) || ($auto_select_default && empty($this->shipping_id) && !$done)) {
$done = true;
$checked = 'checked="checked"';
$shipping_checked = 1;
}
Code:
$k = 1-$k;
}
Code:
$k = 1-$k;
}
if($shipping_checked == 0){
$app = JFactory::getApplication();
$app->enqueueMessage('Please select a shipping method');
}
Note that you'll be able to change the text "Please select a shipping method" by your message.
Last edit: 12 years 11 months ago by Mohamed Thelji.
The following user(s) said Thank You: dreads
Please Log in or Create an account to join the conversation.
12 years 11 months ago #128835
by dreads
Replied by dreads on topic No payment methods selected
Perfect.
Now feel the same way but with payment methods.
What file should I change lines?
Now feel the same way but with payment methods.
What file should I change lines?
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 12953
- Thank you received: 1778
12 years 11 months ago #128854
by Mohamed Thelji
Replied by Mohamed Thelji on topic No shipping method selected
You should edit the code of the "payment" file of the "checkout" view of your front-end template.
Please Log in or Create an account to join the conversation.
12 years 11 months ago #128977
by dreads
Replied by dreads on topic No shipping method selected
What lines should I change?
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 12953
- Thank you received: 1778
12 years 11 months ago - 12 years 11 months ago #129025
by Mohamed Thelji
Replied by Mohamed Thelji on topic No shipping method selected
You'll have to change these lines (which is appearing 2 times) :
By :
These lines (which are appearing 2 times) :
By :
The last 3 lines :
By :
Code:
foreach($this->methods as $method){
Code:
$payment_checked = 0;
foreach($this->methods as $method){
Code:
if(($this->payment_method==$method->payment_type && $this->payment_id==$method->payment_id)|| ($auto_select_default && empty($this->payment_id)&&!$done)){
$checked = 'checked="checked"';
$done = true;
}
Code:
if(($this->payment_method==$method->payment_type && $this->payment_id==$method->payment_id)|| ($auto_select_default && empty($this->payment_id)&&!$done)){
$checked = 'checked="checked"';
$payment_checked = 1;
$done = true;
}
Code:
<?php
}
}
}
Code:
<?php
}
if($payment_checked == 0){
$app = JFactory::getApplication();
$app->enqueueMessage('Please select a payment method');
}
}
Last edit: 12 years 11 months ago by Mohamed Thelji.
The following user(s) said Thank You: dreads
Please Log in or Create an account to join the conversation.
Time to create page: 0.181 seconds