Search found 67 matches

Search found 67 matches

Re: Redirect to checkout if more than 2 manufacturer_ids with cart module

I've tried in module/cart.php after foreach ($this->cart->getProducts() as $product) { : /* Manufacturer Mod */ $product_total = 0; foreach ($this->cart->getProducts() as $product_2) { $product_total = 0; if ($product_2['manufacturer_id'] != $product['manufacturer_id'] && $this->request->get['route'...

Jump to post
  • Thu Jan 17, 2019 11:02 am
  • Replies 21
  • Views 988
Re: Redirect to checkout if more than 2 manufacturer_ids with cart module

Customers may want to be informed whenever this restriction implies versus redirection without considering the Event Management during the process. How can I run my code exactly after the product/s is/are added? Or print the alert since then on $(document).ready(function() ? // $this->redirect($thi...

Jump to post
  • Thu Jan 17, 2019 4:38 am
  • Replies 21
  • Views 988
Re: Redirect to checkout if more than 2 manufacturer_ids with cart module

Using the same code I used before I got the function, in module/cart, after foreach ($this->cart->getProducts() as $product) { /* Manufacturer Mod */ $product_total = 0; foreach ($this->cart->getProducts() as $product_2) { $product_total = 0; if ($product_2['manufacturer_id'] != $product['manufactur...

Jump to post
  • Wed Jan 16, 2019 5:59 pm
  • Replies 21
  • Views 988
Re: Redirect to checkout if more than 2 manufacturer_ids with cart module

This should provide what you need. First of all, thanks for your support/help- I understand the code, but it doesn't make the function and the cart module disappear when I click to view the items that contains. Is that the easiest way to check and redirect (not necessary the warning, but redirect o...

Jump to post
  • Wed Jan 16, 2019 5:05 pm
  • Replies 21
  • Views 988
Re: Redirect to checkout if more than 2 manufacturer_ids with cart module

Really I do not understand what do you want, but first your code is wrong.. Thanks, that's why I'm trying to get help. I want the cart module to redirect the customer when is trying to add a second manufacturer_id product different from manufacturer_id = "0", so the manufacturer_id zero is compatib...

Jump to post
  • Mon Jan 14, 2019 7:10 am
  • Replies 21
  • Views 988
Re: Redirect to checkout if more than 2 manufacturer_ids with cart module

Something like...?

/* Manufacturer Mod */
$manufacturers = array_unique($product['manufacturer_id']);
if(($product['manufacturer_id'] != 0 && $manufacturers > 2) && $this->request->get['route'] != 'checkout/cart') {
$this->redirect($this->url->link('checkout/cart'));
}

Jump to post
  • Sun Jan 13, 2019 4:32 am
  • Replies 21
  • Views 988
Re: Redirect to checkout if more than 2 manufacturer_ids with cart module

Unless I make something complicated in the backend like organize a multi-order by manufacturer also, is not reasonable just for logistics. This takes me to another idea that is IF CART HAS MORE THAN 1 MANUFACTURER THEN CREATE SEPARATE ORDERS FOR EACH MANUFACTURER, but I don't know how complex could...

Jump to post
  • Sun Jan 13, 2019 4:06 am
  • Replies 21
  • Views 988
Re: Redirect to checkout if more than 2 manufacturer_ids with cart module

By the way, this function is the same as Aliexpress have, for example. But you can finalize the cart with different manufacturers/shipping methods at the same time and it really increases the sales. I don't want to enable multiple manufacturer orders, as per logistic when I'm out of my desk I just r...

Jump to post
  • Sun Jan 13, 2019 4:01 am
  • Replies 21
  • Views 988
Re: Redirect to checkout if more than 2 manufacturer_ids with cart module

You do not want to count, you want to check only if the manufacturer id = 2 or any other id. Sorry, that's it, partially. I want to check if customer is adding more than one manufacturer_id product/s and manufacturer_id != 0. And stop him from adding product/s that later will have to remove from th...

Jump to post
  • Sun Jan 13, 2019 3:51 am
  • Replies 21
  • Views 988
Re: Redirect to checkout if more than 2 manufacturer_ids with cart module

I understood what you want to to. And checked the code of the version 3 module. But, why 2 different modules when you can have 1 which does both? And why count( .. ) You do not want to count, you want to check only if the manufacturer id = 2 or any other id. And - what i would do, is some backend. ...

Jump to post
  • Sun Jan 13, 2019 3:39 am
  • Replies 21
  • Views 988
Re: Redirect to checkout if more than 2 manufacturer_ids with cart module

Not quite useful to publish products by different manufacturers on your store if customers would not be able to add more than 1 manufacturer per checkout process … Besides, the financial providers do not restrict purchases by manufacturers in anyhow. However, in your catalog/controller/checkout/che...

Jump to post
  • Sun Jan 13, 2019 3:28 am
  • Replies 21
  • Views 988
Re: Redirect to checkout if more than 2 manufacturer_ids with cart module

Really not sure what you want. Does the mod not working? Or do you want more functionalities? Have seen that yo are offering 2 different versions, 1 with manufacturer id and 1 without. And what for shall the code above? If you count on the manufacturer id, what is the benefit? Manufacture id is an ...

Jump to post
  • Sun Jan 13, 2019 3:10 am
  • Replies 21
  • Views 988
Redirect to checkout if more than 2 manufacturer_ids with cart module

Hi there, I'm stuck working on my mod https://www.opencart.com/index.php?route=marketplace/extension/info&extension_id=33289 I would like to avoid customers to continue adding products once there are two different manufacturer_ids from products on the cart module. So adding the 'manufacturer_id' => ...

Jump to post
  • Sat Jan 12, 2019 3:11 pm
  • Replies 21
  • Views 988
Re: Restrict Shop by Manufacturer - Upgrade to OC3

I actually discovered a bug on my code, if you add the product with manufacturer_id=0 the last, it doesn't check further. So how can I add the conditional IF THERE ARE MORE THAN 3 manufacturer_ids or check all the manufacturer_ids against the others?

Jump to post
  • Sun Dec 16, 2018 9:58 am
  • Replies 7
  • Views 560
Re: Restrict Shop by Manufacturer - Upgrade to OC3

See if is ok (updated file) Would it be easy to add a feature to show an alert on top of each product or once they add again another - just to remind the user once they have already a product from a different manufacturer on their cart? Thanks in advance. PD. So I guess controller/checkout/cart.php...

Jump to post
  • Sun Dec 16, 2018 9:07 am
  • Replies 7
  • Views 560
Re: Restrict Shop by Manufacturer - Upgrade to OC3

Works perfectly, thanks mate.
Attached code I use for the exception. Feel free to add to your free converted extensions!

Jump to post
  • Sun Dec 16, 2018 8:44 am
  • Replies 7
  • Views 560
Re: Restrict Shop by Manufacturer - Upgrade to OC3

Restrict Checkout can do the actual restrictions Cool Johnathan, yeah thanks for the corrections I have to reupload. You can see the module in action on tee-shirt.com.au if you add to products from different categories, but not cat_0 wich I allow to combine with the rest. So, as you know not to jus...

Jump to post
  • Sun Dec 16, 2018 5:42 am
  • Replies 7
  • Views 560
Restrict Shop by Manufacturer - Upgrade to OC3

Hello everyone, I'm upgrading my Opencart 1.5.6.4 to 3.0.2 A essential mod in use that I develop is "Restrict Shop by Brand" is a basic comparison between Manufacturer IDs on cart and checkout. URL: https://www.opencart.com/index.php?route=marketplace/extension/info&extension_id=33289 A few lines th...

Jump to post
  • Sat Dec 15, 2018 12:42 pm
  • Replies 7
  • Views 560

Search found 67 matches