Ecommerce software home
Shopping Cart Software Forum for Ecommerce Templates
 
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

Find us on Facebook Follow us on Twitter View our YouTube channel
Search our site
Forum Search
Google Site Search
Author « Topic »  

Steved
Ecommerce Template Guru

United Kingdom
1022 Posts

Pre-sales questions only
(More Details...)

Posted - 03/07/2020 :  01:33:33  
Hi - a couple of queries,

Is there a way to prevent the dropdown minicart displaying (0) when empty? I would prefer it to only display a number once there is something actually added to the cart.

Also, it would be useful to be able to lose the brackets when there is an item in the cart and simply have the number.

Thanks,

Steve

Phil
ECT Moderator

United Kingdom
7715 Posts

Posted - 03/07/2020 :  01:56:05  
Hi Steve,
That's not possible, the $totquant serves all the values, if you look in the vsadmin/inc/incminidropdowncart.php file the line for the quantity is below

(<span class="ectMCquant">'.$totquant.'</span>)')

so to remove the brackets you would change that to
<span class="ectMCquant">'.$totquant.'</span>');

adding .ectMCquant{display:none;} to your style sheet would then remove all values unfortunately.



* Database Migrations and Conversions*
* ASP to PHP Cart Conversions*

*Contact Us*
*Buy The PHP Capture Card Plugin*
*Rate Our Services/View Our Feedback*

Edited by - Phil on 03/07/2020 02:05:57

Steved
Ecommerce Template Guru

United Kingdom
1022 Posts

Pre-sales questions only
(More Details...)

Posted - 03/07/2020 :  01:59:34  
Thanks Phil - that's what I thought.
I'll add it to the suggestions as this seems quite a popular way to display the basket nowadays.

Steve

dbdave
ECT Moderator

USA
10468 Posts

Posted - 03/07/2020 :  10:43:53  
If you are going to hack the brackets (native code) then you could just make a conditional statement there.

NOT ACTUAL CODE BUT Something like

if '.$totquant = 0 then (<span class="ectMCquant">whatever you want</span>)')
else <span class="ectMCquant">'.$totquant.'</span>');

Of course changes to this file would be overwritten by updates and need to be re-done.

I believe you could also use javascript to modify the output there, without hacking the code.

Edited by - dbdave on 03/07/2020 10:46:39

Steved
Ecommerce Template Guru

United Kingdom
1022 Posts

Pre-sales questions only
(More Details...)

Posted - 03/07/2020 :  12:19:11  
Hi David,

Yes I will have to come up with some statement for quantities of less than 1 and naturally I’ll have to drop this into the code after updates. Would be great if this could be integrated into the source code eventually.

Alas, I know nothing of js really so can’t go down that route

Many thanks for your suggestions,

Steve

Steved
Ecommerce Template Guru

United Kingdom
1022 Posts

Pre-sales questions only
(More Details...)

Posted - 03/07/2020 :  12:23:45  
Thanks also Phil for the code you updated in your post.
  « Topic »  
Jump To:
Shopping Cart Software Forum for Ecommerce Templates © 2002-2022 ecommercetemplates.com
This page was generated in 0.02 seconds. Snitz Forums 2000