Jump to content

Mutare tab Personalizare produs in prestashop 1.6.1.24


DanAndrei

Recommended Posts

Salutare,

Folosesc prestashop 1.6.1.24 si am mutat tabul de personalizare produs in zona pretului si atributelor.

Am facut niste modificari in global.css si product.css, iar partea estetica arata bine.

Problema este functionalitatea. din pacate butonul "Salveaza" nu functioneaza cum trebuie. In loc sa salveze personalizarea adauga produsul in cos (cu atributele selectate) si te directioneaza in pagina de cos. (Mie imi place si varianta aceasta daca ar salva si personalizarea)

Ma poate ajuta cineva sa imi spuna unde am gresit sau sa ma indrume?

codul a fost inserat dupa urmatoarele linii in product.tpl

397	</div> <!-- end attributes -->
398						{/if}
399					</div> <!-- end product_attributes -->
 {if isset($product) && $product->customizable}
			<!-- Customization --><div id="rsic">
			<section class="page-product-box2">
				<h3 class="page-product-heading2">{l s='Product customization'}</font></h3>
				<!-- Customizable products -->
                <form method="post" action="{$customizationFormTarget}" enctype="multipart/form-data" id="customizationForm" class="clearfix">
					<p class="infoCustomizable">
						{l s='After saving your customized product, remember to add it to your cart.'}
                      
ETC ETC ETC                      ETC ETC ETC           ETC ETC ETC
                      
					<p id="customizedDatas">
						<input type="hidden" name="quantityBackup" id="quantityBackup" value="" />
						<input type="hidden" name="submitCustomizedDatas" value="1" />
						<button class="button btn btn-default button button-small" name="saveCustomization">
							<span>{l s='Save'}</span>
						</button>
						<span id="ajax-loader" class="unvisible">
							<img src="{$img_ps_dir}loader.gif" alt="loader" />
						</span>
					</p>
				</form>
				<p class="clear required"><sup>*</sup> {l s='required fields'}</p>
			</section>
			<!-- end Customization --></div>
			{/if}
		{/if}

si apoi vine linia

<div class="box-cart-bottom">

 

Screenshot_1.png

Link to comment
Share on other sites

Toata zona de adaugare in cos este intr-un formular, la fel ca si partea de customizare. Cred ca tu ai pus formularul de customizare in cel de adaugare in cos, nu poti avea formular in formular, de aici cred ca este problema.

Link to comment
Share on other sites

Asa este, ai dreptate, am gasit tag-urile de form la ambele.

Oare exista rezolvare? se poate "separa in doua" formularul adauga in cos sau trebuie sa pun formularul de personalizare inainte sau dupa formularul adauga in cos?

Din punctul meu de vedere pozitia actuala ar fi cea mai estetica varianta.

 

 

Edited by DanAndrei (see edit history)
Link to comment
Share on other sites

Salutare,

Am facut niste teste. babeste sa spun asa. Am sa va rog doar sa imi comunicati daca am facut bine ce am facut sa nu.

Am pus tag-ul de </form> dupa </div> <!-- end product_attributes --> am inserat Personalizarea apoi am deschis din nou <form id="buy_block">

Am testat si pare ca functioneaza.

 

</div> <!-- end product_attributes -->
</form>

{if isset($product) && $product->customizable}
			<!-- Customization --><div id="rsic">
			<section class="page-product-box2">
				<h3 class="page-product-heading2">{l s='Product customization'}</font></h3>
				<!-- Customizable products -->
                <form method="post" action="{$customizationFormTarget}" enctype="multipart/form-data" id="customizationForm" class="clearfix">
					<p class="infoCustomizable">
                      
                      ETC ETC ETC
			</form>
				
			</section>
			<!-- end Customization --></div>
			{/if}
		{/if}
                 <form id="buy_block">
					<div class="box-cart-bottom">
						<div{if (!$allow_oosp && $product->quantity <= 0) || !$product->available_for_order || (isset($restricted_country_mode) && $restricted_country_mode) || $PS_CATALOG_MODE} class="unvisible"{/if}>
							<p id="add_to_cart" class="buttons_bottom_block no-print">
								<button type="submit" name="Submit" class="exclusive">
									<span>{if $content_only && (isset($product->customization_required) && $product->customization_required)}{l s='Customize'}{else}{l s='Add to cart'}{/if}</span>
								</button>

 

Edited by DanAndrei (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...