Jump to content

sale item images not showing


helenyork

Recommended Posts

Dear all i have added a module on my cubecart 6 kurouto skin but the unfortunate part is my images are not showing.  I have even tried added a module by Inspired IT Solutions, Ltd but the problem was not solved.  Below is the source i have added to the box_item sale

 

{if $PRODUCTS}
<div id="sale_products">
  <h2>{$LANG.catalogue.title_saleitems}</h2>
 
  {foreach from=$PRODUCTS item=product}
<div class="latest_product">
<p class="image">
        <a href="{$product.url}" title="{$product.name}">
          <img src="{$product.image}" alt="{$product.name}" />
        </a>
      </p>
      <a href="{$product.url}" title="{$product.name}">{$product.name}</a><br />
      {if {$product.saving}}<span class="saving">{$LANG.catalogue.saving} {$product.saving}</span>{/if}
{if $product.ctrl_sale}
      <p class="price"><span class="price_previous">{$product.price}</span> <span class="price_sale">{$product.sale_price}</span></p>
      {else}
      <p class="price">{$product.price}</p>
      {/if}
    </div>
  {/foreach}
  
</div>
{/if}

 

Could someone point me in the right direction.

 

regards

Helen

Screenshot 2016-12-14 00.56.30.png

Link to comment
Share on other sites

Welcome helenyork! Glad to see you made it to the forums.

CC6 has no code to get the image for sale items. (Maybe in the next version.)

So, we will have to add it.

In /classes/gui.class.php, near line 1273-1275, find:

$product['sale_price'] = ($sale) ? $GLOBALS['tax']->priceFormat($product['sale_price']) : null;

$vars[] = $product;


Change to:

$product['sale_price'] = ($sale) ? $GLOBALS['tax']->priceFormat($product['sale_price']) : null;
$product['image'] = $this->getProductImage($product['product_id'], 'medium');
$vars[] = $product;

For Kurouto, 'medium' is 270 pixels on the longest side. You can find the skin's image sizes in the skin's config.xml file.

Link to comment
Share on other sites

In all cases (that is, there is no exception), what worked for CC3/4 will never work for CC5/6.

We can help with adding a slide show to CC6. If fact, there is a recent discussion about being able to add a show anywhere it is needed using an included plugin, BXSlider.

You can see it on the demo store (https://demo.cubecart.com/cc6/), and at CubeCart's Homepage (https://www.cubecart.com/).

Link to comment
Share on other sites

On 12/14/2016 at 4:32 AM, bsmither said:

In all cases (that is, there is no exception), what worked for CC3/4 will never work for CC5/6.

We can help with adding a slide show to CC6. If fact, there is a recent discussion about being able to add a show anywhere it is needed using an included plugin, BXSlider.

You can see it on the demo store (https://demo.cubecart.com/cc6/), and at CubeCart's Homepage (https://www.cubecart.com/).

how much will it cost me to get a slider 

Link to comment
Share on other sites

You have mentioned you are using the Kurouto skin. So, we just need to get the BXSlider jQuery plugin loaded into that skin.

CubeCart has an automatic way of doing this. All that needs to be done is to put files in a specific directory and CubeCart will find them and give them to the skin.

These files are already with the Foundation skin, so:

1. Copy the file /skins/foundation/js/vendor/jquery.bxslider.min.js to /js/plugins/
2. Copy the file /skins/foundation/css/jquery.bxslider.css to /js/styles/

Next, read this conversation that discusses how to put the HTML wherever you need the slider.

Link to comment
Share on other sites

Just some housekeeping:

In main.php, find:

	{if isset($CSS)}
		{foreach from=$CSS key=css_keys item=css_files}
		  <link rel="stylesheet" type="text/css" href="{$STORE_URL}/{$css_files}" media="screen" />
          <link href="{$STORE_URL}/skins/{$SKIN_FOLDER}/css/jquery.bxslider.css" rel="stylesheet">
 
  	    {/foreach}
	{/if}

Change to:

	{if isset($CSS)}
		{foreach from=$CSS key=css_keys item=css_files}
		  <link rel="stylesheet" type="text/css" href="{$STORE_URL}/{$css_files}" media="screen" />
  	    {/foreach}
	{/if}

This is the wrong place to put the link to the bxslider.css file. But it will get loaded, provided the actual files were copied over to the folder specified above. (I see the css file, so I assume the other file got copied over as well.)

I don't see the MagicSlideshow code anymore, so maybe you've removed it?

 

Link to comment
Share on other sites

yes i have removed it and i have cleaned up the house and i have added the code for bxslider but still not action.

Do I need to add this line to my main.php

 

 

<script>
               {literal}
               $(document).foundation({equalizer:{equalize_on_stack:true}});
               $('.bxslider').bxSlider({auto:true,captions:true});
               {/literal}
            </script>

Link to comment
Share on other sites

Yes, this should be near the bottom of main.php ( a few extra lines shown so you can tell where it belongs):

{foreach from=$BODY_JS item=js}{$js}{/foreach}
            {foreach from=$JS_SCRIPTS key=k item=script}
            <script src="{$STORE_URL}/{$script|replace:'\\':'/'}" type="text/javascript"></script>
            {/foreach}
            <script>
               {literal}
               $(document).foundation({equalizer:{equalize_on_stack:true}});
               $('.bxslider').bxSlider({auto:true,captions:true});
               {/literal}
            </script>

 

Link to comment
Share on other sites

so how do i take it to email so that you can help me out  I am eagerly waiting your assistance.  Also please let me know how much it will cost to get this done as soon as practically possible.

 

Regards

Hel

5 hours ago, bsmither said:

The main.php template has had the new code added in the wrong place.

We can take this to email to get it all sorted.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...