Jump to content

bsmither

Member
  • Posts

    17,971
  • Joined

  • Last visited

  • Days Won

    603

Everything posted by bsmither

  1. We know that editing the product's description (having put the code in Angel and Child) does show the changes on the storefront. Please show the custom template code (5 lines before and 5 lines after) where the Smarty variable $PRODUCT.related_used_with is located.
  2. Please see if the order of the 'Use With' images for 'Tarantulas' changes on the storefront after you change the order in the editor. (And Clear Cache.)
  3. Again, I assume you had CubeCart clear its internal cache after saving the edited data. That is necessary because the result from the query in the Catalogue class, function getProductData(), the database record will be pulled from CubeCart's internal cache - if it exists.
  4. Other than a strange 'img' attribute on the third <img> tag, I do not see anything wrong. I will assume that the database record gets appropriately updated. You can find the respective database query in the list of Queries.
  5. "Do I need to add the related_used_with and specs to the product description?" You shouldn't have to. The content of the 'related_used_with' editor, being databased in a new column of the CubeCart_inventory database table, then retrieved as an element of all data found in that record, should be part of Smarty's $PRODUCT array. (I assume you had CubeCart clear its internal cache after saving the edited data.)
  6. I see that in admin, there is a dedicated editor for 'related_used_with' - and I assume there is a database column for it. Have CubeCart's debug mode enabled. Save the edit screen after making sure that the class="th" is part of the <img> tag as seen above. In the debug window, CubeCart will show what was received in the POST payload. Confirm the <img> tag has the class="th" attribute. If this attribute is not present, then we might think that the editor is stripping it away. Which is strange.
  7. I change my code -- from what to what? Still shows the original -- what? Is this "code" actually part of the product's Description?
  8. Works for me: <img class="th" alt="Tealight Candles" src="../images/related/candle-tealight-lot-5-150.jpg" style="border-width:0;" title="Tealight Candles">
  9. This may be the case where the plugin has been encoded with ionCube, but the latest version encoded will only work with PHP 7.2 up to the latest PHP 7 version. Please send an email to @havenswift-hosting asking about getting the plugin encoded for PHP 8.1+.
  10. We need to find out why the single image gallery is still being shown. (I requested the Scented Tarts page, but it seems you restored the templates to the way it was.) Did you edit the cubecart.helpers.css file, then had Cubecart clear its internal cache?
  11. You are saying that your plugin adds to CubeCart's router? Or does it add to CubeCart's query listener? The router delivers a whole page, the listener responds with either a JSON string or HTML snippet. (There is also a do-something listener that is not meant to return anything.)
  12. Let's try this - your skin code may be very slightly different, especially the classes. In the skin CSS file cubecart.helpers.css, at the end, add: .hide-important { display:none!important; } The skin template element.product.horizontal_gallery.php, replace all the code with: <div class="row"> <div class="small-5 medium-7 columns horizontal"> <a href="#" class="open-clearing" data-thumb-index="0"><img src="{$PRODUCT.medium}" alt="{if isset($PRODUCT.image_tags.medium.alt) && !empty($PRODUCT.image_tags.medium.alt)}{$PRODUCT.image_tags.medium.alt}{else}{$PRODUCT.name}{/if}"{if isset($PRODUCT.image_tags.medium.title)} title="{$PRODUCT.image_tags.medium.title}"{/if} id="img-preview"></a> <ul class="{if !is_array($GALLERY) || count($GALLERY) < 2}hide-important {/if}clearing-thumbs small-block-grid-3 medium-block-grid-5 marg-top" data-clearing> {foreach from=$GALLERY item=image} <li><a href="{$image.source}" class="th"><img src="{$image.small}" data-image-swap="{$image.medium}" data-caption="{$PRODUCT.name}{if !empty($image.image_tags.title)}: {/if}{$image.image_tags.title}" class="image-gallery" alt="{if isset($image.image_tags.alt) && !empty($image.image_tags.alt)}{$image.image_tags.alt}{else}{$image.name}{/if} - {$LANG.catalogue.click_enlarge}"{if isset($image.image_tags.title)} title="{$image.image_tags.title}"{/if}></a></li> {/foreach} </ul> </div> <div class="small-7 medium-5 columns"> {include file='templates/element.product.options.php'} {include file='templates/element.product.review_score.php'} {include file='templates/element.product.call_to_action.php'} </div> </div> The skin template element.product.vertical_gallery.php, replace all the code with: <div class="row"> <div class="medium-1 columns thinpad-right off-canvas-for-small vertical"> <div id="scrollUp" class="scroller"><svg class="icon"><use xlink:href="#icon-angle-up"></use></svg></div> <ul class="{if !is_array($GALLERY) || count($GALLERY) < 2}hide-important {/if}clearing-thumbs small-block-grid-1" id="scrollContent" data-clearing> {foreach from=$GALLERY item=image} <li><a href="{$image.source}" class="th"><img src="{$image.small}" data-image-swap="{$image.medium}" data-caption="{$PRODUCT.name}{if !empty($image.image_tags.title)}: {/if}{$image.image_tags.title}" class="image-gallery" alt="{if isset($image.image_tags.alt) && !empty($image.image_tags.alt)}{$image.image_tags.alt}{else}{$image.name}{/if} - {$LANG.catalogue.click_enlarge}"{if isset($image.image_tags.title)} title="{$image.image_tags.title}"{/if}></a></li> {/foreach} </ul> <div id="scrollDown" class="scroller"><svg class="icon"><use xlink:href="#icon-angle-down"></use></svg></div> </div> <div class="small-5 medium-6 columns text-center nopad"> <a href="#" class="open-clearing" data-thumb-index="0"><img src="{$PRODUCT.medium}" alt="{if isset($PRODUCT.image_tags.medium.alt) && !empty($PRODUCT.image_tags.medium.alt)}{$PRODUCT.image_tags.medium.alt}{else}{$PRODUCT.name}{/if}"{if isset($PRODUCT.image_tags.medium.title)} title="{$PRODUCT.image_tags.medium.title}"{/if} id="img-preview"></a> <p class="show-for-small-only">{if is_array($GALLERY) && count($GALLERY) > 1}{$LANG.catalogue.tap_gallery}{else}{$LANG.catalogue.tap_enlarge}{/if}</p> </div> <div class="small-7 medium-5 columns thinpad-left"> {include file='templates/element.product.options.php'} {include file='templates/element.product.review_score.php'} {include file='templates/element.product.call_to_action.php'} </div> </div> What this does is to make use of the same code when: there is only one assigned image (so, normally the gallery is not shown), or several assigned images. And this code will show the "colorbox" - again, whether or not the gallery has more than one image to be shown. You said your content.product.php template file has all of the {includes} included already, but you should be able to easily find where to make the edits. After editing the CSS file, be sure to have CubeCart clear its internal cache so that the edited file can be included in a new cached "squeezed" master CSS file.
  13. CubeCart is coded, when there is only one image for the product, that the main image has a direct link to the actual source image (/images/source/image.png). When there is more than one image for this product, Cubecart has code to show a "Colorbox" showing that image along with a scroller of thumbnails along the bottom edge. The Colorbox is coded to show the image attributes. But, when the browser fetches an actual image without benefit of any HTML code around it (such as within an <img> tag), there is nothing to show but the raw image. Please note the browser's address bar showing the URL of the actual image's location. A 'Feature Request' can be made in the Github to show the largest size image in a Colorbox for the case where there is only one image assigned to a product. (Let's ignore the popup issue for the moment. You say the "debug info". This may be CubeCart's debug info. If so, then Smarty's debug window might be located at the same location at the same size as CubeCart's debug window. If so, move or close CubeCart's debug window to see Smarty's debug window.)
  14. Correction: the short-term edit shown above should be: In the skin template, content.product.php, at the very end, add: {if $smarty.server.REMOTE_ADDR eq "a.b.c.d"}{debug}{/if} Note that REMOTE_ADDR must be in all-caps.
  15. I am using Firefox, and I see a title: Scented Tarts Wax Melts (4) Four Pc Packs - Lot 1 I also see the alt content in the HTML code. So I know CubeCart and your skin is operating correctly: "Scented tart 4 squares to a pack. One pack each: Apple pie, sugar cookie, snickerdoodle, peanut butter crunch"
  16. Please make this short-term edit: In the skin template, content.product.php, at the very end, add: {if $smarty.server.remote_addr eq "a.b.c.d"}{debug}{/if} where a.b.c.d is your local IP address (www.showmyip.com) -- in quotes. This will show a Smarty debug popup (hopefully for you only). The popup will show the contents of the array $PRODUCT, and should contain the sub-array 'image_tags'. Verify that there exists in 'image_tags' the sub-array 'medium', and within 'medium', the elements 'alt' and 'title'.
  17. Please confirm that, when viewing the product details, for the product that seems to not show any 'alt' or 'title' content, that there has been detail added to that image in admin, Images, Edit Image.
  18. When CubeCart determines that the security key is invalid, one of the things done is to destroy the $_GET and $_POST variables. That way, nothing untoward gets processed. The missing array key 'HTTP_USER_AGENT' has been dealt with elsewhere in the CubeCart code to not throw a warning - so maybe an issue in the Github regarding this specific statement in the code may show up. In the meantime, you may wish to make this edit: In /classes/user.class.php, near line 719, from: $agent = strtolower($_SERVER['HTTP_USER_AGENT']); To: $agent = strtolower($_SERVER['HTTP_USER_AGENT'] ?? "unknown"); I think this group of errors involve a search spider submitting an obsolete or incomplete page request. The array offset warning identifies a statement that has not been fixed correctly. Please make this edit: In /classes/cubecart.class.php, near line 660, from: if ($_GET['_a'] == 'basket' && $this->_basket['billing_address']['user_defined'] ?? false) { To: if ($_GET['_a'] == 'basket' && isset($this->_basket['billing_address']) && $this->_basket['billing_address']['user_defined'] ?? false) {
  19. If you have direct access to the database server, in its configuration file, set collation_* to "utf8mb4_general_ci", and set character_set_* to "utf8mb4" (character_set_filesystem is "binary"). The 'mb4' part allows for several new extended sets of emojis that require 4 bytes to represent.
  20. When CubeCart starts up, eventually the HookLoader class is instantiated. During this class's construction, a call is made to build a "hooks list". The source of data for this list is the database table CubeCart_hooks. The table CubeCart_hooks is populated with references to a plugin's hooks when that plugin is installed and enabled. For every record in the table CubeCart_hooks, the plugin's filename is used in a path, such as "CC_ROOT_DIR/modules/plugins/plugin_filename", and then that path is added to PHP's 'include_path', as well as CubeCart's internal list of paths. (You can examine the current 'include_path' in admin, PHP Info, in the Core table. The 'include_path' is a list of all file paths that PHP will look into for a given file.) Up to this point, to get the AutoLoader to locate and register a class, that class must be in the /classes/ folder (as the default location), and the main folder of enabled plugins. (Other modules, such as Shipping and Gateway, are understood to have a required class in their main folder, and it will get registered as needed.) There are plugins that have their own classes in their /classes/ folder. To get these classes registered, the plugin uses a hook that is available near the end of CubeCart's wake-up sequence, 'controller.index', just before CubeCart starts fetching data to populate and display the intended page. (There are earlier hooks available, however.) The AutoLoader class has a static function appendPaths($path) that can be used to add to CubeCart's list of paths to look in for a requested class. CubeCart's list of paths may have more entries than PHP's 'include_path' value.
  21. Hm. We can see that right away CubeCart is told to use fr-FR, but the phrases are not coming from that language pack. (See Debug Messages[0]) Please examine the following and try the suggested action: In admin, Languages, take note of any actual entries in the Domain column (not the slightly greyed-out suggested examples). If there are actual entries, blank them out and Save. Have CubeCart clear its internal cache. Did anything change?
  22. Your site is taking a crazy-long amount of time to get to my browser. Please verify your observation about this.
  23. Try this. Place the four lines of jacascript (do not include the <script> tags) in the skin's file 2.cubecart.js (if your skin has that file). Find near lines 2-3: var validation_ini = {}; jQuery(document).ready(function() { Add after: $('.vnb-sub-cbd').hide(); $('.has-sub-cbd').hover(function(){ $(this).children('.vnb-sub-cbd').fadeToggle(200); });
  24. The image above suggests that the javascript that initially hides the child <ul> flyout isn't getting executed. Where is this javascript located? There may be a problem where the browser renders the entire list structure, but only then will the javascript be executed to hide all of the <ul class=".vnb-sub-cbd"> tags.
  25. Just to clarify: the group of statements that starts with <li class="has-sub-cbd"> is located in the skin template file element.navigation_tree.php. If so, then the code at /classes/catalogue.class.php, public function getCategoryTree() might be malfunctioning. Near line 898 is where $children is evaluated. Specifically, this statement: if ($GLOBALS['config']->get('config', 'catalogue_expand_tree') && $children = $this->getCategoryTree($category['cat_id'], $level)) { suggests that there is a setting in admin, Store Settings, Layout tab, "Expand category navigation tree", and that there are subcategories for the given category, for there to be children coded in the HTML.
×
×
  • Create New...