| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Adding Per Product Update control in basket? | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Adding Per Product Update control in basket?
I have seen this on several other x-cart based sites.
Is there a guide to adding an update per product, not just for the whole cart? Also, I would like to use the small thumbnail shown on home also show in the cart. Looking at the debugger, I see that they both pull in products_thumbnail.tpl, but looking at the template, I don't see what controls the displayed size. Anyone? Thanks
__________________
Regards, Peter Stoermer http://www.TotalHosting.com for http://www.EmpowermentGroup.com X-cart: 4.0.17 |
|||||||
#2
|
|||||||
|
|||||||
My cart mods
Ok, both mysteries solved. For sake of the board, I'll post my hacks.
If you want to mod the cart to show the thumbnail-sized image (very handy), simply replace this at line 19 in cart.tpl Code:
Code:
I see no reason to show customers anything but the thumb, title and any options. To add an update, per line item, you can replace the following around line 59: Code:
Code:
Now, I just need to find the hacks to the button templates to replace the text with images. If anyone cares to share, that would be superb! Hope this helps all that follow.
__________________
Regards, Peter Stoermer http://www.TotalHosting.com for http://www.EmpowermentGroup.com X-cart: 4.0.17 |
|||||||
#3
|
|||||||
|
|||||||
Not exactly what I want, but it works for now
Ok, as I continue to talk to myself, here are a few more changes I made to Cart.tpl
Around line 89, I hid the update and clear cart with simple HTML Comment tags. Just in case I ever want them back, no need to remove, just hide. Then I added a "Continue Shopping" link as follows: Code:
You can also use home.php. I chose to go with javascript:history.go(-1) for the Continue Shopping link. One nice thing about X-cart is that it uses javascript for updates and things within the cart. So history does not appear to be affected by updates and removes. So you can either send people back to the last page they were on, or to the home page. Anyone know how to send them back to the Category of the product they were on? Now I will go back and clean up the Update and Remove links in their respective templates with the change I made to Continue Shopping to make them "buttons" too. Closer to what I want.
__________________
Regards, Peter Stoermer http://www.TotalHosting.com for http://www.EmpowermentGroup.com X-cart: 4.0.17 |
|||||||
#4
|
|||||||
|
|||||||
And now, here are the cleaned up Update and Remove "buttons" for the cart. Remember, this is around line 59:
Code:
Nice and simple!
__________________
Regards, Peter Stoermer http://www.TotalHosting.com for http://www.EmpowermentGroup.com X-cart: 4.0.17 |
|||||||
#5
|
|||||||
|
|||||||
why use home.php instead of history go
Ok,
One thing to keep in mind, is that if you are going to use the STATIC catalog feature, which I strongly suggest, you should send people back to "home.php" instead of using the javascript history.go(-1) in your Continue Shopping button. That's because if they add to cart, then the history would kick them out of your store (the dynamic part). You want to try and keep them inside to be able to checkout and make you $$$.
__________________
Regards, Peter Stoermer http://www.TotalHosting.com for http://www.EmpowermentGroup.com X-cart: 4.0.17 |
|||||||
|
|||
X-Cart forums © 2001-2020
|