[Skip to main content](#vessel-content)

#   Student discount

##

- **[marcmarc](/forum/user/1529-marcmarc "View marcmarc's Profile")**
- [![marcmarc's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/1529-marcmarc "View marcmarc's Profile") Topic Author
- [ Offline](/forum/user/1529-marcmarc)

Less More

- Posts: 74
- Thank you received: 7
-
-

1 year 9 months ago [\#365391](#365391) by [marcmarc](/forum/user/1529-marcmarc "View marcmarc's Profile")  *[Student discount](/forum/46-discount-coupon/909066-student-discount#365391 "-- HikaShop version -- : 5.1.2 -- Joomla version -- : 8.2.3 -- PHP version -- : 8.2.26  Hi, I would like to implement a student discount, on per product basis. i.e. for product xxx, I choose &quot;student discount&quot; and I get -10% on the product  I've tried variants but it's a very complicated way to do it. I've tried coupons but the discount is applied on the whole basket, so not applicable.  How to achieve that?  Regards, marc")* was created by *[marcmarc](/forum/user/1529-marcmarc "View marcmarc's Profile")*

-- HikaShop version -- : 5.1.2
-- Joomla version -- : 8.2.3
-- PHP version -- : 8.2.26

Hi,
I would like to implement a student discount, on per product basis.
i.e. for product xxx, I choose "student discount" and I get -10% on the product

I've tried variants but it's a very complicated way to do it.
I've tried coupons but the discount is applied on the whole basket, so not applicable.

How to achieve that?

Regards,
marc

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ2LWRpc2NvdW50LWNvdXBvbi85MDkwNjYtc3R1ZGVudC1kaXNjb3VudD90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86323
- Thank you received: 14283
-
-

1 year 9 months ago [\#365392](#365392) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Student discount](/forum/46-discount-coupon/909066-student-discount#365392 "-- HikaShop version -- : 5.1.2 -- Joomla version -- : 8.2.3 -- PHP version -- : 8.2.26  Hi, I would like to implement a student discount, on per product basis. i.e. for product xxx, I choose &quot;student discount&quot; and I get -10% on the product  I've tried variants but it's a very complicated way to do it. I've tried coupons but the discount is applied on the whole basket, so not applicable.  How to achieve that?  Regards, marc")*

Hi,

A simpler solution would be to do it like this:
- create a custom field of the table "item" and of the type "radio" or "single dropdown" with two values: 0 with the title "normal rate" and 1 with the title "student discount". If you don't want it to be possible for all the products, you can use the "products" or "categories" settings to restrict the field to only some products. Suppose that you use the column name "studentdiscount".
- Use the "price calculations" plugin ( [ www.hikashop.com/marketplace/product/148...ce-calculations.html](https://www.hikashop.com/marketplace/product/148-price-calculations.html) ) with this formula: Code:

{price}-{price}*0.1*{studentdiscount}

Suppose that the price is 10, the formula will be calculated either like this: 10-10*0.1*0 = 10-0 = 10 (when the normal rate is selected) or 10-10*0.1*1 = 10-1 = 9

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ2LWRpc2NvdW50LWNvdXBvbi85MDkwNjYtc3R1ZGVudC1kaXNjb3VudD90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[marcmarc](/forum/user/1529-marcmarc "View marcmarc's Profile")**
- [![marcmarc's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/1529-marcmarc "View marcmarc's Profile") Topic Author
- [ Offline](/forum/user/1529-marcmarc)

Less More

- Posts: 74
- Thank you received: 7
-
-

1 year 9 months ago [\#365397](#365397) by [marcmarc](/forum/user/1529-marcmarc "View marcmarc's Profile")  Replied by *[marcmarc](/forum/user/1529-marcmarc "View marcmarc's Profile")* on topic *[Student discount](/forum/46-discount-coupon/909066-student-discount#365397 "-- HikaShop version -- : 5.1.2 -- Joomla version -- : 8.2.3 -- PHP version -- : 8.2.26  Hi, I would like to implement a student discount, on per product basis. i.e. for product xxx, I choose &quot;student discount&quot; and I get -10% on the product  I've tried variants but it's a very complicated way to do it. I've tried coupons but the discount is applied on the whole basket, so not applicable.  How to achieve that?  Regards, marc")*

Hi,
Ok, I've bought the "price calculations" plugin, install and so on.

I've created a product list custom field "remise_etudiant" with values 0 and 1, and put the formula Code:

{price}-{price}*0.1*{remise_etudiant}

in the plugin.

I can choose the remise_etudiant value in the product backend and the calculation is made and appears in the checkout.

But I don't get how to display this custom field in the public product view and let the customer choose its value
Thanks

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ2LWRpc2NvdW50LWNvdXBvbi85MDkwNjYtc3R1ZGVudC1kaXNjb3VudD90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86323
- Thank you received: 14283
-
-

1 year 9 months ago [\#365400](#365400) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Student discount](/forum/46-discount-coupon/909066-student-discount#365400 "-- HikaShop version -- : 5.1.2 -- Joomla version -- : 8.2.3 -- PHP version -- : 8.2.26  Hi, I would like to implement a student discount, on per product basis. i.e. for product xxx, I choose &quot;student discount&quot; and I get -10% on the product  I've tried variants but it's a very complicated way to do it. I've tried coupons but the discount is applied on the whole basket, so not applicable.  How to achieve that?  Regards, marc")*

Hi,

You created a custom field of the table "product" ("produit" in French).
You should instead create a custom field of the table "item" ("article" in French).

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ2LWRpc2NvdW50LWNvdXBvbi85MDkwNjYtc3R1ZGVudC1kaXNjb3VudD90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[marcmarc](/forum/user/1529-marcmarc "View marcmarc's Profile")**
- [![marcmarc's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/1529-marcmarc "View marcmarc's Profile") Topic Author
- [ Offline](/forum/user/1529-marcmarc)

Less More

- Posts: 74
- Thank you received: 7
-
-

1 year 9 months ago [\#365411](#365411) by [marcmarc](/forum/user/1529-marcmarc "View marcmarc's Profile")  Replied by *[marcmarc](/forum/user/1529-marcmarc "View marcmarc's Profile")* on topic *[Student discount](/forum/46-discount-coupon/909066-student-discount#365411 "-- HikaShop version -- : 5.1.2 -- Joomla version -- : 8.2.3 -- PHP version -- : 8.2.26  Hi, I would like to implement a student discount, on per product basis. i.e. for product xxx, I choose &quot;student discount&quot; and I get -10% on the product  I've tried variants but it's a very complicated way to do it. I've tried coupons but the discount is applied on the whole basket, so not applicable.  How to achieve that?  Regards, marc")*

There is no table "item"
[ ![Capture-ecran2025-01-29a09.01.55.png](/forum/attachment/60182) ](/forum/attachment/60182 "...9a09.01.55.png")

- [ ![Capture-ecran2025-01-29a09.01.55.png](/forum/attachment/60182) ](/forum/attachment/60182 "...9a09.01.55.png") [ ](/forum/attachment/60182?download=1 "...9a09.01.55.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ2LWRpc2NvdW50LWNvdXBvbi85MDkwNjYtc3R1ZGVudC1kaXNjb3VudD90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86323
- Thank you received: 14283
-
-

1 year 9 months ago [\#365412](#365412) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Student discount](/forum/46-discount-coupon/909066-student-discount#365412 "-- HikaShop version -- : 5.1.2 -- Joomla version -- : 8.2.3 -- PHP version -- : 8.2.26  Hi, I would like to implement a student discount, on per product basis. i.e. for product xxx, I choose &quot;student discount&quot; and I get -10% on the product  I've tried variants but it's a very complicated way to do it. I've tried coupons but the discount is applied on the whole basket, so not applicable.  How to achieve that?  Regards, marc")*

Hi,

I had missed the fact that you are using HikaShop Essential. Sorry for that.
Custom fields of the table "item" are only available with the Business edition of HikaShop:
[ www.hikashop.com/support/documentation/4...shop-field-form.html](https://www.hikashop.com/support/documentation/42-hikashop-field-form.html)
You would have to upgrade your Essential edition to Business to be able to use this capability:
[ www.hikashop.com/extensions/upgrade-my-version.html](https://www.hikashop.com/extensions/upgrade-my-version.html)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ2LWRpc2NvdW50LWNvdXBvbi85MDkwNjYtc3R1ZGVudC1kaXNjb3VudD90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[marcmarc](/forum/user/1529-marcmarc "View marcmarc's Profile")**
- [![marcmarc's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/1529-marcmarc "View marcmarc's Profile") Topic Author
- [ Offline](/forum/user/1529-marcmarc)

Less More

- Posts: 74
- Thank you received: 7
-
-

1 year 9 months ago [\#365413](#365413) by [marcmarc](/forum/user/1529-marcmarc "View marcmarc's Profile")  Replied by *[marcmarc](/forum/user/1529-marcmarc "View marcmarc's Profile")* on topic *[Student discount](/forum/46-discount-coupon/909066-student-discount#365413 "-- HikaShop version -- : 5.1.2 -- Joomla version -- : 8.2.3 -- PHP version -- : 8.2.26  Hi, I would like to implement a student discount, on per product basis. i.e. for product xxx, I choose &quot;student discount&quot; and I get -10% on the product  I've tried variants but it's a very complicated way to do it. I've tried coupons but the discount is applied on the whole basket, so not applicable.  How to achieve that?  Regards, marc")*

Ok,
so I've bought the business edition.

Now it's ok except for one important thing :
I need to print "Tarif étudiant" on the generated ticket but since I can only access the value (0 or 1 in my case) of the custom field "remise_etudiant" (from hikashop_order_product) in the Hikaserial attachserial plugin, I can't do it.

Any idea?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ2LWRpc2NvdW50LWNvdXBvbi85MDkwNjYtc3R1ZGVudC1kaXNjb3VudD90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86323
- Thank you received: 14283
-
-

1 year 9 months ago [\#365417](#365417) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Student discount](/forum/46-discount-coupon/909066-student-discount#365417 "-- HikaShop version -- : 5.1.2 -- Joomla version -- : 8.2.3 -- PHP version -- : 8.2.26  Hi, I would like to implement a student discount, on per product basis. i.e. for product xxx, I choose &quot;student discount&quot; and I get -10% on the product  I've tried variants but it's a very complicated way to do it. I've tried coupons but the discount is applied on the whole basket, so not applicable.  How to achieve that?  Regards, marc")*

Hi,

Indeed, the attachserial plugin can only use the exact data stored in the custom field ( so 0 or 1 in this case ).

The only way I can see to display something else than 0 or 1 would be to develop a small plugin for HikaSerial, implementing the events onGetCustomAttachSerialFormats(&amp;$new_types, &amp;$new_formats) and onCustomAttachSerialFormat($format, $format_ex, $content, &amp;$img, &amp;$d)
In onGetCustomAttachSerialFormats, you want to have such code: Code:

$new_formats[] = JHTML::_('select.option', 'studentdiscount', 'Student Discount');

In onCustomAttachSerialFormat, you want to have such code: Code:

if($format!='studentdiscount') return; if(!empty($content) &amp;&amp; $content &gt; 0) $d['text'] = 'Remise étudiante';

That will display "Remise étudiante" on the image generated by the attach serial plugin if the value of the field is 1 and will not display anything on it if the value is 0.
You'll have to select the type "Student Discount" when configuring the attach serial plugin in Hikaserial.
If you're a developer, it will be trivial to create the plugin and add the code above in it. If not, it's something we could do for you for a small fee.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ2LWRpc2NvdW50LWNvdXBvbi85MDkwNjYtc3R1ZGVudC1kaXNjb3VudD90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[marcmarc](/forum/user/1529-marcmarc "View marcmarc's Profile")**
- [![marcmarc's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/1529-marcmarc "View marcmarc's Profile") Topic Author
- [ Offline](/forum/user/1529-marcmarc)

Less More

- Posts: 74
- Thank you received: 7
-
-

1 year 9 months ago [\#365420](#365420) by [marcmarc](/forum/user/1529-marcmarc "View marcmarc's Profile")  Replied by *[marcmarc](/forum/user/1529-marcmarc "View marcmarc's Profile")* on topic *[Student discount](/forum/46-discount-coupon/909066-student-discount#365420 "-- HikaShop version -- : 5.1.2 -- Joomla version -- : 8.2.3 -- PHP version -- : 8.2.26  Hi, I would like to implement a student discount, on per product basis. i.e. for product xxx, I choose &quot;student discount&quot; and I get -10% on the product  I've tried variants but it's a very complicated way to do it. I've tried coupons but the discount is applied on the whole basket, so not applicable.  How to achieve that?  Regards, marc")*

I've resolved the problem with a second item's custom field "remise_etudiant_label", type text, read only, display limited to when the 1st one (&#96;remise_etudiant") is equal to "tarif étudiant", default value on "tarif étudiant".

in attachserial I display the hikashop_order_product "remise_etudiant_label".

thanks

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ2LWRpc2NvdW50LWNvdXBvbi85MDkwNjYtc3R1ZGVudC1kaXNjb3VudD90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86323
- Thank you received: 14283
-
-

1 year 9 months ago [\#365421](#365421) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Student discount](/forum/46-discount-coupon/909066-student-discount#365421 "-- HikaShop version -- : 5.1.2 -- Joomla version -- : 8.2.3 -- PHP version -- : 8.2.26  Hi, I would like to implement a student discount, on per product basis. i.e. for product xxx, I choose &quot;student discount&quot; and I get -10% on the product  I've tried variants but it's a very complicated way to do it. I've tried coupons but the discount is applied on the whole basket, so not applicable.  How to achieve that?  Regards, marc")*

Hi,

Ah, that's a good way ! Nice thinking outside of the box !

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ2LWRpc2NvdW50LWNvdXBvbi85MDkwNjYtc3R1ZGVudC1kaXNjb3VudD90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.126 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
