- Posts: 966
- Thank you received: 11
What Should Happen When An Item Is Sold...
When an item is SOLD, I would like it to remain on the site on the listings and product description pages.
PRODUCT LISTINGS:
When the product is sold out it disappears from the product listings page. I would like it to remain on the page and display a "Sold Out" button/message.
PRODUCT DESCRIPTION PAGE:
If the user clicks on the "Sold Out" product to view the description, I would like the "Sold Out" button/message to display the same way a badge displays.
Please see attached pic. as to how I would like the sold out button/message to look. I would prefer not to use the badge option as this is a lot of manual work.
I would like this to be automatic so that when an item is sold the badge displays on top of the product on both the listings and category page as per attached pic.
If this is a lot of work and I have to pay, please let me know what you would charge as this is important for the client.
Thanks very much!!!
Please Log in or Create an account to join the conversation.
You should turn on the option "Display out of stock products" of the configuration and of your products listing menus/modules.
Please Log in or Create an account to join the conversation.
It's actually quite easy to add so we'll add that for next release.
Please Log in or Create an account to join the conversation.
The client would like this option added before going live, which is in about a week. Any idea when the next release is?
Or can you tell me how to make the changes if the release will be longer than a week.
Thanks again!!
Please Log in or Create an account to join the conversation.
The next release won't be before several weeks.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
The change is not that simple. It requires the database to be modified as well as several files.
The next release won't be before several weeks.
Is the above added in the latest version? I thought I saw it on the list of new features but I can't find the list anymore. Where do we find the list of features to each new update? I was reading them in the backend but after I updated the site I don't see it anymore.
Thanks!!
Please Log in or Create an account to join the conversation.
The change log can be seen here:
www.hikashop.com/en/support/documentatio...ashop-changelog.html
Please Log in or Create an account to join the conversation.
Regarding the badge, if we add an option to support the quantity in the badges it could be done automatically with only one badge.
So how do I get this to work when an item is sold out? I looked but not sure. I tried putting "0" in the quantity field of the badge and I assumed that when an item hits "0" the badge will automatically show but that did not work.
Thanks!
Please Log in or Create an account to join the conversation.
In the view "product / show_block_img" thanks to replace:
Please Log in or Create an account to join the conversation.
Fatal error: Can't use method return value in write context in /home/.../public_html/.../templates/.../html/com_hikashop/product/show_block_img.php on line 56
This is the code in that section:
Thanks!!
Please Log in or Create an account to join the conversation.
Can you try this if condition:
if(!empty($this->element->badges) && @$this->element->product_quantity == @$this->element->badges[0]->badge_quantity )
Please Log in or Create an account to join the conversation.
PRODUCT LISTINGS:
When the product is sold out it disappears from the product listings page. I would like it to remain on the page and display a "Sold Out" button/message.
PRODUCT DESCRIPTION PAGE:
If the user clicks on the "Sold Out" product to view the description, I would like the "Sold Out" button/message to display the same way a badge displays.
This works fine now on the PRODUCT LISTINGS page but it does not show on the product description page as per above. I assume I need to move the code to another view as well? If so, where please?
[code]
<div style="position:relative;text-align:center;clear:both;width:<?php echo $divWidth;?>px;margin: auto;" class="hikashop_product_main_image_subdiv"> <?php echo $this->image->display(@$image->file_path,true,@$image->file_name,'id="hikashop_main_image'.$variant_name.'" style="display:inline-block;vertical-align:middle"','id="hikashop_main_image_link"', $width, $height);
if(!empty($this->element->badges) && @$this->element->product_quantity == @$this->element->badges[0]->badge_quantity );
?>
</div>
[code]
Thank you very much for your help with this.
Please Log in or Create an account to join the conversation.
Just to be sure, you need to display the badge for the out of stock products on the product listing and on the product page, right ?
I just tried on my end, he badge set to display on products with a quantity of 0. And without any changes in the views or something else, the badge is displayed on the listing and on the product page.
Can you try to download the latest package from our website and install it over your current version ?
And remove the previous customizations ?
Please Log in or Create an account to join the conversation.
Thank you very much for your help!!!!!!!!!!!!!!
Please Log in or Create an account to join the conversation.
The badge on the "listings" page has disappeared but it is still showing on the description page. What could have changed this? How do I get it to show on the listings page again?
Thank you!!
Please Log in or Create an account to join the conversation.
How did you edited the view with the code Xavier gave you?
If you didn't used the Hikashop view editor system (in Display>Views), the customization may have been erased by the upgrade. In this case, just edit your view and make the customization again.
If you file is still the same and has not been erased (meaning you did the modification through our system), tell me and I'll check if we modified our badges behaviour.
Please Log in or Create an account to join the conversation.
I am getting the same error I got when I initially added the code. I am now using version: 2.2.1I have the most updated version (2.1.2) and I thought this was already added? Anyhow, I add the code you gave and is getting the error below when I click on a product.
Fatal error: Can't use method return value in write context in /home/.../public_html/.../templates/.../html/com_hikashop/product/show_block_img.php on line 56
Thank you!!
Please Log in or Create an account to join the conversation.
means that you are using a view override./home/.../public_html/.../templates/.../html/
The problem is now in your override, the original file should be fine, I suppose, because we don't have it in our local websites or in the demo website.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
<?php
echo $this->image->display(@$image->file_path,true,@$image->file_name,'id="hikashop_main_image'.$variant_name.'" style="margin-top:10px;margin-bottom:10px;display:inline-block;vertical-align:middle"','id="hikashop_main_image_link"', $width, $height);
if(!empty($this->element->badges))
$this->classbadge->placeBadges($this->image, $this->element->badges, '0', '0');
?>
My question now is, how do I get the badge to show on the listings page. It is showing on the details page, which is find, but I would also like ti to show on the listings page. It was doing this before I made the upgrade.
Thank you!!
Please Log in or Create an account to join the conversation.