I'm new to OpenCart and just testing it out to see if it has some features our company require. Hopefully someone can help? I have OpenCart v1.4.9.5 installed.
We need the ability to list an individual product multiple times in different categories, with unique tiles, descriptions and accessories for each of these. However, we need to have all of these variants use the same SKU or whatever field is used for inventory purposes so no matter which variant is ordered, it comes off the same stock code and removes one item out of stock.
We sell laptop accessories. We have 1 physical product in our warehouse which can fit up to 500 laptops. We need to list each laptop individually but use a single stock code for the item that fits into it, no matter how many laptops it fits into.
Example:
SKU: PRODUCT1
Fits Models: ACER LAPTOP, HP LAPTOP 1, HP LAPTOP 2, COMPAQ LAPTOP
SKU: PRODUCT2
Fite Models: HP LAPTOP 3, HP LAPTOP 4, COMPAQ LAPTOP 2, DELL LAPTOP
If we don't do this, we end up with 100's of stock codes for the same physical product.
We alsready have this fetaure on our existing ecommerce package but need to move away from it and OpenCart looks good. Can OpenCart offer us this feature? Does anyone know how?
Is it actually possible?
Thanks
Google Analytics Expert - Advanced e-commerce tracking, Product & options reporting, transaction/conversion reporting, Google Adwords conversion & profit reporting, goal & funnel reporting, event tracking, site search tracking, multi-store compatibility, EU Cookie Law compliance and works with any theme or checkout! Easy vqmod install. Get it here
12345-a
12345-b
12345-c
They are all 12345
I'm not sure if I explained this properly, don't think what you suggested will work as it would still create a separate stock item, this is the issue really. Basically need to figure out how or what field opencart uses to deduct an item from stock or if it can be modified.
If we have 500 products with the same SKU, we'd like the stock to be deducted across that SKU so all products with that SKU have one less item in stock.
At the moment, PRODUCT1 AND PRODUCT2 DO have the same SKU, but if someone orders PRODUCT1 on the site, only stock from PRODUCT1 is deducted, PRODUCT2 stock levels stay the same.
Google Analytics Expert - Advanced e-commerce tracking, Product & options reporting, transaction/conversion reporting, Google Adwords conversion & profit reporting, goal & funnel reporting, event tracking, site search tracking, multi-store compatibility, EU Cookie Law compliance and works with any theme or checkout! Easy vqmod install. Get it here
Well, without modifying, this is the best way of doing it:
Create one product (one sku)
Link it to multiple categories
Creates attributes for the product listing all the possible branded products it will work with
Do you do any custom work?
Google Analytics Expert - Advanced e-commerce tracking, Product & options reporting, transaction/conversion reporting, Google Adwords conversion & profit reporting, goal & funnel reporting, event tracking, site search tracking, multi-store compatibility, EU Cookie Law compliance and works with any theme or checkout! Easy vqmod install. Get it here
Each product would need multiple titles and multiple descriptions and coding would be required to differentiate which title/description combination to use dependant on which category.
You may do better posting your request in the Commercial Support forum.

