ChernovGV2015-08-13 06:09:59
ChernovGV, 2015-08-13 06:09:59

How to implement adding items with markups to the cart in modx revo shopkeeper 3?

Good afternoon!
It is not possible to implement the addition of goods to the cart with TV parameters that affect the price.
ChangePrice = 1 in SK settings
Product card template:


 <div class="row  shk-item good_in_list">
                <div class="col-xs-6">
                          <img class="shk-image" src="" alt="Вопрос">
                <div class="col-xs-6">
                    <div class="row">
                    <div class="row good_shot_desc_in_list">

                    <div class="row good_price_and_more_in_list">
                        <form action="" method="post">
                                <div class="price_in_list shk-price">[[*price]] руб.</div>
                                <input type="hidden" name="shk-id" value="2" />
                                <input type="hidden" name="shk-name" value="Вопрос" />
                                <input type="hidden" name="shk-count" value="1" />
                                <div class="product-price">
                                  <button type="submit" class="shk-but more_in_list">В корзину <i></i></button>
    [[[email protected]_catalog]]


TV price_selector - the parameter on which the price depends
Input settings "param-edit", output settings shk_select
On the page price_selector is rendered like this:
<select class="shk_param" name="price_selector__" id="price_selector" onchange="SHK.additOpt(this)">
 <option value="0__*10" selected="selected">name</option>
 <option value="1__*100">name1</option>

All other SK settings, cart output and other defaults.
When you change this parameter on the product page, its price changes, but when added to the cart, the price is indicated as standard. Variables [[+price_total]] and [[+total]] in cartRowTpl are the same Tell me
, maybe somewhere you need to specify which TV the price depends on? Or maybe some other settings are needed for this?
Even earlier, somewhere there was a demo store on SK, where you could see how something is arranged, and this mechanism was implemented there. But now I can't find this example on the net...
Thank you!

Answer the question

In order to leave comments, you need to log in

[[+comments_count]] answer(s)
ChernovGV, 2015-08-14

The problem was in calling the TV parameter, it is necessary to make such a replacement:

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question