Jump to content

bsmither

Member
  • Posts

    16,418
  • Joined

  • Last visited

  • Days Won

    533

Posts posted by bsmither

  1. That would depend which skin you are using, and what specific button you are observing.

    If it is Foundation, and any general button ("Add to Basket" for example), the blue color is Foundation's standard color, but can be overwritten.

    You would create a CSS rule:

    button, .button {
      background-color: red;
      border-color: darkred;
    }
    button:hover, button:focus,
    .button:hover, .button:focus {
      background-color: orange;
    }

    Put this rule in the Foundation skin's file /css/cubecart.default.css.

  2. So, regardless of which you use for:

    {$product.whatever} in, for example:
    <td><span class="editable number" name="product[{$product.product_id}][begin]">{$product.begin}</span></td>

    the Smarty diagnostic window says it is a zero-length-string, but what gets displayed is null. That's crazy.

     

  3. So:

    Was:
    <td><span class="editable number" name="product[{$product.product_id}][redo_start]">{$product.redo_start}</span></td>
    Now:
    <td><span class="editable number" name="product[{$product.product_id}][begin]">{$product.begin}</span></td>

    And the database column name has been changed from 'redo_start' to 'begin'. Or do you assign the query result 'redo_start' to the product array element 'begin' that is given to Smarty?

     

  4. For the template you posted part of above, add at the end of that file this:

    {debug}

    This will have the browser popup a window showing the values of $product and the array that $product came from ($PRODUCTS?).

    What is the <div> statement doing? What is $PRODUCT.redo_start?

    I think the <div> block is where you are adding/editing data for a specific product. So, we won't worry about that.

     

  5. Try this:

    	{foreach from=$SUBCATS item=subcat}
    	<div class="subcategory product-list">
    		<a class="image" href="{$subcat.url}" title="{$subcat.cat_name}"><img src="{$subcat.cat_image}" alt="{$subcat.cat_name}" /></a>
    		<p><a href="{$subcat.url}" title="{$subcat.cat_name}">{$subcat.cat_name}</a></p>
    	</div>
    	{/foreach}

    This evens out the sub-cat listing, except for a category name that takes two lines.

  6. Which approach are you wanting to do? Change how nulls get displayed, or change the value that the database table is allowed to hold?

    Using phpMyAdmin, have it show the list of columns for the Cubecart_inventory table. For each column you need to change, uncheck the "Allow null" option, and for the default value, choose a string with nothing entered in the text entry field.

    The database engine might then automatically change the nulls to a zero-length-string. Or it might not. Or phpMyAdmin may report that altering the columns can't happen as long as there are rows with values that would become disallowed. I'm not sure.

    Once the changes to the database is finished, clear the cache, and then those data items ('Start', 'End') will show a zero-length-string.

  7. The application is showing null because it was programmed that way. The application code could be rewritten to not show 'null' even if the value of that column in the database table is, in fact, null.

    Likewise, one can alter the database table schema so that a column must not hold a null, and must therefore default to a zero-length-string. (Using phpMyAdmin will make this alteration a very easy thing to do.)

    Please note there are some conceptual differences between null and a zero-length-string. Perhaps these differences make no difference to your needs.

  8. CubeCart is very good at figuring out where it is. But this is based on what the web server tells PHP in the $_SERVER array (you can see this array in admin, PHP Info, near the bottom).

    Clear the cache first (as CubeCart wants to use the FQDN URL in the HTML snippet having the list of categories and was cached).

    So, just tell the web server (vhost file) what new domain name it is to answer to, keeping the 'rootdoc' directory the same.

     

    • Like 1
  9. You could copy/paste the file /cache/abcde.html.skin.menu.lang.cache, but it won't last long, and you will be taken by surprise when it happens.

    I see code in the admin Product Import feature that looks at a heading named 'cat_id' which will accept either a comma-separated list of ID numbers, or a comma-separated list of category names. I think each item in the name list can be expressed as a slash-separated hierarchy of category names. The first item in the list will be the item's primary category.

    But the most easiest is to have phpMyAdmin export the CubeCart_category database table to a SQL type of file, then import that SQL file via phpMyAdmin to the other database.

    • Like 1
  10. I have experimented with PHP 8, and, yes, there are a couple of things that need changing in the core code.

    However, one real biggie is that Smarty (the template engine) does not yet work all that reliably under PHP 8 - especially the way CubeCart codes the Smarty templates.

     

  11. Well, OK, your description above - an option type, Color - as a drop-down selector is entirely within CubeCart's wheelhouse. Please see:

    https://demo.cubecart.com/cc6/3d-glasses-tdg-br200/w.html.html

    and note the drop-down selector for Colour. (Also note the Quantity Discounts - not BuyXGetY, but just to point it out.)

    When all options are chosen off of their "Please Select" choice, there is an ajax call back to the store to get an updated price and stock level.

    CubeCart has some existing code that would implement a distinct image per option combination, but nowhere near being complete.

    This plugin may be of interest:

    https://www.cubecart.com/extensions/plugins/product-option-images

    As to the BuyXGetY solution, I find a few stores have that. I'm trying to install Drupal Commerce to check it out, but as with most things Linux and Me, that DC ain't getting installed all that easily.

    • Like 1
  12. But that brings up a issue that a product can have several types of options assigned to it.

    For example: Size (S,M,L,XL), Color: (Green, Red, Yellow, Black). This results in a 4X4 grid and is easily displayed (pigeonhole).

    But then add: Neck (Crew-Neck, V-Neck, Polo-Neck). Scaling up a grid is difficult to do without some innovative javascript to get it displayed.

    However, when(if) that can be done, we now have a path to blank out those option combinations (pigeonholes) that are out of stock.

     

  13. Got it!

    That would require just a bit of custom coding in the 'content.product.php' and 'element.product_options.php' templates.

    All the data is available in these templates -- the data just needs to be reconfigured into distinct 'submit-able' buttons for each option assigned to the main product.

    The list of choices could be a drop-down selector, but might be better as a grid/list of keywords or color blobs.

  14. The phpMyAdmin application is readily available in your hosted account's control center. It is also fairly easy to understand -- able to work your way around without having first to have read the manual.

    If your hosting provider allows external (remote) access to your database, there are also desktop applications that will get you what you want: HeidiSQL, MySQL Workbench, LibreOffice Base, and numerous others.

     

  15. There doesn't seem to be any CSS rules that, if messed up, would cause this.

    Hover the very tip of the mouse cursor over that white stripe, right-click, then from the context menu that appears, select to examine that element in the browser's Developer Tools.

    The Developer Tools panel that shows the HTML and the CSS rules that apply should show in a large popup window (or a separate panel in the browser's main window).

  16. If I understand your description above, then this may be what you are wanting:

    You would assign a 'plethora' of items to a named category. That category would be listed on the Navigation Bar. When viewing that category, the 'plethora' of items will be shown as a list, or grid, of panels. There would be several such categories, each with a 'plethora' of items shown (not necessarily a unique set).

     

  17. The "database files" are not meant to be accessed directly by using a file explorer or web browser. And getting access to them on a hosted site will probably not be allowed.

    But if you really want to, and have root user permissions to explore, look in the folder /var/lib/mysql/ -- unless the hosting provider has put your site's database files somewhere else. That's entirely possible. Also, these files are not human-readable.

     

  18. "Why would I want to inhibit all plugins and snippets?"

    Generally, when an application is acting up, one can start that app in "safe mode", where plugins, extensions, and other extraneous appendages are inhibited from starting. This mode is not intended to be permanent, but rather allow a tech to fix whatever is preventing the app from getting to a usable state of operation.

    "Also do you know how l can navigate to the databases you mentioned?"

    If your site is hosted, the hosting provider may provide you with a Control Center to manage the databases, users, content, domain names, etc, of that site. There will be a control panel that let's the hosted site admin manage the database. A tool that is typically provided is phpMyAdmin - a web-based application to effectuate changes to the database(s). (There are other solutions to manage a database if your site is not hosted, or if there is no Control Center provided.)

     

×
×
  • Create New...