Does that sound logical?
That way, it can keeps everything in opencart as it is but still solve our stock issue.
Google Analytics Expert - Advanced e-commerce tracking, Product & options reporting, transaction/conversion reporting, Google Adwords conversion & profit reporting, goal & funnel reporting, event tracking, site search tracking, multi-store compatibility, EU Cookie Law compliance and works with any theme or checkout! Easy vqmod install. Get it here
before:
Code: Select all
public function confirm($order_id, $order_status_id, $comment = '') {
Code: Select all
public function getskufromprodid($order_product_id) {
$query = $this->db->query("SELECT sku FROM `" . DB_PREFIX . "product` WHERE product_id = '". (int)$order_product_id ."'");
if ($query->num_rows) {
return $query->row['sku'];
}else{
return 0;
}
}
Code: Select all
foreach ($order_product_query->rows as $order_product) {
$this->db->query("UPDATE " . DB_PREFIX . "product SET quantity = (quantity - " . (int)$order_product['quantity'] . ") WHERE product_id = '" . (int)$order_product['product_id'] . "' AND subtract = '1'");
$order_option_query = $this->db->query("SELECT * FROM " . DB_PREFIX . "order_option WHERE order_id = '" . (int)$order_id . "' AND order_product_id = '" . (int)$order_product['order_product_id'] . "'");
foreach ($order_option_query->rows as $option) {
$this->db->query("UPDATE " . DB_PREFIX . "product_option_value SET quantity = (quantity - " . (int)$order_product['quantity'] . ") WHERE product_option_value_id = '" . (int)$option['product_option_value_id'] . "' AND subtract = '1'");
}
}
Code: Select all
foreach ($order_product_query->rows as $order_product) {
$sku = $this->getskufromprodid($order_product['product_id']);
$this->db->query("UPDATE " . DB_PREFIX . "product SET quantity = (quantity - " . (int)$order_product['quantity'] . ") WHERE sku = '" . $sku . "' AND subtract = '1'");
$order_option_query = $this->db->query("SELECT * FROM " . DB_PREFIX . "order_option WHERE order_id = '" . (int)$order_id . "' AND order_product_id = '" . (int)$order_product['order_product_id'] . "'");
foreach ($order_option_query->rows as $option) {
$this->db->query("UPDATE " . DB_PREFIX . "product_option_value SET quantity = (quantity - " . (int)$order_product['quantity'] . ") WHERE product_option_value_id = '" . (int)$option['product_option_value_id'] . "' AND subtract = '1'");
}
}
** Caveat - will only update product options for the ordered product if you use options because there is no easy way of finding the same option for a different product.
Try it and let me know how you get on
I'll give it a try and let you know how I get on. Which file is the code in?
Google Analytics Expert - Advanced e-commerce tracking, Product & options reporting, transaction/conversion reporting, Google Adwords conversion & profit reporting, goal & funnel reporting, event tracking, site search tracking, multi-store compatibility, EU Cookie Law compliance and works with any theme or checkout! Easy vqmod install. Get it here
I think this code may have changed?
Google Analytics Expert - Advanced e-commerce tracking, Product & options reporting, transaction/conversion reporting, Google Adwords conversion & profit reporting, goal & funnel reporting, event tracking, site search tracking, multi-store compatibility, EU Cookie Law compliance and works with any theme or checkout! Easy vqmod install. Get it here

Many, many thanks for helping me out with this, it's the main thing which has been holding us back with opencart.
I'll be putting an order in for your SEO URLs & admin email alerts very soon.
RE the options... I didn't think opencart removed options from stock anyway, or am I wrong?
Thanks again!
Mike
Google Analytics Expert - Advanced e-commerce tracking, Product & options reporting, transaction/conversion reporting, Google Adwords conversion & profit reporting, goal & funnel reporting, event tracking, site search tracking, multi-store compatibility, EU Cookie Law compliance and works with any theme or checkout! Easy vqmod install. Get it here
Stock control is also done on the options if you have them set to subtract stock, however, there is no way of referencing them (well not easily) as they dont (even though they really should) have their own model number or sku.
So with the code I put above, only the stock on the options (if you have any set-up) for the product purchased will be reduced.
Thanks a lot, I have been speaking to a company who have claimed to fix the problems with options so if I find a fix I will post it here.
Google Analytics Expert - Advanced e-commerce tracking, Product & options reporting, transaction/conversion reporting, Google Adwords conversion & profit reporting, goal & funnel reporting, event tracking, site search tracking, multi-store compatibility, EU Cookie Law compliance and works with any theme or checkout! Easy vqmod install. Get it here
Basically for the options stock, a db lookup for the related product id's needs to be done and then a look-up for their options with the same option value, then the quantity can be deducted from those aswell.
If so is opencart a good solution?
I'd definitely recommend opencart as a good solution. You may have to apply some tweaks here and there, especially if you have lots of products or categories but overall it has been very easy to work with and it is easily customisable.
What are you currently using?
Google Analytics Expert - Advanced e-commerce tracking, Product & options reporting, transaction/conversion reporting, Google Adwords conversion & profit reporting, goal & funnel reporting, event tracking, site search tracking, multi-store compatibility, EU Cookie Law compliance and works with any theme or checkout! Easy vqmod install. Get it here
Users browsing this forum: No registered users and 15 guests