Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by Dodgebill

  1. I just checked the cache folder and box.hnav.php is there even though I have it wrapped in the nocache tags in main.php. Is that command working? If I delete the cache file it works again, once!
  2. Here is the code I am using for box.hnav.php {nocache} <div id="cssmenu"> <ul> {$NAVIGATION_TREE} {if $CTRL_CERTIFICATES && !$CATALOGUE_MODE} <li><a href="{$URL.certificates}" title="{$LANG.navigation.giftcerts}"><span class="icon icon-gift"></span> {$LANG.navigation.giftcerts}</a></li> {/if} {if $CTRL_SALE} <li><a href="{$URL.saleitems}" title="{$LANG.navigation.saleitems}"><span class="icon icon-tag"></span> {$LANG.navigation.saleitems}</a></li> {/if} </ul> </div> {/nocache}
  3. tried the {nocache} idea but it still does the same thing. I guess that rules out a caching problem at least. Now I'm stumped I have this on two sites right now http://cnkapparel.com/store (NSFW) and http://www.bill-cooke.com/ccskins (plain base CC 6.0.6 install) I wanted to make sure it wasn't something else I had done that was causing it.
  4. Those two worked just fine. Thanks for your help, again. I think I owe you a beer or something for all the help you've given me so far. Keep a tab running and we'll settle up somehow. BTW, is there anybody else on here? I remember back 10+ years ago there were hundreds of us on here.... I can't believe there is no place in CC to put the company phone number.... That seems odd!
  5. I know I'm pushing my luck here with this one but it hopefully only hurts little to ask so here goes. I have a unique homepage from the rest of the store. This page has a custom horizontal css/jQuery navigation bar on it. The rest of the site is using a super-fish vertical nav menu. When caching is enabled as soon as you go from the homepage to any other page and back again the horizontal nav bar disappears. I am using ($NAVIGATION_TREE} for both of these in two different files. box.hnav.php box.navigation.php If I turn caching off it works fine. If I clear the cache I get one use, then it breaks again. Obviously it seems I have a conflict from using {$NAVIGATION_TREE} on the two different pages. Is there a way to fix this? Also, an jQuery experts here? The css menu I am using has an error for jQuery is undefined but I have no idea what that means or how it should be defined. I have a message out to the person who setup the menu but have not heard back yet. Thought I'd ask here too just in case....
  6. I'm trying to add it automatically to the skin. {$STORE.title} or something like that but nothing works and I have no idea where to find the code to make it work.
  7. I'm also working on two new skins. One is about 80% done and the other is a few weeks away. They will both be posted in the extension marketplace as soon as they are ready. They are geared towards clothing, shoes and accessory stores.
  8. Next project I have been working on all day is trying to add the store name, address and phone number to the footer. This may require a hook but since I have no idea how those works I have no idea how to make that work.... I miss CC4, it was so easy! How do I add these things? I am also at a loss about the social icons. How the heck do I either get them to work or replace them with something MUCH better looking? I did get a whole new horizontal nav menu on the homepage of the lingerie skin. Still fine tuning all the colors on that and need a mobile version before it is finished. There have been numerous other changes today as well. It's about 80% done I'd say. When it is ready I'll ask that people test it and look for bugs. Then I'll put it in the Marketplace for all to download if they'd like. The fashion skin is just getting started. It's about 5% done at this point. http://www.cnkapparel.com/store/ Let me know what you think
  9. argh! That is why you never you the "replace" feature of your editor! Works great again Thanks for the catch.... wonder how long that would have taken me to find.... at least 4 hours and counting.
  10. It was working with the links until I made the homepage mod. I did just unlink the images just to see and no change. If I remove the mod it works again. Also, in the fashion skin (foundation based) the navigation subcategory drop downs on hover stopped working as well. It still works in my other skin but that is very differnt. It seems that there is some sort of error that is causing it to stop all scripts. I've never been able to figure out the debugging method for this for some reason.
  11. OK, so here is a funny new wrinkle. With the unique homepage mod in place when you go to the homepage the bxslider no longer works. Tried it in Foundation just to make sure and same thing. Completely baffled on that one. Any ideas where to start? Everything else works just fine. I have the test site up and running now. It's not a real store. DO NOT ORDER ANYTHING! http://www.cnkapparel.com/store This is lingerie based and maybe NSFW but it contains no nudity or adult content. You can select the different skins (at the bottom) and see the progress. I'm just starting the fashion skin today based on foundation. The other I have been building from scratch (mostly) for the past 2 months and is MUCH farther along.
  12. I had not yet scrolled down to the bottom of the page to see it start again. When I add the else block it breaks the page... any ideas? nevermind. Found it. I put {/else} at the bottom instead of {/if}. It's been a very long day....Works great now.
  13. Genius! That works great. Here is the code I used In the main.php template file copy all the text between and including <body class="{$SECTION_NAME}"> and </body> and paste it AFTER </body> Change the first occurrence of <body class="{$SECTION_NAME}">to {if $SECTION_NAME=='home'} <body class="home"> and then change the second occurrence of <body class="{$SECTION_NAME}">to {else} <body class="{$SECTION_NAME}">Then change the last </body>to </body> {/if}Then change anything you want in the top section of the code for the home page layout (between the {if} and {/if} commands) and the code on the second half is for all the rest of the pages.
  14. I'll give the if/else thing a try and let you know how it works out. Thanks for your help. When I get this to work I'll be posting this as a free skin in the market place. Yes, it is responsive! A ton of work but it's turning out nicely I think.
  15. I've been working on my own custom skin for CC6 for a few weeks now and there is one thing I would really love to include. I want to have a different layout on the home page than on the category or product pages. In CC4 it was pretty easy to do that but I'm not seeing a way to do it in CC6. Instead of using main.php for everything but checkout I want to have a template page called home.php or something like that so I can change box locations and so forth just on the home page. I think this will really open up the design possibilities. Does anyone know how to make this work?
  16. OK, thanks for the info. Here is the code I have for the new pop products. I have been playing with it since I posted last and found if I took out all the 2's I added it still works the same. Simplfies things a bit I guess as well. This is the code in classes/cubecart.class.php { $products = array(); /* $where = $GLOBALS['catalogue']->outOfStockWhere(array('status' => '1', 'featured' => '1')); */ if ($GLOBALS['config']->get('config', 'catalogue_latest_products')) { $latestProducts = $GLOBALS['db']->select('CubeCart_inventory', false, (int)$GLOBALS['config']->get('config', 'catalogue_latest_products_count')); if ($latestProducts) { foreach ($latestProducts as $product) { $category_data = $GLOBALS['catalogue']->getCategoryStatusByProductID($product['product_id']); $category_status = false; if (is_array($category_data)) { foreach ($category_data as $trash => $data) { if ($data['status'] == 1 && $data['cat_id'] == 16) { $category_status = true; } } } if (!$category_status) { continue; } // Product Translation $GLOBALS['language']->translateProduct($product); $product['image'] = $GLOBALS['gui']->getProductImage($product['product_id'], 'small'); $product['ctrl_sale'] = (!$GLOBALS['tax']->salePrice($product['price'], $product['sale_price']) || !$GLOBALS['config']->get('config', 'catalogue_sale_mode')) ? false : true; $GLOBALS['catalogue']->getProductPrice($product); $sale = $GLOBALS['tax']->salePrice($product['price'], $product['sale_price']); $product['price_unformatted'] = $product['price']; $product['sale_price_unformatted'] = ($sale) ? $product['sale_price'] : null; $product['price'] = $GLOBALS['tax']->priceFormat($product['price']); $product['sale_price'] = ($sale) ? $GLOBALS['tax']->priceFormat($product['sale_price']) : null; $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; $product['url'] = $GLOBALS['seo']->buildURL('prod', $product['product_id'], '&'); $GLOBALS['smarty']->assign('CTRL_REVIEW', (bool)$GLOBALS['config']->get('config', 'enable_reviews')); if (($product_review = $GLOBALS['db']->select('CubeCart_reviews', 'SUM(`rating`) AS Score, COUNT(`id`) as Count', array('approved' => 1, 'product_id' => $product['product_id']))) !== false) { if ($product_review[0]['Score'] !== "") { $product['review_score'] = round($product_review[0]['Score']/$product_review[0]['Count'], 1); } } $products[] = $product; } $lp_rand_keys = array_rand($products, 4); // Make sure there are 3 or more 'featured' products foreach ($lp_rand_keys as $rand_key) $lp_rand_products[$rand_key] = $products[$rand_key]; $products = $lp_rand_products; $GLOBALS['smarty']->assign('LATEST_PRODUCTS', $products); } } } /* end latest products */ /* Start Popular Products*/ { $products = array(); // $where = $GLOBALS['catalogue']->outOfStockWhere(array('status' => '1', 'featured' => '1')); if ($GLOBALS['config']->get('config', 'catalogue_latest_products')) { $popProducts = $GLOBALS['db']->select('CubeCart_inventory', false, (int)$GLOBALS['config']->get('config', 'catalogue_latest_products_count')); if ($popProducts) { foreach ($popProducts as $product) { $category_data = $GLOBALS['catalogue']->getCategoryStatusByProductID($product['product_id']); $category_status = false; if (is_array($category_data)) { foreach ($category_data as $trash => $data) { if ($data['status'] == 1 && $data['cat_id'] == 67) { $category_status = true; } } } if (!$category_status) { continue; } // Product Translation $GLOBALS['language']->translateProduct($product); $product['image'] = $GLOBALS['gui']->getProductImage($product['product_id'], 'small'); $product['ctrl_sale'] = (!$GLOBALS['tax']->salePrice($product['price'], $product['sale_price']) || !$GLOBALS['config']->get('config', 'catalogue_sale_mode')) ? false : true; $GLOBALS['catalogue']->getProductPrice($product); $sale = $GLOBALS['tax']->salePrice($product['price'], $product['sale_price']); $product['price_unformatted'] = $product['price']; $product['sale_price_unformatted'] = ($sale) ? $product['sale_price'] : null; $product['price'] = $GLOBALS['tax']->priceFormat($product['price']); $product['sale_price'] = ($sale2) ? $GLOBALS['tax']->priceFormat($product['sale_price']) : null; $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; $product['url'] = $GLOBALS['seo']->buildURL('prod', $product['product_id'], '&'); $GLOBALS['smarty']->assign('CTRL_REVIEW', (bool)$GLOBALS['config']->get('config', 'enable_reviews')); if (($product_review = $GLOBALS['db']->select('CubeCart_reviews', 'SUM(`rating`) AS Score, COUNT(`id`) as Count', array('approved' => 1, 'product_id' => $product['product_id']))) !== false) { if ($product_review[0]['Score'] !== "") { $product['review_score'] = round($product_review[0]['Score']/$product_review[0]['Count'], 1); } } $products[] = $product; } $pp_rand_keys = array_rand($products, 4); // Make sure there are 3 or more 'featured' products foreach ($pp_rand_keys as $rand_key) $pp_rand_products[$rand_key] = $products[$rand_key]; $products = $pp_rand_products; $GLOBALS['smarty']->assign('POP_PRODUCTS', $products); } } } foreach ($GLOBALS['hooks']->load('class.cubecart.display_homepage') as $hook) include $hook; $content = $GLOBALS['smarty']->fetch('templates/content.homepage.php'); $GLOBALS['smarty']->assign('PAGE_CONTENT', $content); }and here is what was added to the home page template ( it's the e-scaler skin ) <h2>Most Popular</h2> <div class="product-list"> {foreach from=$POP_PRODUCTS item=product} <div class="product"> <form action="{$VAL_SELF}" method="post" class="addForm" id="P{$product.product_id}"> <p class="image"> <a href="{$product.url}" title="{$product.name}"> <img src="{$product.image}" alt="{$product.name}" /> </a> {if $product.review_score && $CTRL_REVIEW} <span class="rating"> {for $i = 1; $i <= 5; $i++} {if $product.review_score >= $i} <span class="icon icon-star3"></span> {elseif $product.review_score > ($i - 1) && $product.review_score < $i} <span class="icon icon-star2"></span> {else} <span class="icon icon-star"></span> {/if} {/for} </span> {/if} </p> <div class="info"> <p class="title"><a href="{$product.url}" title="{$product.name}">{$product.name|truncate:40:"&hellip;"}</a></p> {if $product.ctrl_sale} <p class="price"><span class="old_price_cat">{$product.price}</span> <span class="sale_price_cat">{$product.sale_price}</span></p> {else} <p class="price">{$product.price}</p> {/if} <p class="actions"> <a href="{$product.url}" title="{$product.name}">{$LANG.common.info}</a> <input type="hidden" name="add" value="{$product.product_id}" /> {if $product.ctrl_stock && !$CATALOGUE_MODE} <button type="submit" class="button_add_basket" onclick="$.add2cart('P{$product.product_id}')">{$LANG.catalogue.buy_now}</button> {elseif !$CATALOGUE_MODE} <button type="submit" class="button_add_basket disabled" disabled="disabled">{$LANG.catalogue.out_of_stock_short}</button> {/if} </p> </div> </form> </div> {/foreach} </div> </div>
  17. OK, follow up question. I wanted to add a couple of more boxes on the home page with the most popular items in a category (other than the one already used above) I copied this code, placed in between $GLOBALS['smarty']->assign('LATEST_PRODUCTS', $products);and foreach ($GLOBALS['hooks']->load('class.cubecart.display_homepage') as $hook) include $hook;I called it $popProducts with a hook of {POP_PRODUCTS} and added that to the homepage template. That worked, sort of... BUT all I get is photos from the correct category with no prices and it says "info" and out of stock. The links are correct. I relabeled everything that was a variable with a 2 at the end ($Products2, $category_status2, etc) hoping that was differentiate it from the latest product section but that just made it so I did not get duplicate products from the section above. Where am I going wrong?
  18. Thank you so much. I just learned a whole lot with that info so thanks for that. I was able to make that work but I had to remove the 'where' statement from line 96. My next question, is this too big a load on the server? Is it randomizing the whole inventory table or just the products in cat 16? I have 1,300 products and my host (hostgator) is a real pain about server load. I know rand() is sort of frowned upon so how would I use shuffle as you mentioned? Bill
  19. As the title states I'm trying to switch the latest products on the home page to show a group of random products from just one category. This isn't really a skin question I guess but... I see the piece of code on line 96 in classes/cubecart.class.php $latestProducts = $GLOBALS['db']->select('CubeCart_inventory', false, $where, array('date_added' => 'DESC', 'product_id' => 'DESC'), (int)$GLOBALS['config']->get('config', 'catalogue_latest_products_count'));And if I jump to classes/catalogue.class.php line 617 I see this code if (($result = $GLOBALS['db']->query('SELECT I.product_id FROM `'.$GLOBALS['config']->get('config', 'dbprefix').'CubeCart_category_index` as I, `'.$GLOBALS['config']->get('config', 'dbprefix').'CubeCart_inventory` as INV WHERE I.cat_id = '.$category_id.' AND I.product_id = INV.product_id AND INV.status = 1'.$where2)) !== false) {That would pull up all the products for a specified category. How would I go about making this work? I have tried and tried but with no luck. Say I wanted to use $category_id = 16 Bill
  20. That was what I have been trying to find. I'm still trying to figure out all the terms used in this skin. It certainly is complex. That can be good as it is feature packed but it makes for a steep learning curve to get started with it. Thanks for your help
  21. Not sure if this has been asked and answered. I tried looking but did not find the answer here. How does one change the page width in the foundation skin? I'm using CC6.0.5 and the stock skin. I found the foundation.css file that looks like it has the right code but if I change it nothing happens. Is that just for font size? Bill
  22. Doh! I forgot to add the <link> statement to the main template for the font-awesome folder... It works just fine now. Thanks again Bill
  23. I copied the font awesome folder and looked everywhere for the code or css that make it work but with no luck. There has to be more to it I guess. I can't get it to show the icons. Any idea where the code is that controls them? There is nothing in the DB that can be used for this. I'm at a loss other than just ditch it and create my own links manually but that loses the cool factor..... Bill
  24. Thank you so much. That was it. Now I just have to figure out how to make it all work. Any idea how to get <i class="fa fa-{$link.icon}"> to work in a different skin?
  25. I'm trying to add the {$SOCIAL_LIST} call from the Foundation skin (found in the footer) to the e-scaler skin but it's not working. I assumed the code for this was in the base code for the whole cart but maybe not. Any idea where to find it so I can get this working? Bill
  • Create New...