Jump to content

Dirty Butter

Member
  • Content Count

    6,521
  • Joined

  • Last visited

  • Days Won

    137

Everything posted by Dirty Butter

  1. AH - the gt 0 in the stock level "means greater than zero" and eq 0 means "equal to 0". Just got back home. Will work on the rest of your changes as soon as I can.
  2. I've gone around in circles again {* NEW NESTING *} <tr> <td>{$LANG.catalogue.stock_level}</td> <td>{$PRODUCT.stock_level}</td> </tr> {if ($PRODUCT.stock_level gt 0)}{* IF IN STOCK - PRICE *} <tr> <td>Regular Price</td> <td><span>{$PRODUCT.price}</span></td> </tr> {if ($PRODUCT.ctrl_sale)} {* IF ON SALE - SALE PRICE *} <tr> <td>Sale Price</td> <td><span>{$PRODUCT.sale_price}</span></td> </tr> {/if} {else ($product['stock_level'] = 0) {* IF OUT OF STOCK EITHER ON SALE OR REGULAR PRICE *} <tr> <td>Sold for {if ($PRODUCT.ctrl_sale)} {* IF ON SALE - SALE PRICE *} <td><span>{$PRODUCT.sale_price}</span></td> {else} <tr> <td>Regular Price</td> {* SOLD FOR REGULAR PRICE *} <td><span>{$PRODUCT.price}</span></td> </tr> {/if} {/if} {/if} {* END OF NEW NESTING *} Hopefully it's just that I didn't know the right way to show when it is Out of Stock, not the nesting itself. Exception] /plushtest/includes/lib/smarty/sysplugins/smarty_internal_templatecompilerbase.php:128 - Syntax error in template "file:/plushtest/skins/blue/templates/content.product.php" on line 128 "{else ($product['stock_level'] = 0) {* IF OUT OF STOCK EITHER ON SALE OR REGULAR PRICE *}" - Unexpected " = ", expected one of: "","" , ")"
  3. I've experimented with so many permutations since yesterday that I wouldn't even hazard a guess as to what's going on in it. Thanks for your input! Those are supposed to be comments? But who knows...
  4. I'm pretty sure Bsmither helped me with this some time ago, but I could't find it. I need four scenarios to work within one section of code in the Specifications: Regular price in stock shows Regular Price Regular price out of stock says Sold for Regular Price Sale item in stock has Regular Price row and Sale Price row below Sale item out of stock shows Sold for Sale Price If I can get that logic coded correctly, I want to then get the meta data added to each one, but I have to get the logic worked out first. I've worked on this solid for almost two days and never found the right combination. (I have a stray brace comment in here somewhere - I'll find that if I get the main part fixed.) I currently have: {* PLUSH ORDER OF PRICES *} <tr> <td>{$LANG.catalogue.stock_level}</td> <td>{$PRODUCT.stock_level}</td> </tr> {if ($PRODUCT.ctrl_sale)} <tr>{* Only show this row when item is on sale - regardless of stock *} <td>Sale Price</td> <td><span>{$PRODUCT.sale_price}</span></td> </tr> {/if} <tr>{* Always show this row *} {if ($PRODUCT.stock_level gt 0)}{* In stock *} <td>Regular Price</td> {else}{* Not in stock *} <td>Sold for </td> {/if} <td><span>{$PRODUCT.price}</span></td> </tr> {/if} {* END PLUSH ORDER OF PRICES *} Here are the pages I've been using to check my code: dirtybutter.com/plushcatalog/eden-yellow-pink-elephant-windup-you-are-my-sunshine-head-turns.html (This is the one that is messed up.) dirtybutter.com/plushcatalog/bearington-baby-little-stitches-196659-pnut-gray-elephant.html (order of Sale and Regular Price rows looks odd but I could live with that) dirtybutter.com/plushcatalog/commonwealth-toy-pink-love-monster-cat-with-hearts.html dirtybutter.com/plushcatalog/carters-halloween-orange-pumpkin-tan-velour-bear-with-cap.html Any and All help is MUCH appreciated!!
  5. I use this plugin, and yes, it can be limited to one use per customer.
  6. So does that mean it's not in our code, so there's nothing to do but ignore it? I have recently discovered that View All in admin will cause it, but it does not show the error on our stock test store.
  7. I ended up making a hidden document with the Thank you code in it. I then changed the page PayPal takes them back to.
  8. You could use the GitHub list of code changes for Foundation to see what was changed there. Then you could try making comparable changes to your skin. you would definitely need to backup your skin before attempting it. The more recent commits have a lot to do with "beaurifying" the code - that means really the only difference is where the spacing and length of lines is - not really code changes. Sorry, but I'm not skilled enough to give more specific directions.
  9. There IS a place in PayPal to set the return url AND I already had it set to //dirtybutter.com/plushcatalog/index.php?_a=complete. It's just weird that the customer returned to the page I showed in the post, but I cannot figure out how they got there. I guess I'm going to have to make a fake PayPal account and buy something for a penny. :)
  10. Well that's what I thought you meant, but that redirects to //dirtybutter.com/plushcatalog/index.php?_a=basket even when I'm logged in to the customer who just bought from us. I'm on 6.2.2 with a few of the commits right after 6.2.2 was released.
  11. I'm sorry to be so dense, but I still don't know what the url is for the page they return to.
  12. I have directions for customers to return to our store after paying with PayPal. I don't remember what the url is that PayPal sends the customer TO. And which file is it, so I can make sure it still says what I want it to say.
  13. I just had a thought and hopefully this time I found it. I compared the time in the error log of the last occurrence and checked it against the Users Online. No one had been recorded for that time. But when I looked at Webbots for that time and followed these type links, it created the error message every time: https://dirtybutter.com/plushcatalog/russ-plush-animals.html?page=all So maybe it's the page=all that's causing it???
  14. I thought the More procedure was doing it, but I cannot reproduce it by using More to go to the second page of a Category. It's something customers are doing, but I have no idea what.
  15. I tried going back to the Store Setting with a number in the products per page. It did not change the error message. Error message still points to $catalogue_products_per_page
  16. The error message now points to $catalogue_products_per_page I still have the Store Settings set to a blank number of products per page. I'll put it back and see what happens.
  17. Well, I was mistaken. I have a bunch of that same error message in the php error log today. It did not show up in the Admin Error Log.
  18. I think I may have found it. The number of items per page in Store Settings>Layout is Deprecated. The actual settings for the number per page are in the skins config. So I deleted the old number I still had in Store Settings and left it blank. Then I opened a page of items, used More to load the next page of items on the store front, and there was no error message.
  19. If it will only be seen on the first login to admin for an admin whose been around for awhile - they will not look at the video. Is there any way to make it a new specific video on the first time they make a change that shows cache can be cleared?
  20. I use this is element.meta.php to get it to pick up the image I want. Otherwise it picks up the wrong image for me too. {if $FBOG} <meta property="og:image" content="{$image.source}"> {* MY VERSION *} <meta property="og:image:width" content="600" /> <meta property="og:url" content="{$VAL_SELF}"> {/if} I'm not sure now if I have other code somewhere else that makes this work or not. My product images are 600, and of course your's could be something different. The wrong image would have to be something besides the right image for this to work.
  21. I haven't been able to pin down what's happening when this error is logged: PHP Warning: A non-numeric value encountered in /xxx/public_html/plushcatalog/classes/catalogue.class.php on line 116 Lines 112-147: public function categoryPagination($page) { if ($this->_category_count) { //Pagination $catalogue_products_per_page = $GLOBALS['gui']->itemsPerPage('products', 'perpage'); if (($page * $catalogue_products_per_page) > $this->_category_count) { $new_page = (int)ceil($this->_category_count / $catalogue_products_per_page); if ($new_page < $page) { httpredir(currentPage(null, array('page'=>$new_page))); } } if (($pages = $GLOBALS['db']->pagination($this->_category_count, $catalogue_products_per_page, $page)) !== false) { // Display pagination $GLOBALS['smarty']->assign('PAGINATION', $pages); } } } I'm on today's commit of 6.2.2.
  22. I'd rather have Last Updated instead of Date Added on the homepage. Can this be easily done by editing the code? Or would it be easier to wipe out all Latest Product checkboxes with a query and then check "Latest" when I put a product back in stock?
  23. At first glance your enlarged image looks fine, but then I realized the word Rose is not on the zoomed image, unless I change the browser size to 67%. I'm using FireFox.
  24. Well, it's the two images that would need to be sorted I guess. So maybe it is from the same discussion. The sort code " appears" to be there - and it did work at some point in the past - v5?. I kept putting off asking about it while dealing with more pressing code problems.
  25. Sorry, but I tried unsuccessfully to find the original forum thread. From my notes I'm assuming that Bsmither helped me add this code: products.index.php <td align="center">{$product.stock_level}</td> <!-- BSMITHER DISCOUNT IMAGE rest of code in products.index.inc.php --> <td align="center"><img src="{$STORE_URL}/{$SKIN_VARS.admin_folder}/skins/default/images/{if $product.discount}1{else}0{/if}.png" class="toggle" /></td> <td> <!-- END BSMITHER DISCOUNT IMAGE --> {if $product.updated == '0000-00-00 00:00:00'} {$LANG.common.unknown} {else} {formatTime(strtotime($product.updated))} {/if} </td> And in products.index.inc.php $thead_sort = array ( 'status' => $GLOBALS['db']->column_sort('status', $lang['common']['status'], 'sort', $current_page, $_GET['sort']), 'digital' => $GLOBALS['db']->column_sort('digital', $lang['common']['type'], 'sort', $current_page, $_GET['sort']), 'image' => $lang['catalogue']['title_image'], 'name' => $GLOBALS['db']->column_sort('name', $lang['catalogue']['product_name'], 'sort', $current_page, $_GET['sort']), 'product_code' => $GLOBALS['db']->column_sort('product_code', $lang['catalogue']['product_code'], 'sort', $current_page, $_GET['sort']), 'price' => $GLOBALS['db']->column_sort('price', $lang['common']['price'], 'sort', $current_page, $_GET['sort']), // BSMITHER EXTRA TABS 'stock_level' => $lang['catalogue']['title_stock'], 'sale_price' => $GLOBALS['db']->column_sort('sale_price',$lang['common']['price_sale'],'sort',$current_page,$_GET['sort']), 'stock_level' => $GLOBALS['db']->column_sort('stock_level',$lang['catalogue']['title_stock'],'sort',$current_page,$_GET['sort']), 'discount' => $GLOBALS['db']->column_sort('discount',$lang['catalogue']['title_discount_quantity'],'sort',$current_page,$_GET['sort']), // BSMITHER END EXTRA TABS 'updated' => $GLOBALS['db']->column_sort('updated', $lang['catalogue']['title_last_updated'], 'sort', $current_page, $_GET['sort']), 'translations' => $lang['translate']['title_translations'] ); also in products.index.inc.php $updated_time = $result['updated']; $result['updated'] = $updated_time ? $updated_time : $lang['common']['unknown']; /* BSMITHER CHECK FOR QUANTITY DISCOUNTS rest of code is in products.index.php */ $quanDiscount = $GLOBALS['db']->count('CubeCart_pricing_quantity', 'product_id', array('product_id' => $result['product_id'])); $result['discount'] = ($quanDiscount) ? true : false; /* BSMITHER END CHECK FOR QUANTITY DISCOUNTS */ $smarty_data['products'][] = $result; } This code DOES create a column in the Product Summary listings for the Discount Code. It DOES create an empty box if there is no discount code and a checked box if there is a quantity discount. But it's of no real use in 6.2+ as is, because the column will not sort. Is this fixable? I know there is a GitHub entry having something to do with a sort of some column that's not working.
×
×
  • Create New...