Jump to content

Solved. Help locate soms pages


SentiJB
 Share

Recommended Posts

Hi all. First of all it has been ages i was online here and used cc. ( i even had to make a New login. So all my old mods and messages are gone)

Dont know if any of the old users are still online. My previous nick was Jbdancer 

A lot has changed in cc. Getting to know the New programming but struggling, after searching on forum aswell, to find some functions. 

Using last version of cc

Admin area :

1. Where can i find the function to call for the products from database ( to add New ones / edit products) 

2. Where is the scripting page for adding and editing products.

=> wanna add extra content to the add/edit page 

=> want to change check boxes to standard unchecked creating New product/editing

Front end

3. Where can i find the function to add a product review in database (the function to add the review in database)

4. Where is the page itself for that function.

=> want to change the page to add extra content boxes and want to change it that users need to be loged in. 

Can a moderator contact me also with the New rules for adding free mods? 

 

Edited by SentiJB
Not noted everything
Link to comment
Share on other sites

In admin, observe the Navigation panel on the left edge. Click Products.

The page that shows is a list of all current inventory. A tab at the top  allows one to Add a new product.

CubeCart does not have the ability to change the HTML of its pages. There is a feature whereby a developer can write a plugin (or a Code Snippet) to "hook" into the control code and views of the pages. (One can also make hard changes to the HTML using a programmer's text editor.)

CubeCart fetches reviews from the database in the 'catalogue.class.php' file, 'function displayProduct()'. Look for:

// Display Reviews

The code that inserts a newly submitted review is in 'cubecart.class.php', 'private function _product()'.

The form to submit a review is the skin template 'element.product_reviews.php'.

Link to comment
Share on other sites

33 minutes ago, bsmither said:

CubeCart does not have the ability to change the HTML of its pages. There is a feature whereby a developer can write a plugin (or a Code Snippet) to "hook" into the control code and views of the pages. (One can also make hard changes to the HTML using a programmer's text editor.)

 

I wanna make the hard changes to the coding itself and edit the coding for the add and edit function of the products. 

But for the moment i cant find the coding page for the products.php 

Before it was easy to find. In Early versions you went to admin folder search for addproduct.php or editproduct.php and you could change whatever you want using notepad

38 minutes ago, bsmither said:

CubeCart fetches reviews from the database in the 'catalogue.class.php' file, 'function displayProduct()'. Look for:

// Display Reviews

The code that inserts a newly submitted review is in 'cubecart.class.php', 'private function _product()'.

The form to submit a review is the skin template 'element.product_reviews.php'.

Thank you will have a look 

Link to comment
Share on other sites

In the admin folder (might be named something like 'admin_hAsHeD'), the /sources/ folder, you will find 'products.index.inc.php'. This is the code that processes form submissions, and also prepares the list of products, and the specific data for the product being edited.

The admin skin template 'products.index.php' has the HTML that gets populated with the data and is sent out to the browser.

 

Link to comment
Share on other sites

1 hour ago, bsmither said:

In the admin folder (might be named something like 'admin_hAsHeD'), the /sources/ folder, you will find 'products.index.inc.php'. This is the code that processes form submissions, and also prepares the list of products, and the specific data for the product being edited.

The admin skin template 'products.index.php' has the HTML that gets populated with the data and is sent out to the browser.

 

Thx for the help 

Link to comment
Share on other sites

<div><label for="product_code_auto">{$LANG.catalogue.product_code_auto}</label><span><input name="product_code_auto" id="product_code_auto" type="hidden" class="toggle" {$PRODUCT.auto_code_checked} > <input name="product_code_old" id="product_code_old" type="hidden" value=""> </span></div>

        => how do i set this standard to checked when adding new product

 <div><label for="product_featured">{$LANG.catalogue.product_featured}</label><span><input type="hidden" name="featured" id="product_featured" class="toggle" value="{$PRODUCT.featured}"></span></div>
         <div><label for="product_latest">{$LANG.catalogue.product_latest}</label><span><input type="hidden" name="latest" id="product_latest" class="toggle" value="{$PRODUCT.latest}" ></span></div>

=> how do i set this standard to unchecked when adding new product
        

Link to comment
Share on other sites

In the admin source file products.index.inc.php:

Near line 865, find:

        } else {
            // Breadcrumb
            $GLOBALS['gui']->addBreadcrumb($lang['catalogue']['product_add'], $_GET);
            $result[0] = array(
                'featured' => 1,
                'latest'   => 1,

This 'else' block of code starts the
controller code for the unique values
needed when adding a new product.

Set 'featured' to zero, and set 'latest' to zero.

The 'product_code_auto' may have a bug. I am tracing out the code.

Link to comment
Share on other sites

  • SentiJB changed the title to Solved. Help locate soms pages

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...