edit product page quantity block

  • Posts: 12
  • Thank you received: 0
11 years 5 months ago #114645

original :
"quantity box" "+" "-" "Add to cart"
I want to move "+"
to have:
"+" "quantity box" "-" "Add to cart"

i cant find the file containing this code.

Please Log in or Create an account to join the conversation.

  • Posts: 2334
  • Thank you received: 403
11 years 5 months ago #114660

Hi there,

It's in the file cart.php in administrator/components/com_hikashop/helpers. The lines you are looking for are:

<table>
						<tr>
							<td rowspan="2">
								<input id="hikashop_product_quantity_field_'.$i.'" type="text" value="'.JRequest::getInt('quantity',$min_quantity).'" class="hikashop_product_quantity_field" name="quantity" onchange="hikashopCheckQuantityChange(\'hikashop_product_quantity_field_'.$i.'\','.$max_quantity.','.$min_quantity.');" />
							</td>
							<td>
								<a id="hikashop_product_quantity_field_change_plus_'.$i.'" class="hikashop_product_quantity_field_change_plus hikashop_product_quantity_field_change" href="#" onclick="return hikashopQuantityChange(\'hikashop_product_quantity_field_'.$i.'\',1,'.$max_quantity.','.$min_quantity.');">+</a>
							</td>
							<td rowspan="2">
								'.$html.'
							</td>
						</tr>
						<tr>
							<td>
								<a id="hikashop_product_quantity_field_change_minus_'.$i.'" class="hikashop_product_quantity_field_change_minus hikashop_product_quantity_field_change" href="#" onclick="return hikashopQuantityChange(\'hikashop_product_quantity_field_'.$i.'\',0,'.$max_quantity.','.$min_quantity.');">&ndash;</a>
							</td>
						</tr>
					</table>

I would however suggest you to try to use css to do what you want instead of editing this code since any modification would not be conserved when updating.

The following user(s) said Thank You: up2sky

Please Log in or Create an account to join the conversation.

  • Posts: 12
  • Thank you received: 0
11 years 5 months ago #114737

Thank you!!
I was looking just in \components\com_hikashop\
Why everything in so different folders ? ((
I tried just CSS, but it wont fit my wishes. So i need to change some code.

Please Log in or Create an account to join the conversation.

  • Posts: 26168
  • Thank you received: 4030
  • MODERATOR
11 years 5 months ago #114764

Hi,

The quantity input has to be override using the "template override" explained in the developer documentation:
www.hikashop.com/fr/support/documentatio...tation.html#override

Most of elements are in views (and you have to use the view override interface in the HikaShop backend if you want to have the ability to update HikaShop without loosing your modification) but some core elements has been added in helper files.
Because it is not safe to edit the core files, we implemented another method to override it.
But we are working on a new system, easier, for this kind of customization.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: up2sky

Please Log in or Create an account to join the conversation.

Time to create page: 0.074 seconds
Powered by Kunena Forum