Few questions after some testing

Hi,

I’m in the process of testing commerce for a couple of projects. It’s taking a while to get to grips with how Resources, Collections and the Products TV operate but i’m making some progress and the checkout process is more or less working. (I’m currently testing all possibilities so I can choose which best fits my purposes.)
A couple of questions…

  1. Am i right in thinking that the method of having Resources as products and using Tv’s for product fields is the same for Collections? I am using the same Template for both Collections and Resource products but the tv.pricing is not displaying or being passed to the cart using Collections?
    [[*pricing]]

  2. The tv.pricing for my products using Resources is not displaying correctly but it is passing correctly to the cart. It displays on the product page like this:
    {“GBP”:{“regular_price”:“5000”,“price_types”:[]}}

  3. Products are being passed to the cart twice and I can’t figure out why:

                 <input type="submit" value="Add to Cart">
             </form>
    

I think that’s all for now. Thanks for your help.

I think we covered this in a support ticket you sent in around the same time, but just to make sure the answers are here too for others passing by…

Yes, that works the same as far as Commerce is concerned.

To render prices, pass it through the commerce.get_product snippet. E.g.

[[!commerce.get_product? &product=`[[commerce.get_resource_product_id]]` &field=`price_rendered`]]

Definitely remember this from the ticket - the commerce.cart snippet was on the page twice due to being both in the template and the resource content.