Когда я вставляю код HTML, он дублирует его части и работает неправильно - PullRequest
0 голосов
/ 05 мая 2020

Когда я вставляю код для переноса формы со страницы продукта на другую страницу, он отображается неправильно. Он показывает ДВА раскрывающихся списка (где клиент выбирает частоту заказа), и когда вы выбираете, и вы переходите на другую страницу, чтобы добавить блюда, на кассе отображается периодичность заказа 1 неделя, даже если вы выбрали 2, 3 или 4 недели из раскрывающегося меню на начальном этапе. стр.

Помогите, пожалуйста!

<form method="post" action="https://habibi-vegan.myshopify.com/tools/checkout/manage_subscription_box/select_products_checkout/4624953606229/32144866377813?shop_url=habibi-vegan.myshopify.com" id="product_form_4624953606229" accept-charset="UTF-8" class="product-form product-form-product-template
product-form--payment-button-no-variants" enctype="multipart/form-data" 
novalidate="novalidate" data-product-form=""><input type="hidden" name="form_type" 
value="product"><input type="hidden" name="utf8" value="✓">


<select name="id" id="ProductSelect-product-template" class="product-form__variants no-js">

<option value="32144866377813" selected="selected">
Default Title 
</option>

</select>



<div class="product-form__error-message-wrapper product-form__error-message-wrapper--hidden 
product-form__error-message-wrapper--has-payment-button" data-error-message-wrapper="" 
role="alert">
<span class="visually-hidden">Error </span>
<svg aria-hidden="true" focusable="false" role="presentation" class="icon icon-error" 
viewBox="0 0 14 14"><g fill="none" fill-rule="evenodd"><path d="M7 0a7 7 0 0 1 7 7 7 7 0 1 
1-7-7z"></path><path class="icon-error__symbol" d="M6.328 8.396l-.252-5.4h1.836l-.24 
5.4H6.328zM6.04 10.16c0-.528.432-.972.96-.972s.972.444.972.972c0 .516-.444.96-.972.96a.97.97 
0 0 1-.96-.96z"></path></g></svg>
<span class="product-form__error-message" data-error-message="">Quantity must be 1 
or more</span>
</div>

<div class="product-form__controls-group product-form__controls-group--submit">
<div class="product-form__item product-form__item--submit product-form__item--payment-button 
product-form__item--no-variants">
<span class="bold-ro__widget-loading" data-widget-loading="" style="display: none;"><span 
class="bold-ro__loading-container">
<style>
.bold-ro__widget-loading {
margin-left: 45%;
}
.bold-ro__widget-loading-icon {
border: 10px solid #f3f3f3;
border-radius: 50%;
border-top: 10px solid #3498db;
width: 50px;
height: 50px;
-webkit-animation: spin 2s linear infinite;
animation: spin 2s linear infinite;
margin-bottom: 20px;
}
</style>
<div data-bold-widget-loading-icon="" class="bold-ro__widget-loading-icon"></div>
</span></span><div class="ro_widget" style=""><div class="bold-ro__product bold-ro__product- 
id-4624953606229">
<div class="bold-ro__recurring-title">
    Subscribe and Save!
</div>

<div class="bold-ro__radio-div bold-ro__recurring-div bold-ro__bold-active bold-ro__sub">
<label class="bold-ro__recurring-lbl">
<input type="hidden" value="3" name="bold-ro__selector_radio_button" class="bold-ro__sub- 
box-radio-btn" checked="">
<span class="bold-ro__recurring-text bold-ro__subscription-only"></span>
</label>
<span class="bold-ro__see-details"><a href="javascript:;" class="bold-ro__detail-tooltip 
needsclick" aria-describedby="a11y-external-message">See details</a></span>
<div class="bold-ro__frequency-div">
<div class="bold-ro__frequency-label">
<div class="bold-ro__order-interval-container">
<span class="bold-ro__order-interval-lbl">Select your order interval</span>
<select class="bold-ro__order-interval">
<option data-frequency-type="2" data-frequency-num="1" data-frequency-type-text="Week(s)" value="2-1">Deliver every 1 Week(s)</option>
<option data-frequency-type="2" data-frequency-num="2" data-frequency-type-text="Week(s)" value="2-2">Deliver every 2 Week(s)</option>
<option data-frequency-type="2" data-frequency-num="3" data-frequency-type-text="Week(s)" value="2-3">Deliver every 3 Week(s)</option>
<option data-frequency-type="2" data-frequency-num="4" data-frequency-type-text="Week(s)" value="2-4">Deliver every 4 Week(s)</option>
<option data-frequency-type="2" data-frequency-num="5" data-frequency-type-text="Week(s)" value="2-5">Deliver every 5 Week(s)</option>
<option data-frequency-type="2" data-frequency-num="6" data-frequency-type-text="Week(s)" value="2-6">Deliver every 6 Week(s)</option>
</select>

