The problem lies in the fact that if I have a quantity buy of 3 set in the "Discount Price" and it is higher than the "Special Price" then the price will go up to the buy 3 price when the quantity hits that number and the customer doesn't get the "Special Price".
Having a Discount as Percentage(rather than $$$$) the cart should be able to read the Reg Price...or special price(if set)...then reduce buy an additional percentage if the quantity is met.
As far as I can see it would only take one change to make the entry on the Product Discount Tab be able to accept "a percentage off" rather than only a price in dollars.
Any chance of that going into v1.5 ?
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
However, it has some problems:
1 - the first time adding a discount, the percentage field is a normal field and not the dropdown.
2 - it does not save the values entered.
3 - when you attempt to update the discount, the dropdown is there but it still does not save the value selected.
4 - if I edit the discount with phpadmin and enter a discount amount, the percentage is applied correctly to the products.
5 - If I attempt to update the discount and add an additional group, it resets the percentages to "1".
I am using OC 1.5.2.1
Bill
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
From the XML, replace:
Code: Select all
<!--<file name="admin/model/catalog/product.php">
<operation>
<search position="replace" index="1"><![CDATA[$this->db->query("INSERT INTO " . DB_PREFIX . "product_discount SET product_id = '" . (int)$product_id . "', customer_group_id = '" . (int)$product_discount['customer_group_id'] . "', quantity = '" . (int)$product_discount['quantity'] . "', priority = '" . (int)$product_discount['priority'] . "', price = '" . (float)$product_discount['price'] . "', date_start = '" . $this->db->escape($product_discount['date_start']) . "', date_end = '" . $this->db->escape($product_discount['date_end']) . "'");]]></search>
<add><![CDATA[
$this->db->query("INSERT INTO `" . DB_PREFIX . "product_discount` SET `product_id` = '" . (int)$product_id . "', `customer_group_id` = '" . (int)$product_discount['customer_group_id'] . "', `quantity` = '" . (int)$product_discount['quantity'] . "', `priority` = '" . (int)$product_discount['priority'] . "', `percentage` = '" . (int)$product_discount['percentage'] . "', `date_start` = '" . $this->db->escape($product_discount['date_start']) . "', `date_end` = '" . $this->db->escape($product_discount['date_end']) . "'");
]]>
</add>
</operation>
<operation>
<search position="replace" index="2"><![CDATA[$this->db->query("INSERT INTO " . DB_PREFIX . "product_discount SET product_id = '" . (int)$product_id . "', customer_group_id = '" . (int)$product_discount['customer_group_id'] . "', quantity = '" . (int)$product_discount['quantity'] . "', priority = '" . (int)$product_discount['priority'] . "', price = '" . (float)$product_discount['price'] . "', date_start = '" . $this->db->escape($product_discount['date_start']) . "', date_end = '" . $this->db->escape($product_discount['date_end']) . "'");]]></search>
<add><![CDATA[
$this->db->query("INSERT INTO `" . DB_PREFIX . "product_discount` SET `product_id` = '" . (int)$product_id . "', `customer_group_id` = '" . (int)$product_discount['customer_group_id'] . "', `quantity` = '" . (int)$product_discount['quantity'] . "', `priority` = '" . (int)$product_discount['priority'] . "', `percentage` = '" . (int)$product_discount['percentage'] . "', `date_start` = '" . $this->db->escape($product_discount['date_start']) . "', `date_end` = '" . $this->db->escape($product_discount['date_end']) . "'");
]]>
</add>
</operation>
Code: Select all
<!--<file name="admin/model/catalog/product.php">
<operation>
<search position="replace" index="1"><![CDATA[$this->db->query("INSERT INTO " . DB_PREFIX . "product_discount SET product_id = '" . (int)$product_id . "', customer_group_id = '" . (int)$product_discount['customer_group_id'] . "', quantity = '" . (int)$product_discount['quantity'] . "', priority = '" . (int)$product_discount['priority'] . "', price = '" . (float)$product_discount['price'] . "', date_start = '" . $this->db->escape($product_discount['date_start']) . "', date_end = '" . $this->db->escape($product_discount['date_end']) . "'");]]></search>
<add><![CDATA[
$this->db->query("INSERT INTO `" . DB_PREFIX . "product_discount` SET `product_id` = '" . (int)$product_id . "', `customer_group_id` = '" . (int)$product_discount['customer_group_id'] . "', `quantity` = '" . (int)$product_discount['quantity'] . "', `priority` = '" . (int)$product_discount['priority'] . "', `percentage` = '" . (int)$product_discount['percentage'] . "', `date_start` = '" . $this->db->escape($product_discount['date_start']) . "', `date_end` = '" . $this->db->escape($product_discount['date_end']) . "'");
]]>
</add>
</operation>
<operation>
<!--<search position="replace" index="2"><![CDATA[$this->db->query("INSERT INTO " . DB_PREFIX . "product_discount SET product_id = '" . (int)$product_id . "', customer_group_id = '" . (int)$product_discount['customer_group_id'] . "', quantity = '" . (int)$product_discount['quantity'] . "', priority = '" . (int)$product_discount['priority'] . "', price = '" . (float)$product_discount['price'] . "', date_start = '" . $this->db->escape($product_discount['date_start']) . "', date_end = '" . $this->db->escape($product_discount['date_end']) . "'");]]></search>
<add><![CDATA[
$this->db->query("INSERT INTO `" . DB_PREFIX . "product_discount` SET `product_id` = '" . (int)$product_id . "', `customer_group_id` = '" . (int)$product_discount['customer_group_id'] . "', `quantity` = '" . (int)$product_discount['quantity'] . "', `priority` = '" . (int)$product_discount['priority'] . "', `percentage` = '" . (int)$product_discount['percentage'] . "', `date_start` = '" . $this->db->escape($product_discount['date_start']) . "', `date_end` = '" . $this->db->escape($product_discount['date_end']) . "'");
]]>
</add>
</operation>-->
replace (twice the same lines):
Code: Select all
$this->db->query("INSERT INTO " . DB_PREFIX . "product_discount SET product_id = '" . (int)$product_id . "', customer_group_id = '" . (int)$product_discount['customer_group_id'] . "', quantity = '" . (int)$product_discount['quantity'] . "', priority = '" . (int)$product_discount['priority'] . "', price = '" . (float)$product_discount['price'] . "', date_start = '" . $this->db->escape($product_discount['date_start']) . "', date_end = '" . $this->db->escape($product_discount['date_end']) . "'");
Code: Select all
$this->db->query("INSERT INTO " . DB_PREFIX . "product_discount SET product_id = '" . (int)$product_id . "', customer_group_id = '" . (int)$product_discount['customer_group_id'] . "', quantity = '" . (int)$product_discount['quantity'] . "', priority = '" . (int)$product_discount['priority'] . "', price = '" . (float)$product_discount['price'] . "', `percentage` = '" . (int)$product_discount['percentage'] . "', date_start = '" . $this->db->escape($product_discount['date_start']) . "', date_end = '" . $this->db->escape($product_discount['date_end']) . "'");
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Using the latest version v.1.5.2.1
I cant find this lines in the XML-file downloaded. Yes, I do see something similar, but not exactly...straightlight wrote:Since I was able to reproduce this problem from the models within the XML and unresponsive to those lines without having any line conflicts with other XML files, here's an alternative solution:
From the XML, replace:
...
Is this plugin available for v.1.5.2.1?
What else might I misunderstand??
Thx
To clarify, I am not looking for a modification that will simply calculate the special/discount based on a percentage on the fly, I would like to enter a percentage and this will be applied to the product permanently, including product options.
If I enter a discount of 10%, then this should apply to the main product and also the product options as a percentage. If I am correct, this should also mean that this can be applied to customer groups with the discount being visible on the product and product options immediately, while they are shopping and not only at checkout (like many other extensions provide).
Would anyone know how to achieve this or an existing extension that will provide this?
Try my contribution: http://forum.opencart.com/viewtopic.php?f=123&t=152887storm-cloud wrote:Excuse me for digging up this old thread but I also require this.
To clarify, I am not looking for a modification that will simply calculate the special/discount based on a percentage on the fly, I would like to enter a percentage and this will be applied to the product permanently, including product options.
If I enter a discount of 10%, then this should apply to the main product and also the product options as a percentage. If I am correct, this should also mean that this can be applied to customer groups with the discount being visible on the product and product options immediately, while they are shopping and not only at checkout (like many other extensions provide).
Would anyone know how to achieve this or an existing extension that will provide this?
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Users browsing this forum: No registered users and 4 guests