Jump to content

How to arrange price and add to cart button in 1 row?


Recommended Posts

Hello Sir/Madam,

 

Is it possible to arrange price and add to cart button in 1 row?

 

For example:

 

Price: $19.99 <Add To Cart> button

 

Not:

 

Price: $19.99

<Add To Cart> button

 

 

I edit through the code:

 

---------------------------------------------------------------------------------------------------------------------------

{if (!$PS_CATALOG_MODE AND ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))}

{if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)}<span class="price">{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}</span>{/if}

{if isset($product.online_only) && $product.online_only}<span class="online_only">{l s='Online only!'}</span>{/if}

{/if}

 

 

{if ($product.id_product_attribute == 0 || (isset($add_prod_display) && ($add_prod_display == 1))) && $product.available_for_order && !isset($restricted_country_mode) && !$PS_CATALOG_MODE}

{if ($product.allow_oosp || $product.quantity > 0) && $product.customizable != 2}

<a class="ajax_add_to_cart_button exclusive" rel="ajax_id_product_{$product.id_product|intval}" href="{$link->getPageLink('cart.php')}?add&id_product={$product.id_product|intval}{if isset($static_token)}&token={$static_token}{/if}"}"></a>

{else}

<span class="exclusive">{l s='Add to cart'}</span>

{/if}

{/if}

---------------------------------------------------------------------------------------------------------------------------

 

But I am failed to do it. Whatever I tried to modify the code, it still remains to display in 2 rows. Maybe I am so stupid for this knowledge. Please give me a hand. Thanks first for kind attention and help.

 

PS: I am using Prestashop 1.4.2.5

 

Best regards,

Derox

Link to comment
Share on other sites

Hi Carl Favre,

 

Yes, I did it. But I still failed to modify it.

 

Could you please advice, what is the code I should use to arrange those price and add to cart button in the same row? I tried to add " <h4> content </h4>" to combine those 2 contents, but it still remains to display in 2 rows.

 

I have no idea at all regarding this problem. Please give me a hand, thank you very much.

 

Best regards,

Derox

Link to comment
Share on other sites

  • 2 weeks later...

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...