Exclusive eBooks, Software Solutions, Quality Guaranteed
 
Web NukeBiz
Welcome to NukeBiz · Members
Amazon
show cart or checkout0 items
Cart Value: 0.00

Forums » DragonflyCMS Projects » Storez » [done] Converting Order style to "Add to Cart" style
[done] Converting Order style to "Add to Cart" style
A comprehensive shopping cart solution.
Topic initiation via Bugger.

Post new topic    Reply to topic    Printer Friendly Page     Forum Index »  eCommerce » Storez

View previous topic :: View next topic  
Author Message
layingback
Nice Poster
Nice Poster

Offline Offline
Joined: Feb 26, 2007
Posts: 77

PostPosted: Tue Feb 15, 2011 6:38 pm
Post subject: [done] Converting Order style to "Add to Cart" style

I have a client who's asked if Storez can be configured to match the "Add to Cart" style which seems to be becoming more prevalent. By that I mean that the 'Order' button is labeled 'Add to Cart' instead and clicking it does NOT take you to the Cart, but leaves you still on the shopping page.

I couldn't see an option for this, so checked the code. In cart.php addtoCart() exits via a urlredirect to showCart. It seems that merely changing this to return to the originating screen should accomplish the desired effect.

One obvious issue is knowing where the originating screen is. In the absence of any DF function (that I can think of), I'm planning to add a(nother) hidden field with the URL, as items can be purchased from either a product or a store screen.

I just wondered if you see a problem with this approach? Or if you have attempted same in past? This is on an existing Storez on v9.3.6, but if if I pull this off, there's hope of a new Storez site, on v9.4.0.

Thanks in advance for your time!


layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/2.2.8/5.1.73/5.4.21/9.4.0
Back to top
View user's profile Visit poster's website
Phoenix
Chairman
Chairman

Offline Offline
Joined: Mar 18, 2004
Posts: 1543
Location: Netizen
PostPosted: Thu Feb 17, 2011 11:47 am
Post subject: Re: Converting Order style to "Add to Cart" style

Laughing the only thing that changes is the size of the circle.

Used to work that way and was removed because a couple of users felt it confused customers.

_________________
DonationsPro for vBulletin, SMF, MyBB, DragonflyCMS


Phoenix's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Visit poster's website ICQ Number Yahoo Messenger Photo Gallery
layingback
Nice Poster
Nice Poster

Offline Offline
Joined: Feb 26, 2007
Posts: 77

PostPosted: Fri Feb 18, 2011 12:24 pm
Post subject: Re: Converting Order style to "Add to Cart" style

I guess it all depends on where you shop! Wink

But thanks for this, good to know that it won't break basic flow. I also hear the advice, so will leave old code in place commented out for when/if they ask me to change it back! Smile


layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/2.2.8/5.1.73/5.4.21/9.4.0
Back to top
View user's profile Visit poster's website
Phoenix
Chairman
Chairman

Offline Offline
Joined: Mar 18, 2004
Posts: 1543
Location: Netizen
PostPosted: Fri Feb 18, 2011 6:22 pm
Post subject: Re: Converting Order style to "Add to Cart" style

Not so much where you shop - usually the type of shopper and how many purchases they are likely to make at the same time. Invariably this is one item which immediately defeats the whole purpose.

These days I just give them what they want, but as an option, so I don't have to change the bloody code back again. I've recently been through an exercise in ultimate stupidity where I have spent six months restoring, one by one, every bloody feature of a whole website I was told (despite my protests) to remove - go figure.

_________________
DonationsPro for vBulletin, SMF, MyBB, DragonflyCMS


Phoenix's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Visit poster's website ICQ Number Yahoo Messenger Photo Gallery
layingback
Nice Poster
Nice Poster

Offline Offline
Joined: Feb 26, 2007
Posts: 77

PostPosted: Mon Feb 21, 2011 1:14 am
Post subject: Re: Converting Order style to "Add to Cart" style

Phoenix wrote:
... how many purchases they are likely to make at the same time.

Agreed! 1 client, 2 sites/stores: one as Add to Cart and 1 as Order - for just this reason.

Phoenix wrote:
These days I just give them what they want, but as an option, so I don't have to change the bloody code back again.

I understand! Seen the length of the Pro_News Config screen recently? Rolling Eyes

But more and more recently I've found I can meet user requirements through specialised Pro_News templates! Really helps, as the base code (Pro_News) doesn't have to be retested each time. (All learnt through reading reDesign templates - php includes - and Storez templates - complex IF conditions!)


layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/2.2.8/5.1.73/5.4.21/9.4.0
Back to top
View user's profile Visit poster's website
movix
Nice Poster
Nice Poster

Offline Offline
Joined: Mar 02, 2012
Posts: 7

PostPosted: Fri Mar 02, 2012 3:53 pm
Post subject: Re: [done] Converting Order style to "Add to Cart" style

Hello,

I recently had the same subjet to think about. Here is what i did, quick and dirty but i seems to work.

First i enabled the block showing the cart contents.

Then I modified the "add to cart" button in the stores and product templates so that it calls a javascript function wich submits the respective form using ajax. After the ajax call finished i reload the current page.

I know it's not the best solution as it is now because there are 2 calls done, especially the first one from wich i do not display the result. If we have a parameter to submit to the "add to cart" call wich toggles the display of the cart page or display nothing the server and bandwidth load could be reduced.

The best way would be to return the content of the updated block content. Doing this we prevent the reload of the current page and just update the cart block content using javascript.

what do you think about this way ?


movix's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/Apache/MySQL 5.1.49/PHP 5.3.6/ DF 9.3.2.0
Back to top
View user's profile
Display posts from previous:   
Post new topic    Reply to topic    Printer Friendly Page    Forum Index »  eCommerce » Storez
Page 1 of 1
All times are GMT + 9.5 Hours



Jump to:  


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum