Skip to main content

[solved] Add packaging costs to final price

More
14 years 5 months ago - 14 years 5 months ago #46644 by bigboytbh
Hello,

I didn't find a solution on the documentation, neither on the forums (sorry if it's there but I haven't seen it).

[SOLVED] I need to add packaging cost to my final price that will always be fixed, no matter the products ordered.
It has to show itself on the checkout page under the list of ordered products
and it has to be included in the final price.
Is there a simple way to do this or do I have to develop a php plug-in using the APIs?

Thanks in advance!

EDIT: Another question:
[SOLVED] How do I get the total number of ordered items at the "end" phase of checkout?
Which PHP variable should I call?
Is it something like $product->$quantity ?
Last edit: 14 years 5 months ago by bigboytbh.

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

More
14 years 5 months ago #46794 by nicolas
That's easy, just create one manual shipping method with your price.
Don't forget to either set a weight in your products or turn on the option "force shipping regardless of weight" in the configuration.

You can do like that:
Code:
$order_id = JRequest::getInt('order_id'); $order =null; if(!empty($order_id)){ $orderClass = hikashop_get('class.order'); $order = $orderClass->loadFullOrder($order_id); foreach($order->products as $product){ echo $product->order_product_quantity; } }
The following user(s) said Thank You: bigboytbh

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

More
14 years 5 months ago #46821 by bigboytbh
Thank you, I'll try this later today and will post results!

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

More
14 years 5 months ago #46833 by kamastudio
Thanks for the advice!

I don't know what the code is for, but all I did was go to System-Shipping Methods and enable the "HikaShop manual shipping plugin". Then clicked on "HikaShop manual shipping plugin" and created a new shipping method, named it "shipping" and published it. Then I went to System-Configuration and turned on the option "force shipping regardless of weight" and BAM! It worked perfectly. I am charging a flat rate of $10 for shipping so this worked perfectly for me. Thank you very much

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

More
14 years 5 months ago - 14 years 5 months ago #46837 by bigboytbh
Nice, I turned on the "force shipping regardless of weight" option and it worked like charm, thanks nicolas!

For the product quantity, I needed it after confirmation (along with the "Thanks for purchase" text).
It didn't echo anything with this code when put into 'checkout / end.php' nor into 'checkout / confirm.php',
so I wrote a javascript to take all values from the quantity fields at checkout,
it takes their sum, stores it as a cookie and shows it after confirmation (then deletes the cookie). Seems to work just fine.

Yet more questions :­)
1) in a new thread
2) [SOLVED] How can I request a client to accept conditions (with link to pdf) at checkout, before confirmation? (solved by adding it to workflow)
Last edit: 14 years 5 months ago by bigboytbh.

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

Time to create page: 0.233 seconds
Powered by Kunena Forum