Home › Forums › Ticket Products › Event Tickets Plus › Setting Shop base page to events URL
- This topic has 9 replies, 3 voices, and was last updated 11 years, 8 months ago by
Barry.
-
AuthorPosts
-
July 30, 2013 at 3:16 am #57724
simplicityltd
ParticipantHi,
When the cart is empty and you get the ‘return to shop’ button, that takes you back to the Woocommerce styled shop but would rather redirect it back to the events list. You can change the shop base page in Woocomerce of course but only to pages, and the events list isn’t a page. Any ideas how I can do this?July 30, 2013 at 1:48 pm #57844Barry
MemberHow about overriding the WooCommerce cart/cart-empty.php template? You could then link to whatever you like.
July 30, 2013 at 3:50 pm #57864simplicityltd
ParticipantAhh, I was hoping for something a little less hacky, ah well, no worries. Thank you
July 30, 2013 at 4:19 pm #57871Barry
MemberWell, what you are trying to do here directly relates to that template and safely overriding it is one recommended way of making changes to it.
I’m not quite sure why that would be considered hacky – nor can I think of too many alternatives unless you do something like filter post_link once only after woocommerce_cart_is_empty fires, however I’d tend to see that as the hackier of the two approaches.
Definitely take the time to check in with WooThemes support, however, especially if you don’t feel comfortable with template overrides – since this really relates to their product (WooCommerce) and they will be best placed to advise you about customizations to their product.
July 30, 2013 at 4:32 pm #57878simplicityltd
ParticipantSorry, didn’t mean to be rude, by hacky I meant I was hoping to not edit code that might later get overwritten in an update, I’ve edited that file as you suggested and all is well, thanks.
I had to use a direct URL for the link though as my feeble attempts to to code it failed. Can you tell me what I might use to correctly reference the main events list? I tried to copy code from your tribe-options-general.php using the tribe-events::getlink() but failed.Thank you
July 31, 2013 at 6:24 am #57952Barry
MemberSorry, didn’t mean to be rude, by hacky I meant I was hoping to not edit code that might later get overwritten in an update
No problem at all – I figured you meant something like that 🙂
So long as you follow the correct template override procedures, which for WooCommerce are pretty similar to our own, they should not be overwritten in a future update – since the overrides will live outside of the plugin directory. If in addition to this you use a child theme (or whatever procedure your theme vendor recommends for theme customizations) then this should be perfectly safe.
Re a non-hardcoded approach to linking to the events page, can you try switching out some code in your template override as detailed here? That seems to work for me.
August 1, 2013 at 8:25 pm #58442simplicityltd
Participantworked a treat, thank you
August 2, 2013 at 6:09 am #58472Barry
MemberNo problem, happy to help 🙂
August 11, 2014 at 10:24 am #640496Emiliano Pasini
ParticipantHi, I have the same problem.
When the cart is empty and you get the ‘return to shop’ button, that takes you back to the Woocommerce styled shop but would rather redirect it back to the Ticket list.
Not sure where I can find —> cart/cart-empty.php to make it work, I’m using WordPress 3.9.1, maybe the php file has changed??
Thanks!August 11, 2014 at 10:59 am #640754Barry
MemberHi!
It’s a WooCommerce template so you’d need to look in that plugin’s directory for the original version of the template.
As this is actually a pretty old topic though (it was created about 1 year ago) and we generally prefer people create new threads of their own I’ll go ahead and close out this one. Please do feel free to create a new thread if you need further assistance, though, and if we can help or point you in the right direction we’ll be happy to do so 🙂
-
AuthorPosts
- The topic ‘Setting Shop base page to events URL’ is closed to new replies.
