What sort of "discount" are you referring to? Please provide more info on what you are looking for.Or

Are you just looking for a way to not include those "non-shipped" items when determining the shipping cost?

If you just don't want the shipping calculation to include items that are not shipped... then there are a couple different ways to go about that based on your desired shipping calculation method. Here are a few suggestions:

1) If determining shipping based on the total WEIGHT of the order .. then you can just mark those items that are not shipped as having a "0" weight.

2) If determining shipping based on subtotal, then as a simple (but effective) trick .. you can set the WEIGHT of each item that is shipped to be equal the price of the product... and set the WEIGHT of the products that are not shipped to be "0". You can then use the shipping by weight shipping calculations instead of the shipping by subtotal calculations... and the items marked as "0" weight will not be included. Note that you can also hide the WEiGHT column in the shopping cart to keep people from getting confused as to why the WEIGHT of each product is equal to the price of each product.

3) Or as a third suggestion, you may be able to use the "shipping_modifier" parameter for all items... basically specifing the shipping charges for each individual item and not using a shipping calculation at the end.

4) Or as another suggestion, as of version 3.4, you can set the "shipping_modifier" of non-shipped items to be negative values... so you may be able to use that to offset any shipping charges that are calculated at the end.