Hi all
I'm using OpenCart v1.5.2.1 and got the site for my business nearly complete.
Just wanted to help me in a situation please.
In Step 5 of checkout "Payment method" have three options: paypal / bank transfer / cash-delivery . I would for a category of products that I have, restrict the method cash-delivery, but only for that particular product / category .
The order can have several products, but if it only have one product of that category that no longer will send at cash-delivery.
I certainly need some code to create a function in the checkout when a product appears in checkout , its impossible to pay at cash-delivery.
I hope you can help me , this is a bit urgent for me =\
Thank you
RNRF
Right, but most good programmers don't charge $10 for 30 mins work. You wouldn't get 10 minutes of work from me for that lol. If it's very easy, you should have no problem getting a programmer from a third world country to do this for you for your budget. I can tell you now that Jonathan's put far more than 30 minutes into the module above
The prices of all my extensions reflect the amount of time it takes to create and support them, and I believe they offer a fair value for what they cost. That being said, I understand they are not within everyone's web design budget, so no hard feelings if you are looking for a cheaper solution.RNRF wrote:Price: $35 $30
This is not what im whaiting dude
Hope you find something that works for you!
One of my friends tell one code function to 1.5.1.x version to edit on /catalog/controller/checkout/payment.php
but in my version ( 1.5.2.1 ) This fille does not existe .
next add
18 is category_ids.
next find :
and add next :
but in my version ( 1.5.2.1 ) This fille does not existe .
Code: Select all
if ($this->request->server['REQUEST_METHOD'] == 'POST') {
next add
Code: Select all
$products = $this->cart->getProducts();
$this->load->model('catalog/product');
$hasTargetCat = false;
foreach ($products as $product) {
$temp_product_id = $product['product_id'];
$temp_categories = $this->model_catalog_product->getCategories($temp_product_id);
foreach($temp_categories as $temp_category) {
if($temp_category['category_id']==18)$hasTargetCat=true;
}
}
next find :
Code: Select all
if (isset($this->session->data['payment_methods'])) {
$this->data['payment_methods'] = $this->session->data['payment_methods'];
} else {
$this->data['payment_methods'] = array();
}
Code: Select all
if($hasTargetCat) {
foreach($this->data['payment_methods'] as $kpm=>$vmp) {
if($vmp['code']=='cod')unset ($this->data['payment_methods'][$kpm]);
}
}
Who is online
Users browsing this forum: Majestic-12 [Bot] and 75 guests