Jump to content


  • Posts

  • Joined

  • Last visited

Posts posted by Homar

  1. Hello Eddie,


    I believe this to be a bug in the latest CubeCart release.  After disabling the Fusion plugin and all of its hooks, line 116 of the cubecart.class.php file still returns false for all products (whether they are in stock or not):

    $product['ctrl_stock'] = (!$product['use_stock_level'] || $GLOBALS['config']->get('config', 'basket_out_of_stock_purchase') || ($product['use_stock_level'] && $GLOBALS['catalogue']->getProductStock($product['product_id'], null, true))) ? true : false;

    Digging a little deeper...  This line calls the Catalog::getProductStock() method, which is returning empty strings.  I can therefore only conclude that this issue is not being caused by either the Vector theme or Fusion plugin.

  2. There is some user submitted documentation on the third party forums, but this is pretty basic. Regardless, as has already been mentioned, the developers should be the ones to provide complete documentation considering CubeCart is commercial software. I would like to see something comparable to LemonStand's documentation. LemonStand is also commercial software and their team originally consisted of just two developers. We should remember though that any time spent writing documentation would come at the expense of further development - and the current rate of development isn't exactly quick.

    OpenCart is quite different. Being open source, OpenCart has a considerably larger user base and the community can contribute towards both the development and the documentation.

  3. The other problem I'm having is that, having now noticed the lack of cat_(n)/prod_(n)/info_(n) on URLs (something it had never occured to me would change), I've tried to turn it back on but can't! Seriously, I cannot see how to get our v5 test shop to use the exact same URLs it was before we upgraded it to v5 (maybe this was something to do with previously using Apache Lookback that's now gone?). This leaves me very worried about the effect on both internal links, and inbound deep links from external websites. It's taken a long time to build those good-quality deep links, and I'm not prepared to throw them away just for a software upgrade! (I could go through an exercise of generating 301 redirects for them all of course, but as the product ids are no longer displayed in the product inventory list...).

    I believe that recent releases of CubeCart V5 contain rewrite rules that map old (V4) URLs to their new ones. If you open up your .htaccess file, you should see that it contains the following:

      RewriteCond %{QUERY_STRING} (.*)$
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteRule cat_([0-9]+)(.[a-z]{3,4})?(.*)$ index.php?_a=category&cat_id=$1&%1 [NC]
      RewriteCond %{QUERY_STRING} (.*)$
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteRule prod_([0-9]+)(.[a-z]{3,4})?$  index.php?_a=product&product_id=$1&%1 [NC]
      RewriteCond %{QUERY_STRING} (.*)$
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteRule info_([0-9]+)(.[a-z]{3,4})?$  index.php?_a=document&doc_id=$1&%1 [NC]
      RewriteCond %{QUERY_STRING} (.*)$
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteRule tell_([0-9]+)(.[a-z]{3,4})?$  index.php?_a=product&product_id=$1&%1 [NC]
      RewriteCond %{QUERY_STRING} (.*)$
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteRule _saleItems(.[a-z]+)?(?.*)?$  index.php?_a=saleitems&%1 [NC,L]
      ######## END v4 SEO URL BACKWARD COMPATIBILITY ########

    I looked into displaying the primary product image in the image tab. I do agree that this should be added. Unfortunately, the $PRODUCT array does not contain the image path. The GUI class does provide a getProductImage method, but the $GLOBALS variable is not available to the templates and is required in order to call this method. The best way forwards is to open a bug ticket if you have not already done so. This is a simple addition and should only take a few minutes for the developers to implement.

  4. See http://memcached.org/ for more detail.

    In short, it's a key-value store that can be used for caching almost anything - database queries, fully or partially rendered template files, ect. It's generally used for database heavy high traffic sites. CubeCart offers it as a caching storage mechanism. With memcached you won't have hundreds or thousands of files stored in the /cache/ directory. The key-value hash is stored in memory. This can give much faster access than file based caching.

    If you want to use it, you'll need a memcached server. Some hosting companies offer this as an addon (e.g. https://addons.heroku.com/memcache). I should say that it will probably have very little benefit for small low traffic websites.

  5. You only ever need to include the jQuery library once. It gets included from common.html and so it is best to leave this file as it is and simply omit the inclusion of jQuery from any scripts you are adding. In common.html, there are the following inclusions:

    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.12/jquery-ui.min.js"></script>
    <script type="text/javascript" src="{$STORE_URL}/js/plugins.php"></script>
    <script type="text/javascript" src="{$STORE_URL}/js/common.js"></script>
    This file is then included into the main.php template file through the statement:
    {include file='js/common.html'}

    Dealing with each script individually:

    • jquery-ui.min.js - This is the jQuery library that is required.
    • query-ui.min.js - The jQuery UI (User Interface) library. I have no idea why this is in here or if it is even required for the front-end. I have removed this from my themes since it comes with a hefty file size and I don't see why it is necessary.
    • plugins.php - Used to load in all of the JS files from the /js/plugins/ directory. Again, many of the files in there are not required for the front-end but CubeCart loads them in anyway. The only files you will probably need are jquery.colorbox-min.js, jquery.magnifier.js and jquery.rating.min.js. I would remove the inclusion of the plugins.php script and instead include these three scripts in your main.php template file.
    • common.js - Essentially an application file that makes use of all of the plugins included above. You'll probably want to keep this one!

    I hope this helps.

  6. I often find myself repeatedly clicking the reload button until something vaguely legible appears. It's certainly not ideal and it wouldn't surprise me if this adversely affects your client's conversion rates. Unfortunately, CC5 doesn't have an alternative to reCaptcha. I would love to see CubeCart utilise the Akismet service (http://akismet.com/) to filter out spam reviews and comments. I view captchas as being far too restrictive and also a fairly weak form of protection.

    Perhaps try submitting a feature request through the bug tracker.

  7. Just a warning...

    If you edit the gui.class.php file, you will need to make the same modifications each time you update CubeCart to the latest release. CC5 has a plugin system, which would certainly be the preferred method of adding any additional features - or indeed changing existing behaviours. The class.gui.display hook may be used for this purpose.

    However, if you don't need to pass any new PHP variables to your sidebox, you can utilize SMARTY's {include} tag. So, instead of adding {$YOUR_BOX}, you can add the following to the main.php template file:

    {include file="skins/{$SKIN_FOLDER}/templates/box.yourbox.php"}

    Either of these methods will allow you to easily update CubeCart when the next release comes along.

  8. www.thehomefabricstore.com

    Its not virtual. It's a dedicated server with host gator. I will try some of those. Host Gator says its do to the coding in CubeCart.

    Your site does seem to wait quite a few seconds before transferring data, which would suggest a server issue rather than any client-side scripts. I did notice that you have some 810 pages of products, which I estimate to equate to around 14,000 products. However, assuming that you have caching enabled (and it is working as caching should), your homepage should (at the very least) be quick to load. I have never worked with a store having anything like 14,000 products, so I don't know how CubeCart should behave under these conditions. Nevertheless, I would imagine that even a low-spec dedicated server should be able to handle a database of this size (assuming well-designed SQL queries).

    My guess is that the database is to blame. The last time I checked there were no indexed fields (other than primary keys). Foreign keys should nearly always be indexed. As an analogy, consider searching through a telephone directory. Since the telephone directory is indexed, you can quickly narrow in on the name you are looking for. If the directory was not indexed and all the names were ordered randomly, you would need to search one-by-one through the list - which is obviously much slower. Indexing appropriate fields could yield a healthy return.

    To repeat bsmither, a server administrator (which I am not) should be able to sniff out the culprits. He/she may then return to you with a bunch of slow SQL queries, which you can present to Devellion.

  9. We have a dedicated server as well and are having the same problem. I have opened a ticket on this before and it doesn't seem like there's much they can do.

    Can you supply us with a URL? There are various tools that we can use to help identify the cause of a slow site. It might not be down to the server. I quite frequently see JavaScript inclusions to third-party sites that can block page rendering. Nevertheless, you will want to ensure that caching is enabled - particularly for stores with many products, categories, orders or visitors.

  10. I need to add several new boxes in CC5 as I done previously in cc4. I know I need to update the main.php in the skins folder but I can't seem to locate the point where I define the new variable

    {$location} is the new box I need to add, where do I define {$location}

    $location is not just html it will also need to include php code so I cna't just add the box directly into main.php.

    What kind of box do you want to add? Do you just want to display some static content? If so, you don't need to mess around with the PHP. Simply use the existing markup as a template.

    If you want to display some dynamic content (i.e. content that is generated through the administration panel or from store information), then this is more involved.

  11. I've bodged it for now by changing the CONTINUE button to say click to continue and removed the text "transferring please wait" so animated transfer bar still shows but looks like you have to click to proceed.

    Do you have JavaScript disabled? If I remember correctly, JavaScript is used to automatically submit the form.

  12. Yeah, can someone tell me where the controllers for boxes are in CubeCart v5?

    I have a client who was running CubeCart v4, I built a handful of custom boxes for them to use in templates (i.e. for Twitter feeds, a news module etc) but now can't for the life of me find them in CubeCart v5's file structure now that I'm converting the v4 template to work with v5 (thanks, CubeCart).

    Do you just want to create a new sidebox (without any PHP code)? If so, you can just add the HTML into the main.php template file. Alternatively, you can create a new template file and include it into the main.php template file. See: http://www.smarty.net/docsv2/en/language.function.include.tpl

  13. How do I tell the CC5 contact form to redirect back to the contact page? right now it's just redirecting to the home page...



    Some pages read a hidden field with the name "redir". Look at content.login.php (I think that there's one in there). You might just be able to add that field to the form in the contact template. Remember to change the field value though! If that doesn't work, the relevant contact action in the CubeCart PHP class probably doesn't check for the "redir" field. The developers might add this in if you open a ticket on the bug tracker.

  14. The WIKI site is still just showing basic definition information with no developer assistance!!! Does anyone know of other sites offering helpful information for a CC v5?

    There is currently no CubeCart 5 specific documentation, although most of the PHP classes are documented. If you're interested in designing themes, you'll want to read through the SMARTY documentation: http://www.smarty.net/docs/en/

    The SMARTY website has a nice section for template designers: http://www.smarty.net/docs/en/smarty.for.designers.tpl

    Other than the basic SMARTY syntax, themes are simply plain old HTML, CSS and JavaScript.

  15. Dear all,

    Is there a good forum from where I can understand how payment gateways work in CC5? I am working with a new API which requires communication through SOAP, and I'm stuck with processing the transaction. Currently transferring the data needed for authentication to the process method using PHP POST. The API returns a URL which then I use to render an iFrame in a new class (the url is transfered using PHP GET)



    Hello Norbert,

    There's no documentation for CubeCart V5 yet. Your best bet would be to have a read through one of the gateways included.

  16. I think that there is some legitimate criticism here. Perhaps I can try to explain the rationale behind some of the "missing features".

    If you remember back to the beta microsite, Devellion's plan was to release V5.1 not long after the initial release of V5. V5 was to provide a fast, flexible and robust base for all the new features that would be introduced with V5.1. Naturally, V5.1 has not been released yet and I couldn't possibly tell you when it will be released (because I'm not a Devellion staff member). If I remember correctly, the developers were talking of a time-frame spanning a couple of months or so after the initial release.

    Regarding testimonials... CubeCart does include some social commenting plugins (Disqus and Facebook are currently supported). These can be enabled for site documents. One solution would therefore be to create a site document, name it "Testimonials" and then enable one of the social commenting plugins. It is important to note that enabling a social commenting plugin will result in a commenting section being displayed on every site document. You will probably want some simple logic to restrict it to only the Testimonials site document. This can be done by replacing:

    {foreach from=$COMMENTS item=html}
    {if $DOCUMENT.doc_id == 1}
    	{foreach from=$COMMENTS item=html}

    in your content.document.php template file. You will need to change the number in {if $DOCUMENT.doc_id == 1} to the ID of your Testimonials document. It might not be as elegant as a dedicated testimonials feature, but it should serve much the same purpose.

    Regarding product option validation... I have found that V5 does redirect to the product where product options have not been selected. You can try it here: http://www.shopdev.c...emos/blueprint/

    Make sure that your product options are "required" (if you go to Product Options in the administration panel, there should be a tick in the "required" row for each mandatory product option). If it is still not redirecting, there may be an issue with the AJAX Add to Cart JavaScript used by the stock skins.

  • Create New...