shop.skeletons.cart =================== .. py:module:: shop.skeletons.cart Attributes ---------- .. autoapisummary:: shop.skeletons.cart.logger shop.skeletons.cart.Addition Classes ------- .. autoapisummary:: shop.skeletons.cart.TotalFactory shop.skeletons.cart.RelationalBoneShipping shop.skeletons.cart.CartNodeSkel shop.skeletons.cart.CartItemSkel Functions --------- .. autoapisummary:: shop.skeletons.cart.add_discount shop.skeletons.cart.add_shipping shop.skeletons.cart.get_vat_for_node Module Contents --------------- .. py:data:: logger .. py:data:: Addition .. py:class:: TotalFactory(bone_node, bone_leaf, multiply_quantity = True, precision = None, use_cache = True, *, additions = ()) .. py:attribute:: bone_node .. py:attribute:: bone_leaf .. py:attribute:: multiply_quantity :value: True .. py:attribute:: precision :value: None .. py:attribute:: use_cache :value: True .. py:attribute:: additions :value: () .. py:method:: _get_children(parent_cart_key) .. py:method:: __call__(skel, bone) .. py:function:: add_discount(factory, total, skel, bone) .. py:function:: add_shipping(factory, total, skel, bone) .. py:function:: get_vat_for_node(skel, bone) .. py:class:: RelationalBoneShipping Bases: :py:obj:`RelationalBone` A custom RelationalBone with conditionally compute logic for shipping .. py:method:: unserialize_compute(skel, name) This method implements a conditionally compute. Depending on the value of the 'shipping_status' bone, the cheapest shipping option will be calculated. Otherwise, the shipping method chosen by the user will be unserialized as usual. .. py:method:: _is_valid_user_shipping(skel) Ensure it's still a valid shipping for the cart .. py:class:: CartNodeSkel Bases: :py:obj:`viur.core.prototypes.tree.TreeSkel` .. py:attribute:: kindName :value: '{{viur_shop_modulename}}_cart_node' .. py:attribute:: subSkels .. py:attribute:: is_root_node .. py:attribute:: total .. py:attribute:: total_raw .. py:attribute:: total_discount_price .. py:attribute:: vat .. py:attribute:: total_quantity .. py:attribute:: shipping_address .. py:attribute:: customer_comment .. py:attribute:: name .. py:attribute:: cart_type .. py:attribute:: shipping .. py:attribute:: shipping_status Versand bei Warenkorb der einer Bestellung zugehört .. py:attribute:: discount .. py:attribute:: project_data .. py:attribute:: is_frozen .. py:attribute:: frozen_values .. py:method:: refresh_shipping_address(skel) :classmethod: Shorthand to refresh the shipping_address of an CartNodeSkel Due to race-condition and timing issues, the dest values are not always set correctly. This refresh fixes this. .. py:method:: read(skel, *args, **kwargs) :classmethod: .. py:class:: CartItemSkel Bases: :py:obj:`viur.core.prototypes.tree.TreeSkel` .. py:attribute:: kindName :value: '{{viur_shop_modulename}}_cart_leaf' .. py:attribute:: article .. py:attribute:: quantity .. py:attribute:: project_data .. py:attribute:: shop_name .. py:attribute:: shop_description .. py:attribute:: shop_price_retail .. py:attribute:: shop_price_recommended .. py:attribute:: shop_availability .. py:attribute:: shop_listed .. py:attribute:: shop_image .. py:attribute:: shop_art_no_or_gtin .. py:attribute:: shop_vat_rate_category .. py:attribute:: shop_shipping_config .. py:attribute:: shop_is_weee .. py:attribute:: shop_is_low_price .. py:property:: article_skel :type: viur.core.skeleton.SkeletonInstance .. py:property:: article_skel_full :type: viur.shop.types.SkeletonInstance_T[shop.skeletons.article.ArticleAbstractSkel] .. py:method:: get_article_cache() :classmethod: .. py:property:: parent_skel :type: viur.core.skeleton.SkeletonInstance .. py:property:: price_ :type: viur.shop.types.Price .. py:attribute:: price .. py:attribute:: shipping .. py:attribute:: is_frozen .. py:attribute:: frozen_values