Jump to content

Product Price


claudiojcosta
 Share

Recommended Posts

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

Let's work with the template content.product.php first. Open that file for editing in a programmer's text editor.

At the end of the file's contents, add {debug} and save the file back to the site.

When you ask for the page, you will now get a popup of all the variables that were given to the template rendering engine, Smarty.

Find $PRODUCT and you will see what all the data that is available to the template that pertains to the product - including prices.

Now, keeping that popup window open, remove {debug} from the file's contents so that other visitors to your site won't be distracted by the popup.

Link to comment
Share on other sites

In "Catalogue" mode, CubeCart will still show prices. That's what catalogues do.

In CubeCart's "Catalogue" mode, the visitor cannot checkout. The products cannot be purchased.

What you can try to do is move the test for $CATALOGUE_MODE higher in the template:

In content.product.php, near line 129, find:
{if ($CTRL_ALLOW_PURCHASE) && (!$CATALOGUE_MODE)}

Move that above this:
            <h3>
               {if $PRODUCT.ctrl_sale}

Then, if in "Catalogue" mode, no prices will be displayed. You will also need to add code to Discount Prices to suppress displaying that.

Link to comment
Share on other sites

Does not work my friend.

 

 {if ($CTRL_ALLOW_PURCHASE) && (!$CATALOGUE_MODE)}
      <p class="buy_button">
        <input type="text" name="quantity" value="1" class="quantity required" />
        <input type="hidden" name="add" value="{$PRODUCT.product_id}" />
        <input type="submit" value="{$LANG.catalogue.add_to_basket}" class="button_white" />
      </p>
      {else}

 

I move above

{if isset($PRODUCT) && $PRODUCT}
<h2>{$PRODUCT.name}</h2>
<form action="{$VAL_SELF}" method="post" class="addForm">
  <div>
    <div id="product_detail">
      {if $PRODUCT.ctrl_sale}
      <h1><span class="price_previous">{$PRODUCT.price}</span> <span class="price_sale">{$PRODUCT.sale_price}</span></h1>
      {else}
      <h1>{$PRODUCT.price}</h1>
      {/if}

 

---------------------------------------------------------

I attachment file

Thanks a lot

bye

content.product.php

Link to comment
Share on other sites

Ok, I see this is probably the Kurouto skin, not Foundation. (We needed to know this.)

In your skin's content.product.php:

FIND near line 67:
{if ($CTRL_ALLOW_PURCHASE) && (!$CATALOGUE_MODE)}

CHANGE to:
{* if ($CTRL_ALLOW_PURCHASE) && (!$CATALOGUE_MODE) *}

FIND near line 5:
	<div id="product_detail">
	  {if $PRODUCT.ctrl_sale}

CHANGE to:
	<div id="product_detail">
     {if ($CTRL_ALLOW_PURCHASE) && (!$CATALOGUE_MODE)}
	  {if $PRODUCT.ctrl_sale}

Because a skin file has been edited, you may need to clear CubeCart's cache. In admin, Maintenance, Rebuild tab, check the Clear Cache box and submit.

Link to comment
Share on other sites

claudiojcosta    It's difficult to understand what you're asking for exactly. Please don't take offense by this but I'm guessing English isn't your first language?

Are you saying that you don't want anybody to see your product prices when they visit your store? Maybe if you could explain in a little more detail what kind of store you are wanting to have such as what is the purpose of the store?

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.

 Share

×
×
  • Create New...