hi guys, i need a help, i want the payment information page not to exist in checkout process at all, i mean, from the products page, when clicking checkout button to go to the checkout confirmation page immediately.
any ideas about this please?
any ideas about this please?
Try this:
Edit catalog/controller/checkout_shipping.php.
Change all instances of:
checkout_payment
to
checkout_confirm
Edit catalog/controller/checkout_confirm.php
Change:
to:
Change:
$view->set('checkout_payment', $url->ssl('checkout_payment'));
to
$view->set('checkout_shipping', $url->ssl('checkout_shipping'));
Change:
$view->set('back', $url->ssl('checkout_payment'));
to
$view->set('back', $url->ssl('checkout_shipping'));
Change:
$view->set('checkout_payment_address', $url->ssl('checkout_address', 'payment'));
to:
$view->set('checkout_payment_address', $url->ssl('checkout_address', 'shipping'));
Edit catalog/controller/checkout_shipping.php.
Change all instances of:
checkout_payment
to
checkout_confirm
Edit catalog/controller/checkout_confirm.php
Change:
Code: Select all
if (!$session->get('payment_method')) {
$response->redirect($url->ssl('checkout_payment'));
}
if (!$payment->hasMethod($session->get('payment_method'))) {
$response->redirect($url->ssl('checkout_payment'));
}
Code: Select all
if ($session->get('payment_method')) {
$response->redirect($url->ssl('checkout_payment'));
}
if ($payment->hasMethod($session->get('payment_method'))) {
$response->redirect($url->ssl('checkout_payment'));
}
$view->set('checkout_payment', $url->ssl('checkout_payment'));
to
$view->set('checkout_shipping', $url->ssl('checkout_shipping'));
Change:
$view->set('back', $url->ssl('checkout_payment'));
to
$view->set('back', $url->ssl('checkout_shipping'));
Change:
$view->set('checkout_payment_address', $url->ssl('checkout_address', 'payment'));
to:
$view->set('checkout_payment_address', $url->ssl('checkout_address', 'shipping'));
Ah i see you want to completely skip shipping and payment. Though, if nobody is paying and nobody is shipping. Why do you need a store? Wouldn't it just be a bunch of information and download links?
You can edit the catalog/extension/module/header.php file and change the checkout_shipping to checkout_confirm.
but then you need to edit catalog/controller/checkout_confirm to replace all references to shipping and payment data and set them to null
You can edit the catalog/extension/module/header.php file and change the checkout_shipping to checkout_confirm.
but then you need to edit catalog/controller/checkout_confirm to replace all references to shipping and payment data and set them to null
Last edited by Qphoria on Tue Sep 23, 2008 9:39 pm, edited 1 time in total.
It might be a case of only wanting an ordering process eg. a wholesaler taking orders online and then shipping is calculated offline and payment is by account or something like that.Qphoria wrote: Though, if nobody is paying and nobody is shipping. Why do you need a store?
Hi,
First of all you can avoid the shipping pages by setting all of your products to not require shipping. You do this in the product section of your store admin.
To avoid the payment section, you can modify catalog\controller\checkout_payment as follows (only the beginning is shown)
you then modify catalog\controller\checkout_confirm.php so that it does not check for payment info in the session by removing or commenting out the entire block shown below
You will probably have to change some other bits to fix up the checkout_confirmation template etc but this will give you the navigation model that you want.
cheers
Bruce
First of all you can avoid the shipping pages by setting all of your products to not require shipping. You do this in the product section of your store admin.
To avoid the payment section, you can modify catalog\controller\checkout_payment as follows (only the beginning is shown)
Code: Select all
class ControllerCheckoutPayment extends Controller {
var $error = array();
function index() {
$address =& $this->locator->get('address');
$cart =& $this->locator->get('cart');
$config =& $this->locator->get('config');
$customer =& $this->locator->get('customer');
$database =& $this->locator->get('database');
$language =& $this->locator->get('language');
$module =& $this->locator->get('module');
$payment =& $this->locator->get('payment');
$request =& $this->locator->get('request');
$response =& $this->locator->get('response');
$session =& $this->locator->get('session');
$shipping =& $this->locator->get('shipping');
$tax =& $this->locator->get('tax');
$template =& $this->locator->get('template');
$url =& $this->locator->get('url');
if (!$customer->isLogged()) {
$session->set('redirect', $url->ssl('checkout_shipping'));
$response->redirect($url->ssl('account_login'));
}
if ((!$cart->hasProducts()) || ((!$cart->hasStock()) && (!$config->get('config_stock_checkout')))) {
$response->redirect($url->ssl('cart'));
}
if ($cart->hasShipping()) {
if (!$session->get('shipping_method')) {
$response->redirect($url->ssl('checkout_shipping'));
}
if (!$shipping->getQuote($session->get('shipping_method'))) {
$response->redirect($url->ssl('checkout_shipping'));
}
if (!$address->has($session->get('shipping_address_id'))) {
$response->redirect($url->ssl('checkout_address', 'shipping'));
}
}
else
{
$session->delete('shipping_address_id');
$session->delete('shipping_method');
}
// add fixed redirect here to avoid payment screens
$response->redirect($url->ssl('checkout_confirm'));
if (!$address->has($session->get('payment_address_id'))) {
$session->set('payment_address_id', $session->get('shipping_address_id'));
}
Code: Select all
if (!$session->get('payment_method')) {
$response->redirect($url->ssl('checkout_payment'));
}
if (!$payment->hasMethod($session->get('payment_method'))) {
$response->redirect($url->ssl('checkout_payment'));
}
if (!$address->has($session->get('payment_address_id'))) {
$response->redirect($url->ssl('checkout_address', 'payment'));
}
cheers
Bruce
Thanks Bruce, I did The Way You said, it kinda skipped the payment and shipping step but now it has an error in payment.php at the top of my site
Notice: Undefined index: in /usr/home/schirnho/public_html/upload/library/cart/payment.php on line 59
Notice: Undefined index: in /usr/home/schirnho/public_html/upload/library/cart/payment.php on line 49
Notice: Undefined index: in /usr/home/schirnho/public_html/upload/library/cart/payment.php on line 49
Notice: Undefined index: in /usr/home/schirnho/public_html/upload/library/cart/payment.php on line 49
Notice: Undefined index: in /usr/home/schirnho/public_html/upload/library/cart/payment.php on line 65
help me out please.
Notice: Undefined index: in /usr/home/schirnho/public_html/upload/library/cart/payment.php on line 59
Notice: Undefined index: in /usr/home/schirnho/public_html/upload/library/cart/payment.php on line 49
Notice: Undefined index: in /usr/home/schirnho/public_html/upload/library/cart/payment.php on line 49
Notice: Undefined index: in /usr/home/schirnho/public_html/upload/library/cart/payment.php on line 49
Notice: Undefined index: in /usr/home/schirnho/public_html/upload/library/cart/payment.php on line 65
help me out please.
Last edited by Zviadi on Thu Sep 25, 2008 6:48 pm, edited 1 time in total.
You need to trick opencart into thinking you have a payment method picked.
At the beginning of checkout_confirm.php do something like this (extra code shown for positioning).
You can change the template to not show the payment method on the checkout confirmation page. You will have to change the other templates that show payment method as well but this is the quickest way to do what you want.
At the beginning of checkout_confirm.php do something like this (extra code shown for positioning).
Code: Select all
if (!$customer->isLogged()) {
$session->set('redirect', $url->ssl('checkout_shipping'));
$response->redirect($url->ssl('account_login'));
}
// trick is here
$session->set('payment_method', 'cod');
here is an error
Notice: unserialize() [function.unserialize]: Error at offset 1166 of 4952 bytes in /usr/home/schirnho/public_html/upload/library/cart/order.php on line 56
Warning: Cannot modify header information - headers already sent by (output started at /usr/home/schirnho/public_html/upload/library/cart/order.php:56) in /usr/home/schirnho/public_html/upload/library/environment/response.php on line 23
Notice: unserialize() [function.unserialize]: Error at offset 1166 of 4952 bytes in /usr/home/schirnho/public_html/upload/library/cart/order.php on line 56
Warning: Cannot modify header information - headers already sent by (output started at /usr/home/schirnho/public_html/upload/library/cart/order.php:56) in /usr/home/schirnho/public_html/upload/library/environment/response.php on line 23
Who is online
Users browsing this forum: No registered users and 1 guest