Jump to content


Photo
- - - - -

Adding Cart66 Shortcode To Boxes And Banners

cart66

Best Answer zhonghao , 09 December 2012 - 06:33 AM

Hi Rob - so finally thanks to your recommendations I ditched Cart66 (they graciously gave me a full refund) in favour of ECWID which seems to be pretty awesome ...... so far ... As such I didn't try out the Grid System as ECWID has done everything I need so far... Thanks also for the link to WP-Boxer which seems to be a great additional plugin. Guess I should have just written in for recommendations in the first place and saved myself a whole heap of time and effort ! :)

Go to the full post


  • Please log in to reply
8 replies to this topic

#1 zhonghao

zhonghao

    Super Member

  • Members

  • 101 posts
  • Country: Country Flag

Posted 02 December 2012 - 06:26 AM

I have purchased the Cart66 e-commerce plugin and would like to be able to show a number of 'Items for sale' on a single page along with an image and 'Add to Cart button'. I naturally thought that the easiest way to do this would be to create a bunch of Boxes and/or Banners with the appropriate item. However if I try to use a Box or Banner to create the Image & Description I can not place the short code needed for the Cart66 buttons. The support on the Cart66 webpages list a similar type issue for a plugin called Custom Post Types which seems to give an identical situation.  The solution provided by Cart66 is to go to the Themes function.php file and add some short code along with the 'slug for the custom post types one wants to use'... Please see the attached file.

So does this mean that there is a 'slug' for Boxes and/or Banners which I can insert in the functions.php file as described that will enable me to enter the short code needed to generate the buttons in the Boxes or Banners ? 

Attached Files



#2 zhonghao

zhonghao

    Super Member

  • Members

  • 101 posts
  • Country: Country Flag

Posted 02 December 2012 - 07:10 AM

Am I right in thinking that the 'Slug' refers to something as simple as the Menu in the Wordpress Admin such as Boxes, Banners etc.... ? If so then I tried to place the code (as follows in the functions.php file of ...themes/pagelines however I then can not load the wp-admin page and get the following message : 

Fatal error: Cannot redeclare my_products_pages() (previously declared in /home/somatx/public_html/wp-content/themes/pagelines/functions.php:22) in /home/somatx/public_html/wp-content/themes/pagelines/functions.php on line 23

 

Any help would be REALLY appreciated 

 

My functions.php file now reads :

 

<?php
/**
 * FUNCTIONS / THEME INITIALIZATION
 *
 * This file loads the core framework which handles everything.
 *
 * @package     PageLines Framework
 * @since       1.0
 *
 * @link        

Please Login or Register to see this Hidden Content

 * @link        

Please Login or Register to see this Hidden Content

 *
 * @author      PageLines  

Please Login or Register to see this Hidden Content

 * @copyright   Copyright © 2008-2012, PageLines  hello@pagelines.com
 *
 * @internal    last revised January 20, 2012
 * @version     ...
 *
 * @todo Define version
 */
function my_products_pages() {
return array('Boxes','Banners');
}
add_filter('cart66_add_popup_screens','my_products_pages');
require_once(get_template_directory() . '/includes/init.php');


#3 Danny

Danny

    Is Awesome!

  • Moderators
  • 13106 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 02 December 2012 - 11:08 AM

DO NOT edit core files, by doing so, you're voiding support.

 

We do not support users who have made changes to the core files of PageLines. Please remove the code you added to the Frameworks core functions.php file.

 

If you need to add actions/filters etc.. to your site like you have above, you will need to either use the PageLines Customise plugin or the Base child theme, both available for free via the PageLines store.

 

Once you have chosen your method, add the code you added above to the functions.php file that comes with both the Customise plugin and the Base child theme option.

 

I have recently wrote this for our customisation section documentation, which may assist you - 

Please Login or Register to see this Hidden Content



#4 zhonghao

zhonghao

    Super Member

  • Members

  • 101 posts
  • Country: Country Flag

Posted 02 December 2012 - 12:09 PM

Hi Danny thanks for the reply. Actually I have the Base Theme installed and activated and thought that the functions.php file I added the code to was actually the Base Theme. I just double checked and it seems that the Base Theme is in a folder called pageline-template-theme which was not clear in the documentation so lucky you gave me this reply ! So I deleted the code in the functions.php and reloaded the page/site to check all is ok and it was fine. But now I have placed the code in the functions.php of the Base Theme and neither my web site or the wordpress admin page will load so I've obviously got some wrong code there ! Would you mind giving me your thoughts on how / where the code is wrong and how it should be written as well as correcting / confirming what the 'slug' should be to get the short code into the Boxes / Banners page sections.


  • jstone likes this

#5 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts
  • LocationEast Coast, USA
  • Framework Version:The Latest, of course
  • Country: Country Flag

Posted 02 December 2012 - 01:13 PM

The bigger question I'm compelled to ask is 'why?'  It seems you're going down a path to reinvent that which is already created.

 

There are so many superb ecommerce plugins out there which don't require such extensive coding simply to make products appear.  Additionally, as far as I know, boxes and banners are the wrong things to use for displaying the products.

 

I'd strongly recommend CartPress or ECWID; each of which require minimal integration with PageLines.

 

Of course, that's just my humble opinion.



#6 zhonghao

zhonghao

    Super Member

  • Members

  • 101 posts
  • Country: Country Flag

Posted 02 December 2012 - 01:55 PM

Thanks for your thoughts Rob. I chose Cart66 after almost 2 weeks of researching various ecommerce plugins for what I require. CartPress doesn't seem to have had great reviews and seems a little limited long term and ECWID seemed pretty good but I'm not a fan of monthly payment plans ! Of course without any 1st hand experience or even personal recommendations there is a large element of 'pot luck' in choosing a perfect solution. So anyway I have paid for Cart66 and have it installed and it seems to have everything I need including memberships, digital content etc... One of the reasons I chose Cart66 is that it allows you to integrate the product into your web site using your own post/pages without having to be stuck with predesigned templates to place the images/products on. Without having any experience I would have thought the most obvious way to present products would be to use Boxes or Banners for each product to keep a nice uniform look to the site and just add a button. So not sure what you mean by 'reinvent that which is already created' as I thought I was just trying to use that which has been invented by people who know what they are doing . Placing the shortcodes and everything else seems fairly straight forward in Cart66 so long as its in a post or page. The problem is actually arranging things to look good on a page - hence this is where I would have thought the Drag & Drop of Pagelines would make things simpler for me. Would really love to hear from anyone who may have had experience with this or any other recommendations for e-commerce plugins ?



#7 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts
  • LocationEast Coast, USA
  • Framework Version:The Latest, of course
  • Country: Country Flag

Posted 02 December 2012 - 05:24 PM

I simply meant that other ecommerce plugins already structure the display of products, while it seemed Cart66 was doing just as you describe... allowing you to format your own display.

 

Not sure if this would work in place of boxes or banners, but you could try using our Grid System

Please Login or Register to see this Hidden Content

,  We also have a couple of premium plugins.  One is called "Anything Boxes" and the other is called "Grid Portfolio".  Any of these three might work, though I'm not sure if Grid Portfolio takes shortcodes.

 

I know that you can use shortcodes inside the Grid System.  It's rather like creating a table.

 

Additionally,  for boxes that contain shortcode (which I use myself for a different purpose), I use

Please Login or Register to see this Hidden Content

.  This replaces boxes with content blocks that operate on the same principle, but are applied to a post or page via shortcodes, thus allowing you to place a box set (as many as you wish) on a page.   Each content block you create could itself contain shortcode for your product(s).



#8 zhonghao

zhonghao

    Super Member

  • Members

  • 101 posts
  • Country: Country Flag

Posted 03 December 2012 - 12:45 AM

Awesome -thanks very much for that Rob. I will spend a couple of days going through what you have suggested and will definitely get back to let you know how I got on. Maybe it may help someone else in the future as well. Cheers.



#9 zhonghao

zhonghao

    Super Member

  • Members

  • 101 posts
  • Country: Country Flag

Posted 09 December 2012 - 06:33 AM   Best Answer

Hi Rob - so finally thanks to your recommendations I ditched Cart66 (they graciously gave me a full refund) in favour of ECWID which seems to be pretty awesome ...... so far ... As such I didn't try out the Grid System as ECWID has done everything I need so far... Thanks also for the link to WP-Boxer which seems to be a great additional plugin. Guess I should have just written in for recommendations in the first place and saved myself a whole heap of time and effort ! :)