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

#   Checkout Button Disappears Once Variant Is Chosen

##

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

Less More

- Posts: 75
- Thank you received: 7
-
-

4 years 8 months ago [\#339377](#339377) by [wildweststudios](/forum/user/31720-wildweststudios "View wildweststudios's Profile")  *[Checkout Button Disappears Once Variant Is Chosen](/forum/25-install-update/903964-checkout-button-disappears-once-variant-is-chosen#339377 "-- HikaShop version -- : 4.4.5 -- Joomla version -- : 3.10.3 -- PHP version -- : 7.4.27 -- Browser(s) name and version -- : Firefox 96.0.3  I notice that when a variant is chosen from the dropdown on the product display page that my Checkout button at the bottom of the right side column then disappears.  It must have been this way for a long time and I never saw it until now. You can still add to cart as normal, and then customers have been getting to checkout from the mini-cart module, but the button itself is missing.  Going to another product will return the Checkout button, but choosing any variant will remove it.  I can't see what has been done to cause this, but I track the code to the 'product/show&#95;default.php' view, where I see this:  I cannot quite figure out what to do here. Is there some modification of this code which will allow the checkout button to remain once a variant is chosen?")* was created by *[wildweststudios](/forum/user/31720-wildweststudios "View wildweststudios's Profile")*

-- HikaShop version -- : 4.4.5
-- Joomla version -- : 3.10.3
-- PHP version -- : 7.4.27
-- Browser(s) name and version -- : Firefox 96.0.3

I notice that when a variant is chosen from the dropdown on the product display page that my Checkout button at the bottom of the right side column then disappears.

It must have been this way for a long time and I never saw it until now. You can still add to cart as normal, and then customers have been getting to checkout from the mini-cart module, but the button itself is missing.

Going to another product will return the Checkout button, but choosing any variant will remove it.

I can't see what has been done to cause this, but I track the code to the 'product/show_default.php' view, where I see this:

Code:

&lt;?php } if(empty ($this-&gt;element-&gt;characteristics) &#124;&#124; $this-&gt;params-&gt;get('characteristic_display')!='list'){ ?&gt; &lt;div id="hikashop_product_quantity_main" class="hikashop_product_quantity_main"&gt; &lt;?php $this-&gt;row = &amp; $this-&gt;element; $this-&gt;ajax = 'if(hikashopCheckChangeForm(\'item\',\'hikashop_product_form\')){ return hikashopModifyQuantity(\'' . $this-&gt;row-&gt;product_id . '\',field,1' . $form . ',\'cart\'); } else { return false; }'; $this-&gt;setLayout('quantity'); echo $this-&gt;loadTemplate(); ?&gt; &lt;a id="checkoutbut" class="btn" href="/checkout"&gt;Checkout&lt;/a&gt; &lt;/div&gt; &lt;?php } ?&gt;

I cannot quite figure out what to do here. Is there some modification of this code which will allow the checkout button to remain once a variant is chosen?

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

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86357
- Thank you received: 14289
-
-

4 years 8 months ago [\#339378](#339378) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Checkout Button Disappears Once Variant Is Chosen](/forum/25-install-update/903964-checkout-button-disappears-once-variant-is-chosen#339378 "-- HikaShop version -- : 4.4.5 -- Joomla version -- : 3.10.3 -- PHP version -- : 7.4.27 -- Browser(s) name and version -- : Firefox 96.0.3  I notice that when a variant is chosen from the dropdown on the product display page that my Checkout button at the bottom of the right side column then disappears.  It must have been this way for a long time and I never saw it until now. You can still add to cart as normal, and then customers have been getting to checkout from the mini-cart module, but the button itself is missing.  Going to another product will return the Checkout button, but choosing any variant will remove it.  I can't see what has been done to cause this, but I track the code to the 'product/show&#95;default.php' view, where I see this:  I cannot quite figure out what to do here. Is there some modification of this code which will allow the checkout button to remain once a variant is chosen?")*

Hi,

I couldn't access the URL you provided:
[ i.imgur.com/tfGJe7Y.png](https://i.imgur.com/tfGJe7Y.png)
However, I checked some other products you have (they didn't have variants, unfortunately), and I think that the issue is that you added your checkout button in the show_default.php after the code Code:

$this-&gt;setLayout('quantity'); echo $this-&gt;loadTemplate();

but you didn't do the same modification in product / show.php where the variant HTML is generated. So when you switch the variant, the HTML of the area in the div hikashop_product_quantity_main is replaced by the HTML of the selected variant generated by product / show.php and thus the button is missing from it.

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

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

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

Less More

- Posts: 75
- Thank you received: 7
-
-

4 years 8 months ago [\#339385](#339385) by [wildweststudios](/forum/user/31720-wildweststudios "View wildweststudios's Profile")  Replied by *[wildweststudios](/forum/user/31720-wildweststudios "View wildweststudios's Profile")* on topic *[Checkout Button Disappears Once Variant Is Chosen](/forum/25-install-update/903964-checkout-button-disappears-once-variant-is-chosen#339385 "-- HikaShop version -- : 4.4.5 -- Joomla version -- : 3.10.3 -- PHP version -- : 7.4.27 -- Browser(s) name and version -- : Firefox 96.0.3  I notice that when a variant is chosen from the dropdown on the product display page that my Checkout button at the bottom of the right side column then disappears.  It must have been this way for a long time and I never saw it until now. You can still add to cart as normal, and then customers have been getting to checkout from the mini-cart module, but the button itself is missing.  Going to another product will return the Checkout button, but choosing any variant will remove it.  I can't see what has been done to cause this, but I track the code to the 'product/show&#95;default.php' view, where I see this:  I cannot quite figure out what to do here. Is there some modification of this code which will allow the checkout button to remain once a variant is chosen?")*

You were exactly right. The button was missing from 'show.php'.

Once I added it to that view now the problem is solved.

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI1LWluc3RhbGwtdXBkYXRlLzkwMzk2NC1jaGVja291dC1idXR0b24tZGlzYXBwZWFycy1vbmNlLXZhcmlhbnQtaXMtY2hvc2VuP3RtcGw9bWFya2Rvd24=) 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.100 seconds

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