[Skip to main content](#vessel-content)

#   change add to cart bottom

##

- **[marekbr](/forum/user/10352-marekbr "View marekbr's Profile")**
- [![marekbr's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/10352-marekbr "View marekbr's Profile") Topic Author
- [ Offline](/forum/user/10352-marekbr)

Less More

- Posts: 2
- Thank you received: 1
-
-

14 years 3 weeks ago [\#72037](#72037) by [marekbr](/forum/user/10352-marekbr "View marekbr's Profile")  *[change add to cart bottom](/forum/4-how-to/72037-change-add-to-cart-bottom#72037 "hi i am new and start with my first problem :)  I want to know if you can change &quot;Add to Cart&quot; buttom, in order to be green when the availability of the item is so great, yellow when it is low, example when 10 pcs remaining, and red when the article is finished, but clicking it brings you to contact page  thanks for the reply")* was created by *[marekbr](/forum/user/10352-marekbr "View marekbr's Profile")*

hi i am new and start with my first problem ![:)](/media/kunena/emoticons/3.png ":)")

I want to know if you can change "Add to Cart" buttom, in order to be green when the availability of the item is so great, yellow when it is low, example when 10 pcs remaining, and red when the article is finished, but clicking it brings you to contact page

thanks for the reply

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzcyMDM3LWNoYW5nZS1hZGQtdG8tY2FydC1ib3R0b20/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

14 years 3 weeks ago -  14 years 3 weeks ago [\#72108](#72108) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Re: change add to cart bottom](/forum/4-how-to/72037-change-add-to-cart-bottom#72108 "hi i am new and start with my first problem :)  I want to know if you can change &quot;Add to Cart&quot; buttom, in order to be green when the availability of the item is so great, yellow when it is low, example when 10 pcs remaining, and red when the article is finished, but clicking it brings you to contact page  thanks for the reply")*

Hi,

The easiest way is to use the contact button instead of the add to cart button in Configuration &gt; Display, select "For all products" for the option "Display a contact button on the product page" and "No" for the option "Display 'add to cart' button".

Then edit the view "product / show_default" in HikaShop &gt; Display &gt; Views.

Replace the lines: Code:

&lt;?php $contact = $this-&gt;config-&gt;get('product_contact',0); if (hikashop_level(1) &amp;&amp; $this-&gt;row-&gt;product_quantity == 0 &#124;&#124; ($contact == 2 &#124;&#124; ($contact == 1 &amp;&amp; !empty ($this-&gt;element-&gt;product_contact)))) { $empty = ''; $params = new HikaParameter($empty); echo $this-&gt;cart-&gt;displayButton(JText :: _('CONTACT_US_FOR_INFO'), 'contact_us', $params, hikashop_completeLink('product&amp;task=contact&amp;cid=' . $this-&gt;row-&gt;product_id), 'window.location=\'' . hikashop_completeLink('product&amp;task=contact&amp;cid=' . $this-&gt;row-&gt;product_id) . '\';return false;'); } ?&gt;

By: Code:

&lt;?php $contact = $this-&gt;config-&gt;get('product_contact',0); if (hikashop_level(1) &amp;&amp; $this-&gt;row-&gt;product_quantity == 0 &#124;&#124; ($contact == 2 &#124;&#124; ($contact == 1 &amp;&amp; !empty ($this-&gt;element-&gt;product_contact)))) { $empty = ''; $params = new HikaParameter($empty); echo $this-&gt;cart-&gt;displayButton(JText :: _('ADD_TO_CART'), 'contact_us', $params, hikashop_completeLink('product&amp;task=contact&amp;cid=' . $this-&gt;row-&gt;product_id), 'window.location=\'' . hikashop_completeLink('product&amp;task=contact&amp;cid=' . $this-&gt;row-&gt;product_id) . '\';return false;','',0,1,'redButton'); } ?&gt;

And in the view "product / quantity", replace: Code:

echo $this-&gt;cart-&gt;displayButton(JText::_('ADD_TO_CART'),'add',$this-&gt;params,$url,$this-&gt;ajax,'',$max,$min);

By: Code:

echo $this-&gt;cart-&gt;displayButton(JText::_('ADD_TO_CART'),'add',$this-&gt;params,$url,$this-&gt;ajax,'',$max,$min,'greenButton');

Where the if condition is: "if($this-&gt;row-&gt;product_quantity==-1){"

And where the if condition is: "}elseif($this-&gt;row-&gt;product_quantity&gt;0){" add the following code: Code:

if($this-&gt;row-&gt;product_quantity &gt; 10){$btnClass = 'greenButton';} elseif($this-&gt;row-&gt;product_quantity &lt;= 10){$btnClass = 'yellowButton';}

And replace the line: Code:

echo $this-&gt;cart-&gt;displayButton(JText::_('ADD_TO_CART'),'add',$this-&gt;params,$url,$this-&gt;ajax,'',$max,$min);

By: Code:

echo $this-&gt;cart-&gt;displayButton(JText::_('ADD_TO_CART'),'add',$this-&gt;params,$url,$this-&gt;ajax,'',$max,$min,$btnClass);

Then you have to create the properties for the new classes in HikaShop &gt; Configuration &gt; Display "Front-end default CSS" file.
Like: Code:

.greenButton{ background-color: green; ... }

Ps: you need the essential version for doing this.

Last edit: 14 years 3 weeks ago by [Xavier](/forum/user/4105-xavier "View Xavier's Profile").

The following user(s) said Thank You: [danilo87](/forum/user/10180-danilo87 "View danilo87's Profile"), [marekbr](/forum/user/10352-marekbr "View marekbr's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzcyMDM3LWNoYW5nZS1hZGQtdG8tY2FydC1ib3R0b20/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[marekbr](/forum/user/10352-marekbr "View marekbr's Profile")**
- [![marekbr's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/10352-marekbr "View marekbr's Profile") Topic Author
- [ Offline](/forum/user/10352-marekbr)

Less More

- Posts: 2
- Thank you received: 1
-
-

14 years 3 weeks ago [\#72755](#72755) by [marekbr](/forum/user/10352-marekbr "View marekbr's Profile")  Replied by *[marekbr](/forum/user/10352-marekbr "View marekbr's Profile")* on topic *[Re: change add to cart bottom](/forum/4-how-to/72037-change-add-to-cart-bottom#72755 "hi i am new and start with my first problem :)  I want to know if you can change &quot;Add to Cart&quot; buttom, in order to be green when the availability of the item is so great, yellow when it is low, example when 10 pcs remaining, and red when the article is finished, but clicking it brings you to contact page  thanks for the reply")*

for do every or only for do new greenbuttom class?

The following user(s) said Thank You: [danilo87](/forum/user/10180-danilo87 "View danilo87's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzcyMDM3LWNoYW5nZS1hZGQtdG8tY2FydC1ib3R0b20/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

14 years 3 weeks ago [\#73050](#73050) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Re: change add to cart bottom](/forum/4-how-to/72037-change-add-to-cart-bottom#73050 "hi i am new and start with my first problem :)  I want to know if you can change &quot;Add to Cart&quot; buttom, in order to be green when the availability of the item is so great, yellow when it is low, example when 10 pcs remaining, and red when the article is finished, but clicking it brings you to contact page  thanks for the reply")*

Hi,

The code given is to do all the changes, green button, yellow button and red button.
You have to create the properties for each button now.

To do that create the properties for the classes: ".greenButton" ".yellowButton" ".redButton" in the Frontend CSS File in HikaShop &gt; Configuration &gt; Display.

The following user(s) said Thank You: [danilo87](/forum/user/10180-danilo87 "View danilo87's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzcyMDM3LWNoYW5nZS1hZGQtdG8tY2FydC1ib3R0b20/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[danilo87](/forum/user/10180-danilo87 "View danilo87's Profile")**
- [![danilo87's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/10180-danilo87 "View danilo87's Profile")
- [ Offline](/forum/user/10180-danilo87)

Less More

- Posts: 47
- Thank you received: 0
-
-

14 years 2 weeks ago [\#73718](#73718) by [danilo87](/forum/user/10180-danilo87 "View danilo87's Profile")  Replied by *[danilo87](/forum/user/10180-danilo87 "View danilo87's Profile")* on topic *[Re: change add to cart bottom](/forum/4-how-to/72037-change-add-to-cart-bottom#73718 "hi i am new and start with my first problem :)  I want to know if you can change &quot;Add to Cart&quot; buttom, in order to be green when the availability of the item is so great, yellow when it is low, example when 10 pcs remaining, and red when the article is finished, but clicking it brings you to contact page  thanks for the reply")*

hello

at me do not work the red button for the rest everything is ok, show the message "esaurito" in eng "over" but no one red button

this is the site:

[ www.resemagien.it/index.php?option=com\_h...t=listing&amp;Itemid=127](http://www.resemagien.it/index.php?option=com_hikashop&view=product&layout=listing&Itemid=127)

I also have a question, buying the business version I have to redo these steps?

sry for my english ![:P](/media/kunena/emoticons/14.png ":P")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzcyMDM3LWNoYW5nZS1hZGQtdG8tY2FydC1ib3R0b20/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

14 years 2 weeks ago -  14 years 2 weeks ago [\#73982](#73982) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Re: change add to cart bottom](/forum/4-how-to/72037-change-add-to-cart-bottom#73982 "hi i am new and start with my first problem :)  I want to know if you can change &quot;Add to Cart&quot; buttom, in order to be green when the availability of the item is so great, yellow when it is low, example when 10 pcs remaining, and red when the article is finished, but clicking it brings you to contact page  thanks for the reply")*

Hi,

Do you have enabled the "Contact" button for all products in the HikaShop configuration ?
And see if this option is enabled in the product edition page.

Buying the business edition will not erase the modifications, but you can make a save before upgrading.

Last edit: 14 years 2 weeks ago by [Xavier](/forum/user/4105-xavier "View Xavier's Profile").

The following user(s) said Thank You: [danilo87](/forum/user/10180-danilo87 "View danilo87's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzcyMDM3LWNoYW5nZS1hZGQtdG8tY2FydC1ib3R0b20/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[danilo87](/forum/user/10180-danilo87 "View danilo87's Profile")**
- [![danilo87's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/10180-danilo87 "View danilo87's Profile")
- [ Offline](/forum/user/10180-danilo87)

Less More

- Posts: 47
- Thank you received: 0
-
-

14 years 2 weeks ago [\#73990](#73990) by [danilo87](/forum/user/10180-danilo87 "View danilo87's Profile")  Replied by *[danilo87](/forum/user/10180-danilo87 "View danilo87's Profile")* on topic *[Re: change add to cart bottom](/forum/4-how-to/72037-change-add-to-cart-bottom#73990 "hi i am new and start with my first problem :)  I want to know if you can change &quot;Add to Cart&quot; buttom, in order to be green when the availability of the item is so great, yellow when it is low, example when 10 pcs remaining, and red when the article is finished, but clicking it brings you to contact page  thanks for the reply")*

sry but i don't find where i must enabled that contact button

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzcyMDM3LWNoYW5nZS1hZGQtdG8tY2FydC1ib3R0b20/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

14 years 2 weeks ago [\#74118](#74118) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Re: change add to cart bottom](/forum/4-how-to/72037-change-add-to-cart-bottom#74118 "hi i am new and start with my first problem :)  I want to know if you can change &quot;Add to Cart&quot; buttom, in order to be green when the availability of the item is so great, yellow when it is low, example when 10 pcs remaining, and red when the article is finished, but clicking it brings you to contact page  thanks for the reply")*

Hi,

In HikaShop &gt; Configuration &gt; Display, the option "Display a contact button on the product page".

The following user(s) said Thank You: [danilo87](/forum/user/10180-danilo87 "View danilo87's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzcyMDM3LWNoYW5nZS1hZGQtdG8tY2FydC1ib3R0b20/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[danilo87](/forum/user/10180-danilo87 "View danilo87's Profile")**
- [![danilo87's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/10180-danilo87 "View danilo87's Profile")
- [ Offline](/forum/user/10180-danilo87)

Less More

- Posts: 47
- Thank you received: 0
-
-

14 years 2 weeks ago [\#74129](#74129) by [danilo87](/forum/user/10180-danilo87 "View danilo87's Profile")  Replied by *[danilo87](/forum/user/10180-danilo87 "View danilo87's Profile")* on topic *[Re: change add to cart bottom](/forum/4-how-to/72037-change-add-to-cart-bottom#74129 "hi i am new and start with my first problem :)  I want to know if you can change &quot;Add to Cart&quot; buttom, in order to be green when the availability of the item is so great, yellow when it is low, example when 10 pcs remaining, and red when the article is finished, but clicking it brings you to contact page  thanks for the reply")*

i must buy first business version ![:P](/media/kunena/emoticons/14.png ":P")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzcyMDM3LWNoYW5nZS1hZGQtdG8tY2FydC1ib3R0b20/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[danilo87](/forum/user/10180-danilo87 "View danilo87's Profile")**
- [![danilo87's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/10180-danilo87 "View danilo87's Profile")
- [ Offline](/forum/user/10180-danilo87)

Less More

- Posts: 47
- Thank you received: 0
-
-

14 years 1 week ago -  14 years 1 week ago [\#74939](#74939) by [danilo87](/forum/user/10180-danilo87 "View danilo87's Profile")  Replied by *[danilo87](/forum/user/10180-danilo87 "View danilo87's Profile")* on topic *[Re: change add to cart bottom](/forum/4-how-to/72037-change-add-to-cart-bottom#74939 "hi i am new and start with my first problem :)  I want to know if you can change &quot;Add to Cart&quot; buttom, in order to be green when the availability of the item is so great, yellow when it is low, example when 10 pcs remaining, and red when the article is finished, but clicking it brings you to contact page  thanks for the reply")*

hi

i now have business version and activated display button, but i don't see it, but I would like a red button to add products to cart, however, even if they are terminated

Last edit: 14 years 1 week ago by [danilo87](/forum/user/10180-danilo87 "View danilo87's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzcyMDM3LWNoYW5nZS1hZGQtdG8tY2FydC1ib3R0b20/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

14 years 1 week ago [\#75029](#75029) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Re: change add to cart bottom](/forum/4-how-to/72037-change-add-to-cart-bottom#75029 "hi i am new and start with my first problem :)  I want to know if you can change &quot;Add to Cart&quot; buttom, in order to be green when the availability of the item is so great, yellow when it is low, example when 10 pcs remaining, and red when the article is finished, but clicking it brings you to contact page  thanks for the reply")*

Hi,

By default the contact us button is displayed only on the product page, not in the listing page.
But you can edit the view "product / listing_table" and try to add the code: Code:

&lt;?php $contact = $this-&gt;config-&gt;get('product_contact',0); if (hikashop_level(1) &amp;&amp; $this-&gt;row-&gt;product_quantity == 0 &#124;&#124; ($contact == 2 &#124;&#124; ($contact == 1 &amp;&amp; !empty ($this-&gt;element-&gt;product_contact)))) { $empty = ''; $params = new HikaParameter($empty); echo $this-&gt;cart-&gt;displayButton(JText :: _('ADD_TO_CART'), 'contact_us', $params, hikashop_completeLink('product&amp;task=contact&amp;cid=' . $this-&gt;row-&gt;product_id), 'window.location=\'' . hikashop_completeLink('product&amp;task=contact&amp;cid=' . $this-&gt;row-&gt;product_id) . '\';return false;','',0,1,'redButton'); } ?&gt;

After: Code:

&lt;td class="hikashop_product_add_to_cart_row"&gt; &lt;?php $this-&gt;setLayout('add_to_cart_listing'); echo $this-&gt;loadTemplate(); ?&gt; &lt;/td&gt;

The following user(s) said Thank You: [danilo87](/forum/user/10180-danilo87 "View danilo87's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzcyMDM3LWNoYW5nZS1hZGQtdG8tY2FydC1ib3R0b20/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[danilo87](/forum/user/10180-danilo87 "View danilo87's Profile")**
- [![danilo87's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/10180-danilo87 "View danilo87's Profile")
- [ Offline](/forum/user/10180-danilo87)

Less More

- Posts: 47
- Thank you received: 0
-
-

13 years 7 months ago [\#96193](#96193) by [danilo87](/forum/user/10180-danilo87 "View danilo87's Profile")  Replied by *[danilo87](/forum/user/10180-danilo87 "View danilo87's Profile")* on topic *[Re: change add to cart bottom](/forum/4-how-to/72037-change-add-to-cart-bottom#96193 "hi i am new and start with my first problem :)  I want to know if you can change &quot;Add to Cart&quot; buttom, in order to be green when the availability of the item is so great, yellow when it is low, example when 10 pcs remaining, and red when the article is finished, but clicking it brings you to contact page  thanks for the reply")*

hi, i re-open thi tread because i want to make a change

we have added to our list items ordered, I would create another type of button,
example, when the items are more than 10 put the green button, less than 10 yellow, then I thought of doing such a button "orange" for the items ordered, with the opportunity to add to the cart, and as the amount I could put "unlimited '

or accepted suggestions

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzcyMDM3LWNoYW5nZS1hZGQtdG8tY2FydC1ib3R0b20/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

13 years 7 months ago [\#96228](#96228) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Re: change add to cart bottom](/forum/4-how-to/72037-change-add-to-cart-bottom#96228 "hi i am new and start with my first problem :)  I want to know if you can change &quot;Add to Cart&quot; buttom, in order to be green when the availability of the item is so great, yellow when it is low, example when 10 pcs remaining, and red when the article is finished, but clicking it brings you to contact page  thanks for the reply")*

Hi,

You can use the same method as explained before, with some changes to change the color when ordered items.
The changes needs to be made in the view "product / quantity". Check if the customer already purchased the product, and change the color if it's the case.
It require good PHP knowledge.

The following user(s) said Thank You: [danilo87](/forum/user/10180-danilo87 "View danilo87's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzcyMDM3LWNoYW5nZS1hZGQtdG8tY2FydC1ib3R0b20/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[danilo87](/forum/user/10180-danilo87 "View danilo87's Profile")**
- [![danilo87's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/10180-danilo87 "View danilo87's Profile")
- [ Offline](/forum/user/10180-danilo87)

Less More

- Posts: 47
- Thank you received: 0
-
-

13 years 7 months ago -  13 years 7 months ago [\#96387](#96387) by [danilo87](/forum/user/10180-danilo87 "View danilo87's Profile")  Replied by *[danilo87](/forum/user/10180-danilo87 "View danilo87's Profile")* on topic *[Re: change add to cart bottom](/forum/4-how-to/72037-change-add-to-cart-bottom#96387 "hi i am new and start with my first problem :)  I want to know if you can change &quot;Add to Cart&quot; buttom, in order to be green when the availability of the item is so great, yellow when it is low, example when 10 pcs remaining, and red when the article is finished, but clicking it brings you to contact page  thanks for the reply")*

thanks i created the 3 buttons, the problem is allignment,
green button and yellow button have an allignment, orange button have an other allignment, i tried to center it, without result, i tried to put:

> .hikashop\_products .hikashop\_product\_stock .hikashop\_cart\_buttom {
> margin-top: -35px;
> }

but he center yellow and green, but not orange

i put a screenshot and the site is:

> [ www.resemagien.it/index.php?option=com\_h...t=listing&amp;Itemid=179](http://www.resemagien.it/index.php?option=com_hikashop&view=product&layout=listing&Itemid=179)

to see class

I am going crazy to understand why ![&lt;.&lt;](/lookleft.gif "&lt;.&lt;")

thanks

- [ ![center.jpg](/forum/attachment/9331) ](/forum/attachment/9331 "center.jpg") [ ](/forum/attachment/9331?download=1 "center.jpg")

Last edit: 13 years 7 months ago by [danilo87](/forum/user/10180-danilo87 "View danilo87's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzcyMDM3LWNoYW5nZS1hZGQtdG8tY2FydC1ib3R0b20/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

13 years 7 months ago [\#96443](#96443) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Re: change add to cart bottom](/forum/4-how-to/72037-change-add-to-cart-bottom#96443 "hi i am new and start with my first problem :)  I want to know if you can change &quot;Add to Cart&quot; buttom, in order to be green when the availability of the item is so great, yellow when it is low, example when 10 pcs remaining, and red when the article is finished, but clicking it brings you to contact page  thanks for the reply")*

Hi,

In the code I see: Code:

&lt;br&gt;&lt;/br&gt; &lt;br&gt;&lt;/br&gt;

That's why the buttons are not centered. I think that you have added it in the view. Try to remove it.

The following user(s) said Thank You: [danilo87](/forum/user/10180-danilo87 "View danilo87's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzcyMDM3LWNoYW5nZS1hZGQtdG8tY2FydC1ib3R0b20/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[danilo87](/forum/user/10180-danilo87 "View danilo87's Profile")**
- [![danilo87's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/10180-danilo87 "View danilo87's Profile")
- [ Offline](/forum/user/10180-danilo87)

Less More

- Posts: 47
- Thank you received: 0
-
-

13 years 7 months ago [\#96457](#96457) by [danilo87](/forum/user/10180-danilo87 "View danilo87's Profile")  Replied by *[danilo87](/forum/user/10180-danilo87 "View danilo87's Profile")* on topic *[Re: change add to cart bottom](/forum/4-how-to/72037-change-add-to-cart-bottom#96457 "hi i am new and start with my first problem :)  I want to know if you can change &quot;Add to Cart&quot; buttom, in order to be green when the availability of the item is so great, yellow when it is low, example when 10 pcs remaining, and red when the article is finished, but clicking it brings you to contact page  thanks for the reply")*

thanks now works fine ![:)](/media/kunena/emoticons/3.png ":)")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzcyMDM3LWNoYW5nZS1hZGQtdG8tY2FydC1ib3R0b20/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.108 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
