- Posts: 27
- Thank you received: 0
How to put "add2cart" button above wishlist button
Best Regards
ff87
Please Log in or Create an account to join the conversation.
- Posts: 12953
- Thank you received: 1778
Using some CSS code will probably do the job.
Please Log in or Create an account to join the conversation.
Apart from that, I don´t think that it has something to do with CSS as content from tables can´t be changed with CSS. It must have to do with PHP, what do you think?
In the attachment, you can see what I mean.
Please Log in or Create an account to join the conversation.
Indeed it will require php edition because actually the add to cart button is in a table.
To have what you want, you will have to edit the file "administrator/components/com_hikashop/helper/cart" function "displayButton()" to edit the HTML part.
This will be changed in a future release, to allow an easiest edition of the add to cart button.
Please Log in or Create an account to join the conversation.
unfortunately, I can´t find the code of the button to move it above the code of the wishlist button. I was looking for this:
<input class="btn button hikashop_cart_input_button art-button" name="add" value="In den Warenkorb" onclick="var field=document.getElementById('hikashop_product_quantity_field_1');if(hikashopCheckChangeForm('item','hikashop_product_form')){ return hikashopModifyQuantity('1',field,1,0,'cart'); } else { return false; }" type="submit">
Can you give me a boost how to do it correctly?
There is only the table for the + and - buttons somehow.
Please Log in or Create an account to join the conversation.
You have to edit that code:
Here is an example of code to replace the table.
Please Log in or Create an account to join the conversation.
But when I replace the table with your given code, I only get a blank page after a refreshing the page.
The replacement looks like this:
}else{
$html ='
<div class="hikashop_product_quantity_div hikashop_product_quantity_input_div_default">
<input id="hikashop_product_quantity_field_<?php echo $i; ?>" type="text" value="<?php echo JRequest::getInt('quantity',$min_quantity); ?>" class="hikashop_product_quantity_field" name="quantity" onchange="hikashopCheckQuantityChange('hikashop_product_quantity_field_<?php echo $i; ?>',<?php echo $max_quantity; ?>,<?php echo $min_quantity; ?>);" />
</div>
<div class="hikashop_product_quantity_div hikashop_product_quantity_change_div_default">
<div class="hikashop_product_quantity_change_div_plus_default">
<a id="hikashop_product_quantity_field_change_plus_<?php echo $i; ?>" class="hikashop_product_quantity_field_change_plus hikashop_product_quantity_field_change" href="#" onclick="return hikashopQuantityChange('hikashop_product_quantity_field_<?php echo $i; ?>',1,<?php echo $max_quantity; ?>,<?php echo $min_quantity; ?>);">+</a>
</div>
<div class="hikashop_product_quantity_change_div_minus_default">
<a id="hikashop_product_quantity_field_change_minus_<?php echo $i; ?>" class="hikashop_product_quantity_field_change_minus hikashop_product_quantity_field_change" href="#" onclick="return hikashopQuantityChange('hikashop_product_quantity_field_<?php echo $i; ?>',0,<?php echo $max_quantity; ?>,<?php echo $min_quantity; ?>);">–</a>
</div>
</div>
<div class="hikashop_product_quantity_div hikashop_product_quantity_add_to_cart_div hikashop_product_quantity_add_to_cart_div_default">
<?php echo $html; ?>
</div>
';
}
Please Log in or Create an account to join the conversation.
Indeed, I gave you this code but I had not adapted it for this modification.
Thanks to try:
Please Log in or Create an account to join the conversation.
This problem has already been solved but thanks anyway. *thumbs up*
Best Regards
Please Log in or Create an account to join the conversation.