Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.
If the asker does not get an answer then they have 10 days to request a refund.
$25
Opencart small PHP issue
I am trying to set my store so when the price is set to £0.00 the charaters "Sold Out" are printed out, instead of £0.00.
I have played around with some php but the best I have been able to achieve is this (which obviously looks rubbish)
http://sound-affair.com/Bang_Olufsen_Accessories/Bang_Olufsen_Cables/Bang_Olufsen_Sock
And in the main item display I don't even get the words "Sold Out" but it just prints £0.00
Look for same product here to see this example:
http://sound-affair.com/Bang_Olufsen_Accessories/Bang_Olufsen_Cables
I am not that familiar with php but any help would be appreciated. I'm sure it probably involves adding a few lines of php and some css.
Ideally someone who is familiar with OpenCart would be great as the file structure is obviously different.
Kind Regards,
Sam
This question has been answered.
smwilson | 08/09/12 at 9:44am
Edit
Previous versions of this question:
08/09/12 at 2:20pm
(4) Possible Answers Submitted...
See a chronological view of answers?
Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.
-

Last edited:
08/09/12
9:49amMichael Caputo says:It's printing sold out for me (screenshot)
- 08/09/12 9:51am
Michael Caputo says:i'm not familiar with Opencart, but is there a way to set your stock levels?
- 08/09/12 10:11am
smwilson says:Yes, but ideally I would like just the Words "Sold Out" centered and maybe slightly larger.
And displaying correctly on the main section.
There is a stock control feature however this doesn't inform the visitor, its real mian purpose is at the checkout stage not the frontend.
Cheers - 08/09/12 10:13am
Michael Caputo says:It doesn't appear as though there is an option to target elements on a page which products are 'sold out'. So I could give you some CSS to increase the size of the text and center it better, but it would apply it to all of the products.
- 08/09/12 9:51am
-

Last edited:
08/09/12
10:24amArnav Joy says:can you provide me admin access to site via PM , I am having little knowledge of open cart , and want to try
-

Last edited:
08/09/12
10:34amHardeep Singh says:Hi
We have experience with OpenCart and have couple of plugins in our name too.
The issue you are facing is more of template related. I can get this fixed but would need some files to update it and need version of OpenCart being deployed.
You can contact me over email to worldofharry [at] trickmyidea.com
Thanks!- 08/09/12 3:21pm
Hardeep Singh says:As discussed over the email, I am working on it.
Thanks! - 08/09/12 3:22pm
smwilson says:cheers,
Sam - 08/09/12 3:38pm
Hardeep Singh says:Ok, this is done. (Number of files updated - 12)
Please verify.
Regards
Hardeep - 08/09/12 4:16pm
smwilson says:Looks great, but as described in the inital post, when you view http://sound-affair.com/Bang_Olufsen_Accessories/Bang_Olufsen_Cables, any products listed as £0.00 still list as £).00 rather than sold out.
Once this is complete, can you please provide me the file location and name on where to amend the "Sold Out" Text incase i need to ammend it.
Thanks for your Help,
Kind Regards,
Sam - 08/09/12 5:03pm
smwilson says:awesome stuff mate, i will keep you as a contact for future work.
If you can provide the location and file to edit the "Sold Out" text that would be great.
Sam - 08/09/12 5:08pm
Hardeep Singh says:Please re-verify now.
I had not recorded the file locations but had screen shot for file names saved for my reference.
Sent them over email for reference
Regards
Hardeep - 08/09/12 5:16pm
smwilson says:Looks great mate,
if you could find the location it would be great while its fresh in your mind. as i wont have a clue where to look.
Regards,
sam - 08/09/12 5:25pm
Hardeep Singh says:.php files would be in :
/httpdocs/catalog/controller/module
/httpdocs/catalog/controller/product
.tpl files would be in:
/httpdocs/catalog/view/theme/Spicylicious/template/product
/httpdocs/catalog/view/theme/Spicylicious/template/module
- 08/09/12 3:21pm
-

Last edited:
08/09/12
2:01pmajay says:Hi
The price displaying should have been stored on some variables. So need to check the conditions like, if price is stored in variable x, in php, it will be $x, so need to implement the condition, if($x == "0.00"){ echo "Sold out";}else{echo $x;}.
Thanks,
Ajay
This question has expired.
Gabriel Reguly, smwilson, Arnav Joy, Manoj Raj, Martin Pham voted on this question.
Current status of this question: Completed
Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.
If the asker does not get an answer then they have 10 days to request a refund.
