- Posts: 109
- Thank you received: 5
Automatically Add Extra Shipping Charge
11 years 4 months ago #203227
by Ed_Hika
Replied by Ed_Hika on topic Automatically Add Extra Shipping Charge
Thanks, Mohamed Thelji.
Please could you tell me where the user state "HIKASHOP_COMPONENT.'.shipping_id'" is initially set in the checkout process?
It seems that this value is already set when the __construct in controllers/checkout.php is run (when the checkout button is clicked).
Thanks.
Take care!
Please could you tell me where the user state "HIKASHOP_COMPONENT.'.shipping_id'" is initially set in the checkout process?
It seems that this value is already set when the __construct in controllers/checkout.php is run (when the checkout button is clicked).
Thanks.
Take care!
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 12953
- Thank you received: 1778
11 years 4 months ago #203228
by Mohamed Thelji
Replied by Mohamed Thelji on topic Automatically Add Extra Shipping Charge
Hello !
It's set through the "before_shipping" function of the file "components\com_hikashop\controllers\checkout.php".
It's set through the "before_shipping" function of the file "components\com_hikashop\controllers\checkout.php".
Please Log in or Create an account to join the conversation.
11 years 4 months ago #203428
by Ed_Hika
Replied by Ed_Hika on topic Automatically Add Extra Shipping Charge
Thanks, Mohamed Thelji.
The value is set in __construct (in controllers/checkout.php ) as was mentioned earlier. This is called before the before_shipping function is called. Hence, your answer that the value is initially set in before_shipping is not quite correct.
I need to know the first place when the value is set.
Please could you tell me which code sets the value the first time?
Thanks.
Take care!
The value is set in __construct (in controllers/checkout.php ) as was mentioned earlier. This is called before the before_shipping function is called. Hence, your answer that the value is initially set in before_shipping is not quite correct.
I need to know the first place when the value is set.
Please could you tell me which code sets the value the first time?
Thanks.
Take care!
Please Log in or Create an account to join the conversation.
11 years 3 months ago #204596
by Ed_Hika
Replied by Ed_Hika on topic Automatically Add Extra Shipping Charge
Hello, Mohamed Thelji.
Good evening!
Yes, you are right; the values are set in before_shipping.
Please could you advise what code I can use to call the before_shipping function from the components/com_hikashop/views/product/view.html.php file?
Thanks.
Take care!
Good evening!
Yes, you are right; the values are set in before_shipping.
Please could you advise what code I can use to call the before_shipping function from the components/com_hikashop/views/product/view.html.php file?
Thanks.
Take care!
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 12953
- Thank you received: 1778
11 years 3 months ago - 11 years 3 months ago #204601
by Mohamed Thelji
Replied by Mohamed Thelji on topic Automatically Add Extra Shipping Charge
Hello !
That function is defined through the "Checkout" Controller via : "components\com_hikashop\controllers\checkout.php"
If you want to have access to it through your product view/controller you'll have to create another function which will do the same thing.
That function is defined through the "Checkout" Controller via : "components\com_hikashop\controllers\checkout.php"
If you want to have access to it through your product view/controller you'll have to create another function which will do the same thing.
Last edit: 11 years 3 months ago by Mohamed Thelji.
Please Log in or Create an account to join the conversation.
11 years 3 months ago #204735
by Ed_Hika
Replied by Ed_Hika on topic Automatically Add Extra Shipping Charge
Thanks, Mohamed Thelji.
Yes, I had already copied the relevant code from components\com_hikashop\controllers\checkout.php hitherto.
What I didn't want was to end up with 2 bits of code that does the same thing. Is there another way (e.g. to call the function in checkout.php from the view.html.php)? If so, how?
Thanks for your help.
Take care!
Yes, I had already copied the relevant code from components\com_hikashop\controllers\checkout.php hitherto.
What I didn't want was to end up with 2 bits of code that does the same thing. Is there another way (e.g. to call the function in checkout.php from the view.html.php)? If so, how?
Thanks for your help.
Take care!
Please Log in or Create an account to join the conversation.
11 years 3 months ago #204737
by nicolas
Replied by nicolas on topic Automatically Add Extra Shipping Charge
Hi,
You can include the file with the normal PHP include_once function and then initialize the controller class and call its function.
You can include the file with the normal PHP include_once function and then initialize the controller class and call its function.
Please Log in or Create an account to join the conversation.
Time to create page: 0.271 seconds