Dont want discount on 1 to 6 items

  • Posts: 6
  • Thank you received: 0
11 years 1 month ago #127470

-- url of the page with the problem -- : www.salg-af-braende.dk
-- HikaShop version -- : HikaShop Essential: 2.2.2
-- Joomla version -- : 3.1.5

I dont want to give custommers a DISCOUNT on 1 to 6 item but if they order more than 6 I would like to give them 10%.

How do I do that, i dont want to use COUPONS as I want the 10% to appear on the product list ????

Last edit: 11 years 1 month ago by spydig29.

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
11 years 1 month ago #127478

Hi,

Discounts are directly applied to products, and coupons to orders, what you want to do is to apply a discount for order that have more than 6 item in their cart, so the discount have to automatically be applied through the checkout process by using a coupon that will be "Auto loaded" in your cart if possible so that you customers won't have to enter any coupon code through the checkout process.

Last edit: 11 years 1 month ago by Mohamed Thelji.

Please Log in or Create an account to join the conversation.

  • Posts: 6
  • Thank you received: 0
11 years 1 month ago #127480

But I want to show the discount in the product list, and it doesnt do that with a coupon

Please Log in or Create an account to join the conversation.

  • Posts: 6
  • Thank you received: 0
11 years 1 month ago #127481

see this sample

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
11 years 1 month ago #127500

Hi,

Your needs will require a plugin.
It's not possible to do that by default in HikaShop, but with a simple plugin you can add this feature.

Here is the developer documentation:
www.hikashop.com/support/documentation/6...r-documentation.html

Please Log in or Create an account to join the conversation.

  • Posts: 6
  • Thank you received: 0
11 years 1 month ago #127502

is it "onBeforeProductListingLoad" ?

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
11 years 1 month ago #127542

onBeforeProductListingLoad(&$filters,&$order,&$parent, &$select, &$select2, &$a, &$b, &$on)

This function will be triggered by HikaShop the products are loaded in order to be displayed on products listings on the front end. The $filters variable will be an array of conditions which will then be combined in order to form the MySQL query which will be used to load the products. That can enable you to change the way the products are loaded on your website listings by adding or removing conditions on that query.
And you can also potentially add a left join by appending it at the end of the $on variable like that:
$on .= 'LEFT JOIN #__hikashop_price AS p ON b.product_id=p.price_product_id';
And then change the $order variable to use the p.price_value field so that the products get ordered by price.


Sure, this function will be triggered during the displaying of a product listing.

Please Log in or Create an account to join the conversation.

  • Posts: 6
  • Thank you received: 0
11 years 1 month ago #127543

sorry, but I cant get the function to work, it dont triggers. I have installed the plugin using the Joomla installer and of cause published it. but it wont work

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
11 years 1 month ago #127644

Hi,

class plgHikaShop_discount_amount extends JPlugin {
Should be
class plgHikaShopDiscount_amount extends JPlugin {
There is no "underscore" between the category and the name in the Joomla plugin structure.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

Time to create page: 0.095 seconds
Powered by Kunena Forum