Announcement

Collapse
No announcement yet.

Reorder on a Readytheme.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Reorder on a Readytheme.

    I do not see a reorder option on a levels or luxe readytheme. Am I missing something here?

    #2
    Many of the ReadyThemes do not have a link or form on the order status page to reorder a product. Rolling back the page to the original version will show you the code you could add in. All of the ReadyThemes, based on Elements, do have this functionality in place.
    Matt Zimmermann
    Front-End Development Director / Miva, Inc.

    Comment


      #3
      Thanks for that but I had already made it that far. What about the ability to add all products in the order in one click. Could this be done with Multi-product add to cart function?

      Comment


        #4
        Yes, you should be able to use the multi-product add function. You would need to pass the product codes and quantities in the correct format and, if you have attributes, it might be a bit trickier.
        Matt Zimmermann
        Front-End Development Director / Miva, Inc.

        Comment


          #5
          Yes, you can add all products to cart with one click.

          Comment


            #6
            I'm sure I can figure it out but the code would be much appreciated. There are attributes that control the pricing.

            K

            Comment


              #7
              Code:
              <form method="post" action="&mvte:global:sessionurl;Screen=BASK">
                  <input type="hidden" name="Action" value="ADPM">
                  <input type="hidden" name="Attributes" value="Yes">
                  <input type="hidden" name="Store_Code" value="&mvte:store:code;">
              
              
              
              <mvt:foreach iterator="product" array="all_products:products">
              
                  &mvt:global:product_name;
                  <input type="hidden" name="Products[ &mvt:product:id;]:code" value="&mvte:product:code;">
                  <input type="text" name="Products[&mvt:product:id;]:quantity" value="1">
              
              </mvt:foreach>
              
              
              
                  <input type="submit" value="Add all to basket">
              </form>

              Comment


                #8
                I thank you for the feedback but I'm not sure you realize that I am trying to do a reorder from the order stays page. I may not be close but this is where I'm at. It does not work.



                <script language="JavaScript">
                <!--
                function ReloadForm( form_field )
                {
                document.location.reload();
                document.getElementsByName( "OrderDetails_Format" ).value = form_field;
                }
                //-->
                </script>
                <table>
                <tr class="heading">
                <td class="order-reorder">&nbsp;</td>
                <td class="order-description">Product Description</td>
                <td class="order-status">Status</td>
                <td class="order-quantity">Quantity</td>
                <td class="order-price">Price/Ea.</td>
                <td class="order-total">Total</td>
                </tr>

                <mvt:foreach iterator="item" array="order:groups">

                <form method="post" action="&mvte:global:sessionurl;Screen=BASK">
                <input type="hidden" name="Action" value="ADPM">
                <input type="hidden" name="Products[ &mvt:item:id; ]:code" value="&mvte:item:code;">
                <input type="hidden" name="Attributes" value="Yes">
                <tr>
                <mvt:if expr="l.settings:item:option_count">
                <mvt:assign name="l.settings:rowspan" value="l.settings:item:option_count + 1" />
                <mvt:else>
                <mvt:assign name="l.settings:rowspan" value="1" />
                </mvt:if>

                <td class="order-reorder" rowspan="&mvt:rowspan;">
                <input type="text" name="Products[ &mvt:item:id; ]:quantity" value="0">
                </td>

                <td class="order-description">
                &mvt:item:name; <mvt:if expr="l.settings:item:upsold">(Special Offer)</mvt:if>
                <mvt:foreach iterator="discount" array="item:discounts">
                <mvt:if expr="l.settings:discount:display">
                <div class="order-discount">&mvt:discount:descrip;: &mvt:discount:formatted_discount;</div>
                </mvt:if>
                </mvt:foreach>
                <mvt:item name="product_attributes" param="item:id" />
                </td>
                <td class="order-status">&mvt:item:order_status;</td>
                <td class="order-quantity">&mvt:item:quantity;</td>
                <td class="order-price">
                &mvt:item:formatted_base_price;
                </td>
                <td class="order-total">
                <mvt:if expr="l.settings:item:subtotal_base_price NE l.settings:item:subtotal">
                <span style="text-decoration: line-through;">&mvt:item:formatted_subtotal_base_price; </span>
                </mvt:if>
                &mvt:item:formatted_subtotal;
                </td>
                </tr>

                <mvt:foreach iterator="option" array="item:options">
                <tr class="item-options">
                <td colspan="2">
                <mvt:if expr="l.settings:option:option_id">
                &mvt:option:attr_code;: &mvt:option:opt_code;
                <mvt:elseif expr="NOT ISNULL l.settings:option:data">
                <mvt:if expr="( l.settings:option:attr_code EQ 'digitaldownload' ) AND ( NOT ISNULL l.settings:option:digital_download_url )">
                <a href="&mvte:option:digital_download_url;" target="_blank">Digital Download</a>
                <mvt:else>
                &mvt:option:attr_code;: &mvt:option:data;
                </mvt:if>
                <mvt:elseif expr="NOT ISNULL l.settings:option:data_long">
                &mvt:option:attr_code;: &mvt:option:data_long;
                <mvt:else>
                &mvt:option:attr_code;
                </mvt:if>
                <mvt:foreach iterator="discount" array="option:discounts">
                <mvt:if expr="l.settings:discount:display">
                <div class="order-discount">&mvt:discount:descrip;: &mvt:discount:formatted_discount;</div>
                </mvt:if>
                </mvt:foreach>
                </td>
                <td>&nbsp;</td>
                <td class="order-price">
                <mvt:if expr="l.settings:option:base_price">
                &mvt:option:formatted_base_price;
                <mvt:else>
                &nbsp;
                </mvt:if>
                </td>
                <td class="order-total">
                <mvt:if expr="l.settings:option:subtotal_base_price OR l.settings:option:subtotal">
                <mvt:if expr="l.settings:option:subtotal_base_price NE l.settings:option:subtotal">
                <span style="text-decoration: line-through;">&mvt:option:formatted_subtotal_base_pric e;</span>
                </mvt:if>
                &mvt:option:formatted_subtotal;
                <mvt:else>
                &nbsp;
                </mvt:if>
                </td>
                </tr>
                </mvt:foreach>
                </mvt:foreach>


                <mvt:foreach iterator="charge" array="order:charges">
                <tr class="order-charges">
                <td colspan="4">&nbsp;</td>
                <td class="charge-description">&mvt:charge:descrip;:</td>
                <td class="charge-fee">&mvt:charge:formatted_disp_amt;</td>
                </tr>
                </mvt:foreach>

                <tr class="totals">
                <td colspan="4">&nbsp;</td>
                <td class="total-prompt">Total:</td>
                <td class="formatted-total">&mvt:order:formatted_total;</td>
                </tr>
                </table>

                <mvt:if expr="l.settings:order:have_custom_order_field_val ues">
                <br />
                <table>
                <tr class="heading">
                <td colspan="2">Additional Order Information</td>
                </tr>
                </table>
                </mvt:if>
                <input type="submit" value="Add to Basket">
                </form>

                Comment


                  #9
                  Instead of having one form with all products in it, you're creating a single form for each product. Form tag must be placed outside your main loop.
                  Code:
                  <form method="post" action="&mvte:global:sessionurl;Screen=BASK">
                      <mvt:foreach iterator="item" array="order:groups">
                  
                      </mvt:foreach>
                  
                  --- submit button here --
                  </form>

                  There is no difference which page you're trying to order from. It may even work from the SFNT page if you like.
                  All you need: product code and quantity and as Matt mentioned above - product attributes. Do you use attributes?
                  If you can get all those details in your loop -- you're good!

                  Comment


                    #10
                    This does not work:



                    <script language="JavaScript">
                    <!--
                    function ReloadForm( form_field )
                    {
                    document.location.reload();
                    document.getElementsByName( "OrderDetails_Format" ).value = form_field;
                    }
                    //-->
                    </script>
                    <table>
                    <tr class="heading">
                    <td class="order-reorder">&nbsp;</td>
                    <td class="order-description">Product Description</td>
                    <td class="order-status">Status</td>
                    <td class="order-quantity">Quantity</td>
                    <td class="order-price">Price/Ea.</td>
                    <td class="order-total">Total</td>
                    </tr>

                    <mvt:foreach iterator="item" array="order:groups">

                    <form method="post" action="&mvte:global:sessionurl;Screen=BASK">
                    <input type="hidden" name="Action" value="ADPM">
                    <input type="hidden" name="Attributes" value="Yes">
                    <tr>
                    <mvt:if expr="l.settings:item:option_count">
                    <mvt:assign name="l.settings:rowspan" value="l.settings:item:option_count + 1" />
                    <mvt:else>
                    <mvt:assign name="l.settings:rowspan" value="1" />
                    </mvt:if>

                    <td class="order-reorder" rowspan="&mvt:rowspan;">
                    <input type="hidden" name="Products[ &mvt:product:id; ]:code" value="&mvte:product:code;">
                    <input type="text" name="Products[ &mvt:product:id; ]:quantity" value="0">
                    </td>

                    <td class="order-description">
                    &mvt:item:name; <mvt:if expr="l.settings:item:upsold">(Special Offer)</mvt:if>
                    <mvt:foreach iterator="discount" array="item:discounts">
                    <mvt:if expr="l.settings:discount:display">
                    <div class="order-discount">&mvt:discount:descrip;: &mvt:discount:formatted_discount;</div>
                    </mvt:if>
                    </mvt:foreach>
                    <mvt:item name="product_attributes" param="product:id" />
                    </td>
                    <td class="order-status">&mvt:item:order_status;</td>
                    <td class="order-quantity">&mvt:item:quantity;</td>
                    <td class="order-price">
                    &mvt:item:formatted_base_price;
                    </td>
                    <td class="order-total">
                    <mvt:if expr="l.settings:item:subtotal_base_price NE l.settings:item:subtotal">
                    <span style="text-decoration: line-through;">&mvt:item:formatted_subtotal_base_price; </span>
                    </mvt:if>
                    &mvt:item:formatted_subtotal;
                    </td>
                    </tr>

                    <mvt:foreach iterator="option" array="item:options">
                    <tr class="item-options">
                    <td colspan="2">
                    <mvt:if expr="l.settings:option:option_id">
                    &mvt:option:attr_code;: &mvt:option:opt_code;
                    <mvt:elseif expr="NOT ISNULL l.settings:option:data">
                    <mvt:if expr="( l.settings:option:attr_code EQ 'digitaldownload' ) AND ( NOT ISNULL l.settings:option:digital_download_url )">
                    <a href="&mvte:option:digital_download_url;" target="_blank">Digital Download</a>
                    <mvt:else>
                    &mvt:option:attr_code;: &mvt:option:data;
                    </mvt:if>
                    <mvt:elseif expr="NOT ISNULL l.settings:option:data_long">
                    &mvt:option:attr_code;: &mvt:option:data_long;
                    <mvt:else>
                    &mvt:option:attr_code;
                    </mvt:if>
                    <mvt:foreach iterator="discount" array="option:discounts">
                    <mvt:if expr="l.settings:discount:display">
                    <div class="order-discount">&mvt:discount:descrip;: &mvt:discount:formatted_discount;</div>
                    </mvt:if>
                    </mvt:foreach>
                    </td>
                    <td>&nbsp;</td>
                    <td class="order-price">
                    <mvt:if expr="l.settings:option:base_price">
                    &mvt:option:formatted_base_price;
                    <mvt:else>
                    &nbsp;
                    </mvt:if>
                    </td>
                    <td class="order-total">
                    <mvt:if expr="l.settings:option:subtotal_base_price OR l.settings:option:subtotal">
                    <mvt:if expr="l.settings:option:subtotal_base_price NE l.settings:option:subtotal">
                    <span style="text-decoration: line-through;">&mvt:option:formatted_subtotal_base_pric e;</span>
                    </mvt:if>
                    &mvt:option:formatted_subtotal;
                    <mvt:else>
                    &nbsp;
                    </mvt:if>
                    </td>
                    </tr>
                    </mvt:foreach>
                    </mvt:foreach>


                    <mvt:foreach iterator="charge" array="order:charges">
                    <tr class="order-charges">
                    <td colspan="4">&nbsp;</td>
                    <td class="charge-description">&mvt:charge:descrip;:</td>
                    <td class="charge-fee">&mvt:charge:formatted_disp_amt;</td>
                    </tr>
                    </mvt:foreach>

                    <tr class="totals">
                    <td colspan="4">&nbsp;</td>
                    <td class="total-prompt">Total:</td>
                    <td class="formatted-total">&mvt:order:formatted_total;</td>
                    </tr>
                    </table>

                    <mvt:if expr="l.settings:order:have_custom_order_field_val ues">
                    <br />
                    <table>
                    <tr class="heading">
                    <td colspan="2">Additional Order Information</td>
                    </tr>
                    </table>
                    </mvt:if>
                    <input type="submit" value="Add to Basket">
                    </form>

                    Comment


                      #11
                      Please, read my previous message. You still have it wrong.
                      You're creating a separate submit form for each single item. Instead, all products must belong to one and the same form.
                      Code:
                      <mvt:foreach iterator="item" array="order:groups">
                      <form method="post" action="&mvte:global:sessionurl;Screen=BASK">
                      swap those two lines

                      Comment


                        #12
                        This does not work:


                        <script language="JavaScript">
                        <!--
                        function ReloadForm( form_field )
                        {
                        document.location.reload();
                        document.getElementsByName( "OrderDetails_Format" ).value = form_field;
                        }
                        //-->
                        </script>
                        <table>
                        <tr class="heading">
                        <td class="order-reorder">&nbsp;</td>
                        <td class="order-description">Product Description</td>
                        <td class="order-status">Status</td>
                        <td class="order-quantity">Quantity</td>
                        <td class="order-price">Price/Ea.</td>
                        <td class="order-total">Total</td>
                        </tr>
                        <form method="post" action="&mvte:global:sessionurl;Screen=BASK">
                        <mvt:foreach iterator="item" array="order:groups">
                        <input type="hidden" name="Action" value="ADPM">
                        <input type="hidden" name="Attributes" value="Yes">
                        <tr>
                        <mvt:if expr="l.settings:item:option_count">
                        <mvt:assign name="l.settings:rowspan" value="l.settings:item:option_count + 1" />
                        <mvt:else>
                        <mvt:assign name="l.settings:rowspan" value="1" />
                        </mvt:if>

                        <td class="order-reorder" rowspan="&mvt:rowspan;">
                        <input type="hidden" name="Products[ &mvt:product:id; ]:code" value="&mvte:product:code;">
                        <input type="text" name="Products[ &mvt:product:id; ]:quantity" value="0">
                        </td>

                        <td class="order-description">
                        &mvt:item:name; <mvt:if expr="l.settings:item:upsold">(Special Offer)</mvt:if>
                        <mvt:foreach iterator="discount" array="item:discounts">
                        <mvt:if expr="l.settings:discount:display">
                        <div class="order-discount">&mvt:discount:descrip;: &mvt:discount:formatted_discount;</div>
                        </mvt:if>
                        </mvt:foreach>
                        <mvt:item name="product_attributes" param="product:id" />
                        </td>
                        <td class="order-status">&mvt:item:order_status;</td>
                        <td class="order-quantity">&mvt:item:quantity;</td>
                        <td class="order-price">
                        &mvt:item:formatted_base_price;
                        </td>
                        <td class="order-total">
                        <mvt:if expr="l.settings:item:subtotal_base_price NE l.settings:item:subtotal">
                        <span style="text-decoration: line-through;">&mvt:item:formatted_subtotal_base_price; </span>
                        </mvt:if>
                        &mvt:item:formatted_subtotal;
                        </td>
                        </tr>

                        <mvt:foreach iterator="option" array="item:options">
                        <tr class="item-options">
                        <td colspan="2">
                        <mvt:if expr="l.settings:option:option_id">
                        &mvt:option:attr_code;: &mvt:option:opt_code;
                        <mvt:elseif expr="NOT ISNULL l.settings:option:data">
                        <mvt:if expr="( l.settings:option:attr_code EQ 'digitaldownload' ) AND ( NOT ISNULL l.settings:option:digital_download_url )">
                        <a href="&mvte:option:digital_download_url;" target="_blank">Digital Download</a>
                        <mvt:else>
                        &mvt:option:attr_code;: &mvt:option:data;
                        </mvt:if>
                        <mvt:elseif expr="NOT ISNULL l.settings:option:data_long">
                        &mvt:option:attr_code;: &mvt:option:data_long;
                        <mvt:else>
                        &mvt:option:attr_code;
                        </mvt:if>
                        <mvt:foreach iterator="discount" array="option:discounts">
                        <mvt:if expr="l.settings:discount:display">
                        <div class="order-discount">&mvt:discount:descrip;: &mvt:discount:formatted_discount;</div>
                        </mvt:if>
                        </mvt:foreach>
                        </td>
                        <td>&nbsp;</td>
                        <td class="order-price">
                        <mvt:if expr="l.settings:option:base_price">
                        &mvt:option:formatted_base_price;
                        <mvt:else>
                        &nbsp;
                        </mvt:if>
                        </td>
                        <td class="order-total">
                        <mvt:if expr="l.settings:option:subtotal_base_price OR l.settings:option:subtotal">
                        <mvt:if expr="l.settings:option:subtotal_base_price NE l.settings:option:subtotal">
                        <span style="text-decoration: line-through;">&mvt:option:formatted_subtotal_base_pric e;</span>
                        </mvt:if>
                        &mvt:option:formatted_subtotal;
                        <mvt:else>
                        &nbsp;
                        </mvt:if>
                        </td>
                        </tr>
                        </mvt:foreach>
                        </mvt:foreach>


                        <mvt:foreach iterator="charge" array="order:charges">
                        <tr class="order-charges">
                        <td colspan="4">&nbsp;</td>
                        <td class="charge-description">&mvt:charge:descrip;:</td>
                        <td class="charge-fee">&mvt:charge:formatted_disp_amt;</td>
                        </tr>
                        </mvt:foreach>

                        <tr class="totals">
                        <td colspan="4">&nbsp;</td>
                        <td class="total-prompt">Total:</td>
                        <td class="formatted-total">&mvt:order:formatted_total;</td>
                        </tr>
                        </table>

                        <mvt:if expr="l.settings:order:have_custom_order_field_val ues">
                        <br />
                        <table>
                        <tr class="heading">
                        <td colspan="2">Additional Order Information</td>
                        </tr>
                        </table>
                        </mvt:if>
                        <input type="submit" value="Add to Basket">
                        </form>

                        Comment


                          #13
                          are you using product attributes?
                          have a link to the page?

                          Comment


                            #14
                            This is on the Order status page. ORDS. So you will have to create an account and have past orders in the system.

                            Comment


                              #15
                              No resolution here. Help miva please.

                              Comment

                              Working...
                              X