</div>
<input type="hidden" name="frequency_num" class="bold-ro__frequency-num" value="4">
<input type="hidden" name="frequency_type" class="bold-ro__frequency-type" value="2">
<input name="frequency_type_text" class="bold-ro__frequency-type-text" type="hidden" value="Week(s)">                    

<input type="hidden" class="bold-ro__group-id" name="group_id" value="137396">
<input type="hidden" class="bold-ro__discounted-price" value="£49.95" name="discounted_price">
<input type="hidden" class="bold-ro__discount-percentage" value="0" name="_ro_discount_percentage">
<input type="hidden" class="bold-ro__unformatted-price" value="4995" name="_ro_unformatted_price">
<input type="hidden" name="csrf_bold_token" value="5986391e7ed880fb43f98ac13ebaa92c">
<input type="hidden" name="quantities[]" value="">
<input type="hidden" name="product_id[]" value="4624953606229">
<input type="hidden" name="variant_id[]" value="32144866377813">
<input type="hidden" name="note" value="">



</div>
</div>
</div>
</div></div>
<button class="btn button bold-ro__custombutton-4624953606229">Select Choices</button>. 
<button type="submit" name="add" aria-label="Add to cart" class="btn product-form__cart-submit btn--secondary-accent cartbutton" data-add-to-cart="" style="display: none;">
<span data-add-to-cart-text="">

Add to cart

</span>
<span class="hide" data-loader="">
<svg aria-hidden="true" focusable="false" role="presentation" class="icon icon-spinner" viewBox="0 0 20 20"><path d="M7.229 1.173a9.25 9.25 0 1 0 11.655 11.412 1.25 1.25 0 1 0-2.4-.698 6.75 6.75 0 1 1-8.506-8.329 1.25 1.25 0 1 0-.75-2.385z" fill="#919EAB"></path></svg>
</span>
</button>

<div data-shopify="payment-button" class="shopify-payment-button"><button class="shopify-payment-button__button shopify-payment-button__button--unbranded shopify-payment-button__button--hidden" disabled="disabled" aria-hidden="true">&nbsp;</button><button class="shopify-payment-button__more-options shopify-payment-button__button--hidden" disabled="disabled" aria-hidden="true">&nbsp;</button></div>

</div>
</div>
<input type="hidden" name="shopify_customer_id" value="" class="bold-ro__hidden_input shopify_customer_id bold-ro__customer_field"><input type="hidden" name="email" value="" class="bold-ro__hidden_input email bold-ro__customer_field"><input type="hidden" name="address1" value="" class="bold-ro__hidden_input address1 bold-ro__customer_field"><input type="hidden" name="address2" value="" class="bold-ro__hidden_input address2 bold-ro__customer_field"><input type="hidden" name="city" value="" class="bold-ro__hidden_input city bold-ro__customer_field"><input type="hidden" name="company" value="" class="bold-ro__hidden_input company bold-ro__customer_field"><input type="hidden" name="country" value="" class="bold-ro__hidden_input country bold-ro__customer_field"><input type="hidden" name="first_name" value="" class="bold-ro__hidden_input first_name bold-ro__customer_field"><input type="hidden" name="last_name" value="" class="bold-ro__hidden_input last_name bold-ro__customer_field"><input type="hidden" name="phone" value="" class="bold-ro__hidden_input phone bold-ro__customer_field"><input type="hidden" name="province" value="" class="bold-ro__hidden_input province bold-ro__customer_field"><input type="hidden" name="zip" value="" class="bold-ro__hidden_input zip bold-ro__customer_field"></form>
...