Jump to content

bsmither

Member
  • Posts

    17,957
  • Joined

  • Last visited

  • Days Won

    602

Everything posted by bsmither

  1. Is the "digital download" the actual product (or service)? You say "no, don't think so", therefore it must be an auxiliary file that you then would mention in the product's description. CubeCart has set aside the /files/ directory to hold those files that are the purchasable product. There is an .htaccess file in this folder that prohibits all HTTP requests for those files -- relying on CubeCart's download functionality (and recently "media steaming"), which is PHP code. The declaration in that .htaccess file in /files/, which denies direct access by the web server, also includes sub-folders. Except, the /public/ sub-folder, having its own .htaccess file, which allows direct access by the web server. A direct link (www.example.com/files/public/info.pdf) will work for this file.
  2. Is the site hosted? If so, have the hosting company provided a control panel for you to manage it? Be sure that 'www' is a sub-domain that has been setup -- alongside the other sub-domains. Even though 'www' is very common and usually included in any automatic setup script, it is still considered a sub-domain and must be treated as such. The SSL Security Certificate, fortunately, will always be coded to know about the domain name, and as an alternate, the 'www' sub-domain. There will be more certificates required for other sub-domains, or a 'wild-card' certificate to recognize any sub-domain.
  3. After having experimented with the code edits, what is your opinion of the new functionality? Any thing else we can do? Otherwise, we can close out this conversation and make a suggestion to the programmers in the Github.
  4. Probably. The seo 'path' that gets associated with product 22 shouldn't change at all, once created and databased. So, the query that uses this path to figure out the product ID value would naturally come from CubeCart's cache. However, I don't know what would have been cached that would have caused CubeCart to not find the proper product ID.
  5. In /classes/cubecart.class.php, near line 2623 (CC652), begins a block of code that tests if the shipping method used has a shipping module. At lines 2636 and 2646, there is code that formats 'ship_date'. Additional statements can be added just above those two statements: Find in two locations: 'date' => (!empty($order['ship_date']) && $order['ship_date']!=='0000-00-00') ? formatDispatchDate($order['ship_date']) : '' Add above each location: 'alt_ship_date' => (!empty($order['alt_ship_date']) && $order['alt_ship_date']!=='0000-00-00') ? formatDispatchDate($order['alt_ship_date']) : '', 'venue_ship_product' => $order['venue_ship_product'], 'all_shipping_used' => $order['all_shipping_used'], Then, in the skin, add the necessary HTML to show these new elements of the $DELIVERY array.
  6. So, there is 'all_ship_date', etc. as a columns in CubeCart_order_summary. Therefore, it should be real easy to incorporate those columns into the $DELIVERY array. I will look at the stock code to try to add new code to read those columns.
  7. In the "Switching Power Supply" category, I found the 110V variant, but not the 220V variant, in the listing. On the 220V variant product's admin details, General tab, are you sure the product has its Status checkbox checked? Might there be something entered in the "List from" date entry field? Might it be out of stock and the store settings say to hide out of stock? Might it be assigned a primary category, other than Switching Power Supply", where that category is disabled? Well, scratch all that. I see the 220V variant just below the 110V variant in the listing - just with a wildly different Name. Please determine the product_ids (21 for the 110V variant) of these tow items. Then using an external database utility, look in the table CubeCart_seo_urls and find the rows for those item_id's of type prod. Compare the path with what you expect.
  8. When the admin is updating an order, specifically when changing an order to Complete ('status' = 3), there is code in the admin /sources/ file orders.index.inc.php, near line 208, that tests for the presence of a manually entered 'ship_date'. If not present (or empty), then today's date will be used. I haven't checked if a query for an order's summary was fetched from the cache (I would assume so because, eventually, the order's details won't change over time) caused by the customer wanting to see their order history. Therefore, after Saving the order summary from admin, the admin would need to have CubeCart clear its internal cache, then the customer would need to refresh their view of the order's details. "I use a database called all_ship_date, venue_ship_product, and all_shipping_used." Where are these database tables located? In the same database as are all the other "CubeCart_abc" database tables? If so, then code could be added (likely through a code snippet) to JOIN that data into $Smarty's $DELIVERY array. If not, while not impossible, a much more complicated effort would be involved to fetch the relevant data.
  9. In my opinion, those parenthesis should have caused a different problem, resulting in not showing that content at all. Very strange! Parentheses are used to force an "order-of-math-operations", or as a "container" of function arguments. But, since there was no function name preceding the function argument "container", PHP should have complained about something wrong with the statement syntax. However, this was inside braces - which are reserved for Smarty statements. Thus, Smarty will "parse" its statements, compiling them into real PHP statements. You can see the compiled result files in the /cache/skin/ folder. For myself, the process by which Smarty parses its statements, and how it deals with anomalies, is unknown. Therefore, why Smarty would use "stored/cached" contents of a variable, let alone where those contents could possibly be stored/cached -- I have no idea. I do plan to conduct my own experiments to try to replicate this situation.
  10. The files that have been modified to show Best Products Sold in a given time frame, and Best Customers in a given time frame are ready for testing. I will try to attach the ZIP file to this post. But if the forum no longer allows it (I used to be able to do this), send me a PM with your email address and I will send them to you. Well, the message said the upload failed. So, if interested, ....
  11. 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.
  12. 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.)
  13. 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.
  14. 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.
  15. "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.)
  16. 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.
  17. I change my code -- from what to what? Still shows the original -- what? Is this "code" actually part of the product's Description?
  18. 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">
  19. 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+.
  20. 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?
  21. 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.)
  22. 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.
  23. 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.)
  24. 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.
×
×
  • Create New...