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

#   Exclude discounted products paying with userpoints

##

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

Less More

- Posts: 171
- Thank you received: 9
-
-

10 years 5 months ago [\#243500](#243500) by [pepecortez](/forum/user/31475-pepecortez "View pepecortez's Profile")  *[Exclude discounted products paying with userpoints](/forum/29-payment-methods/885166-exclude-discounted-products-paying-with-userpoints#243500 "-- HikaShop version -- : 2.6.3  Hi!  As I see now there's no option to set to let the user to pay partially with points for just those products which are not discounted. Could anyone give me some code tricks to solve that?  Or at least to take this to the nearly upcoming &quot;To-Do-List&quot;?  Thanks in advance,")* was created by *[pepecortez](/forum/user/31475-pepecortez "View pepecortez's Profile")*

-- HikaShop version -- : 2.6.3

Hi!

As I see now there's no option to set to let the user to pay partially with points for just those products which are not discounted. Could anyone give me some code tricks to solve that?

Or at least to take this to the nearly upcoming "To-Do-List"?

Thanks in advance,

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy84ODUxNjYtZXhjbHVkZS1kaXNjb3VudGVkLXByb2R1Y3RzLXBheWluZy13aXRoLXVzZXJwb2ludHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86593
- Thank you received: 14334
-
-

10 years 5 months ago [\#243522](#243522) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Exclude discounted products paying with userpoints](/forum/29-payment-methods/885166-exclude-discounted-products-paying-with-userpoints#243522 "-- HikaShop version -- : 2.6.3  Hi!  As I see now there's no option to set to let the user to pay partially with points for just those products which are not discounted. Could anyone give me some code tricks to solve that?  Or at least to take this to the nearly upcoming &quot;To-Do-List&quot;?  Thanks in advance,")*

Hi,

Code tricks ? Well, it would require to remove the code: Code:

if(isset($order-&gt;order_subtotal) &amp;&amp; isset($order-&gt;order_shipping_price)) { if($this-&gt;plugin_params-&gt;allowshipping == 1) { $final_price = @$order-&gt;order_subtotal + $order-&gt;order_shipping_price; } else { $final_price = @$order-&gt;order_subtotal; } } else if(empty($order-&gt;cart-&gt;full_total-&gt;prices[0]-&gt;price_value_with_tax)) { if($this-&gt;plugin_params-&gt;allowshipping == 1) { $final_price = @$order-&gt;full_total-&gt;prices[0]-&gt;price_value_with_tax; }else{ $final_price = @$order-&gt;total-&gt;prices[0]-&gt;price_value_with_tax; } if(!empty($order-&gt;additional['userpoints']-&gt;price_value_with_tax)){ $final_price -= $order-&gt;additional['userpoints']-&gt;price_value_with_tax; } } else { if($this-&gt;plugin_params-&gt;allowshipping == 1) { $final_price = @$order-&gt;cart-&gt;full_total-&gt;prices[0]-&gt;price_value_with_tax; } else { $final_price = @$order-&gt;cart-&gt;total-&gt;prices[0]-&gt;price_value_with_tax; } if(!empty($order-&gt;cart-&gt;additional['userpoints']-&gt;price_value_with_tax)){ $final_price -= $order-&gt;cart-&gt;additional['userpoints']-&gt;price_value_with_tax; } }

in the file plugins/hikashoppayment/userpoints/userpoints.php and add instead a loop on the products array (in $order-&gt;products or $order-&gt;cart-&gt;products) to see in each product if there is a discount attribute or not and then sum the product price if there is no discount attached to the product.
If you're a developer, it's easy to change.

The following user(s) said Thank You: [pepecortez](/forum/user/31475-pepecortez "View pepecortez's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy84ODUxNjYtZXhjbHVkZS1kaXNjb3VudGVkLXByb2R1Y3RzLXBheWluZy13aXRoLXVzZXJwb2ludHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) 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.056 seconds

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