What we need:
When adding a product you should be able to add options and to thoose options select file (one for each option).
Why is this needed? Our client sells images and they want to sell web (smaller) and print- versions of a image. So one way would be to add double products to get the right image-size. But it should be more smoother if file's where selected by the option dropdown instead.
OC Version: 1.4.9.x
This work is paid, send qoute to corre ( a ) teamweb . se
When adding a product you should be able to add options and to thoose options select file (one for each option).
Why is this needed? Our client sells images and they want to sell web (smaller) and print- versions of a image. So one way would be to add double products to get the right image-size. But it should be more smoother if file's where selected by the option dropdown instead.
OC Version: 1.4.9.x
This work is paid, send qoute to corre ( a ) teamweb . se
Last edited by teamweb on Thu Jan 06, 2011 10:44 pm, edited 1 time in total.
I found this:
Basically, in catalog > model > checkout > order.php find this:
Replace it with the following, which just checks if the name of the download contains the option
from: http://forum.opencart.com/viewtopic.php?f=20&t=4084
if this can help You then just say thanks to developer
Basically, in catalog > model > checkout > order.php find this:
Code: Select all
foreach ($product['download'] as $download) {
$this->db->query("INSERT INTO " . DB_PREFIX . "order_download SET order_id = '" . (int)$order_id . "', order_product_id = '" . (int)$order_product_id . "', name = '" . $this->db->escape($download['name']) . "', filename = '" . $this->db->escape($download['filename']) . "', mask = '" . $this->db->escape($download['mask']) . "', remaining = '" . (int)($download['remaining'] * $product['quantity']) . "'");
}
Code: Select all
foreach ($product['download'] as $download) {
$valuequery = $this->db->query("SELECT value FROM `" . DB_PREFIX . "order_option` WHERE order_product_id = '" . (int)$order_product_id . "'");
$optionvalue = $valuequery->row['value'];
$downloadname = $this->db->escape($download['name']);
if (strstr($downloadname, $optionvalue)) {
$this->db->query("INSERT INTO " . DB_PREFIX . "order_download SET order_id = '" . (int)$order_id . "', order_product_id = '" . (int)$order_product_id . "', name = '" . $this->db->escape($download['name']) . "', filename = '" . $this->db->escape($download['filename']) . "', mask = '" . $this->db->escape($download['mask']) . "', remaining = '" . (int)($download['remaining'] * $product['quantity']) . "'");
}
}
if this can help You then just say thanks to developer
Find and get many various of opencart modules, themes, mods, etc for your opencart store at http://www.openmycart.com/oc/, OPENCART SITE customization and Maintenance supports at here
nice to hear it, if You find any problem You can put it here..
Find and get many various of opencart modules, themes, mods, etc for your opencart store at http://www.openmycart.com/oc/, OPENCART SITE customization and Maintenance supports at here
Who is online
Users browsing this forum: paulfeakins and 4 guests