Forums / All Other Contributions/Addons / MultiSite Module Support Thread

MultiSite Module Support Thread

Started by gerome on 23 Apr 2007, 10:24 AM · Views: 581,865

Results 2,161 to 2,180 of 2,247
11 Jun 2021, 11:04 PM
#2163
noppie avatar

noppie

Zen Follower

Join Date:
Mar 2004
Posts:
210
Plugin Contributions:
0

Re: MultiSite Module Support Thread

i have the lastest multi site
and 157b running on my site need help fixing

and i got this debugg error
[11-Jun-2021 22:58:30 UTC] Request URI: /index.php?main_page=index&cPath=21_30, IP address: 66.249.65.243
#1 include() called at [/includes/templates/kandi/templates/tpl_modules_product_listing.php:10]
#2 require(/includes/templates/kandi/templates/tpl_modules_product_listing.php) called at [/includes/templates/kandi/templates/tpl_index_product_list.php:109]
#3 require(/includes/templates/kandi/templates/tpl_index_product_list.php) called at [/includes/modules/pages/index/main_template_vars.php:240]
#4 require(/includes/modules/pages/index/main_template_vars.php) called at [/includes/templates/kandi/common/tpl_main_page.php:181]
#5 require(/includes/templates/kandi/common/tpl_main_page.php) called at [/index.php:94]
--> PHP Deprecated: Unparenthesized a ? b : c ? d : e is deprecated. Use either (a ? b : c) ? d : e or a ? b : (c ? d : e) in /includes/modules/kandi/product_listing.php on line 145.

and here it the modules/kandi/product_listing.php on line 145

<?php /** * product_listing module * * @copyright Copyright 2003-2020 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license <http://www.zen-cart.com/license/2_0.txt> GNU Public License V2.0 * @version $Id: DrByte 2020 May 16 Modified in v1.5.7 $ */ if (!defined('IS_ADMIN_FLAG')) { die('Illegal Access'); } $show_submit = zen_run_normal(); // bof multi site module $listing_split = new splitPageResults(cat_filter($listing_sql), MAX_DISPLAY_PRODUCTS_LISTING, 'p.products_id', 'page'); // eof multi site module $zco_notifier->notify('NOTIFY_MODULE_PRODUCT_LISTING_RESULTCOUNT', $listing_split->number_of_rows); $how_many = 0; $list_box_contents[0] = array('params' => 'class="productListing-rowheading"'); $zc_col_count_description = 0; $lc_align = ''; for ($col=0, $n=sizeof($column_list); $col<$n; $col++) { switch ($column_list[$col]) { case 'PRODUCT_LIST_MODEL': $lc_text = TABLE_HEADING_MODEL; $lc_align = ''; $zc_col_count_description++; break; case 'PRODUCT_LIST_NAME': $lc_text = TABLE_HEADING_PRODUCTS; $lc_align = ''; $zc_col_count_description++; break; case 'PRODUCT_LIST_MANUFACTURER': $lc_text = TABLE_HEADING_MANUFACTURER; $lc_align = ''; $zc_col_count_description++; break; case 'PRODUCT_LIST_PRICE': $lc_text = TABLE_HEADING_PRICE; $lc_align = 'right' . (PRODUCTS_LIST_PRICE_WIDTH > 0 ? '" width="' . PRODUCTS_LIST_PRICE_WIDTH : ''); $zc_col_count_description++; break; case 'PRODUCT_LIST_QUANTITY': $lc_text = TABLE_HEADING_QUANTITY; $lc_align = 'right'; $zc_col_count_description++; break; case 'PRODUCT_LIST_WEIGHT': $lc_text = TABLE_HEADING_WEIGHT; $lc_align = 'right'; $zc_col_count_description++; break; case 'PRODUCT_LIST_IMAGE': $lc_text = TABLE_HEADING_IMAGE; $lc_align = 'center'; $zc_col_count_description++; break; } if ( ($column_list[$col] != 'PRODUCT_LIST_IMAGE') ) { $lc_text = zen_create_sort_heading($_GET['sort'], $col+1, $lc_text); } $list_box_contents[0][$col] = array('align' => $lc_align, 'params' => 'class="productListing-heading"', 'text' => $lc_text ); } if ($listing_split->number_of_rows > 0) { $rows = 0; $listing = $db->Execute($listing_split->sql_query); $extra_row = 0; while (!$listing->EOF) { $rows++; if ((($rows-$extra_row)/2) == floor(($rows-$extra_row)/2)) { $list_box_contents[$rows] = array('params' => 'class="productListing-even"'); } else { $list_box_contents[$rows] = array('params' => 'class="productListing-odd"'); } $cur_row = sizeof($list_box_contents) - 1; $linkCpath = $listing->fields['master_categories_id']; if (!empty($_GET['cPath'])) $linkCpath = $_GET['cPath']; if (!empty($_GET['manufacturers_id']) && !empty($_GET['filter_id'])) $linkCpath = $_GET['filter_id']; for ($col=0, $n=sizeof($column_list); $col<$n; $col++) { $lc_align = ''; switch ($column_list[$col]) { case 'PRODUCT_LIST_MODEL': $lc_align = ''; $lc_text = $listing->fields['products_model']; break; case 'PRODUCT_LIST_NAME': $lc_align = ''; $lc_text = '<h3 class="itemTitle"> <a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . zen_get_generated_category_path_rev($linkCpath) . '&products_id=' . $listing->fields['products_id']) . '">' . $listing->fields['products_name'] . '</a> </h3> <div class="listingDescription">' . zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) . '</div>'; break; case 'PRODUCT_LIST_MANUFACTURER': $lc_align = ''; $lc_text = '<a href="' . zen_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing->fields['manufacturers_id']) . '">' . $listing->fields['manufacturers_name'] . '</a>'; break; case 'PRODUCT_LIST_PRICE': $lc_price = zen_get_products_display_price($listing->fields['products_id']) . '<br />'; $lc_align = 'right'; $lc_text = $lc_price; // more info in place of buy now $lc_button = ''; if (zen_requires_attribute_selection($listing->fields['products_id']) or PRODUCT_LIST_PRICE_BUY_NOW == '0') { $lc_button = '<a class="list-more" href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . zen_get_generated_category_path_rev($linkCpath) . '&products_id=' . $listing->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>'; } else { if (PRODUCT_LISTING_MULTIPLE_ADD_TO_CART != 0) { if ( // not a hide qty box product $listing->fields['products_qty_box_status'] != 0 && // product type can be added to cart zen_get_products_allow_add_to_cart($listing->fields['products_id']) != 'N' && // product is not call for price $listing->fields['product_is_call'] == 0 && // product is in stock or customers may add it to cart anyway ($listing->fields['products_quantity'] > 0 || SHOW_PRODUCTS_SOLD_OUT_IMAGE == 0) ) { $how_many++; } // hide quantity box if ($listing->fields['products_qty_box_status'] == 0) { $lc_button = '<a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing->fields['products_id']) . '">' . zen_image_button(BUTTON_IMAGE_BUY_NOW, BUTTON_BUY_NOW_ALT, 'class="listingBuyNowButton"') . '</a>'; } else { $lc_button = TEXT_PRODUCT_LISTING_MULTIPLE_ADD_TO_CART . '<input type="text" name="products_id[' . $listing->fields['products_id'] . ']" value="0" size="4" aria-label="' . ARIA_QTY_ADD_TO_CART . '">'; } } else { // qty box with add to cart button if (PRODUCT_LIST_PRICE_BUY_NOW == '2' && $listing->fields['products_qty_box_status'] != 0) { $lc_button= zen_draw_form('cart_quantity', zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=add_product&products_id=' . $listing->fields['products_id']), 'post', 'enctype="multipart/form-data"') . '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($listing->fields['products_id'])) . '" maxlength="6" size="4" aria-label="' . ARIA_QTY_ADD_TO_CART . '"><br />' . zen_draw_hidden_field('products_id', $listing->fields['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT) . '</form>'; } else { <----- line 145 $lc_button = '<a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing->fields['products_id']) . '">' . zen_image_button(BUTTON_IMAGE_BUY_NOW, BUTTON_BUY_NOW_ALT, 'class="listingBuyNowButton"') . '</a>'; } } } $zco_notifier->notify('NOTIFY_MODULES_PRODUCT_LISTING_PRODUCTS_BUTTON', array(), $listing->fields, $lc_button); $the_button = $lc_button; $products_link = '<a class="" href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . zen_get_generated_category_path_rev($linkCpath) . '&products_id=' . $listing->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>'; $lc_text .= '<br />' . zen_get_buy_now_button($listing->fields['products_id'], $the_button, $products_link) . '<br />' . zen_get_products_quantity_min_units_display($listing->fields['products_id']); $lc_text .= '<br />' . (zen_get_show_product_switch($listing->fields['products_id'], 'ALWAYS_FREE_SHIPPING_IMAGE_SWITCH') ? (zen_get_product_is_always_free_shipping($listing->fields['products_id']) ? TEXT_PRODUCT_FREE_SHIPPING_ICON . '<br />' : '') : ''); break; case 'PRODUCT_LIST_QUANTITY': $lc_align = 'right'; $lc_text = $listing->fields['products_quantity']; break; case 'PRODUCT_LIST_WEIGHT': $lc_align = 'right'; $lc_text = $listing->fields['products_weight']; break; case 'PRODUCT_LIST_IMAGE': $lc_align = 'center'; if ($listing->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) { $lc_text = ''; } else { $lc_text = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . zen_get_generated_category_path_rev($linkCpath) . '&products_id=' . $listing->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $listing->fields['products_image'], $listing->fields['products_name'], IMAGE_PRODUCT_LISTING_WIDTH, IMAGE_PRODUCT_LISTING_HEIGHT, 'class="listingProductImage"') . '</a>'; } break; } $list_box_contents[$rows][$col] = array('align' => $lc_align, 'params' => 'class="productListing-data"', 'text' => $lc_text); } $listing->MoveNext(); } $error_categories = false; } else { $list_box_contents = array(); $list_box_contents[0] = array('params' => 'class="productListing-odd"'); $list_box_contents[0][] = array('params' => 'class="productListing-data"', 'text' => TEXT_NO_PRODUCTS); $error_categories = true; } if (($how_many > 0 and $show_submit == true and $listing_split->number_of_rows > 0) and (PRODUCT_LISTING_MULTIPLE_ADD_TO_CART == 1 or PRODUCT_LISTING_MULTIPLE_ADD_TO_CART == 3) ) { $show_top_submit_button = true; } else { $show_top_submit_button = false; } if (($how_many > 0 and $show_submit == true and $listing_split->number_of_rows > 0) and (PRODUCT_LISTING_MULTIPLE_ADD_TO_CART >= 2) ) { $show_bottom_submit_button = true; } else { $show_bottom_submit_button = false; } $zco_notifier->notify('NOTIFY_PRODUCT_LISTING_END', $current_page_base, $list_box_contents, $listing_split, $show_top_submit_button, $show_bottom_submit_button, $show_submit, $how_many); if ($how_many > 0 && PRODUCT_LISTING_MULTIPLE_ADD_TO_CART != 0 and $show_submit == true and $listing_split->number_of_rows > 0) { // bof: multiple products echo zen_draw_form('multiple_products_cart_quantity', zen_href_link(FILENAME_DEFAULT, zen_get_all_get_params(array('action')) . 'action=multiple_products_add_product', $request_type), 'post', 'enctype="multipart/form-data"'); }

My Multi_Site Zen Carts
http://herasonlinemarket.com

23 Jun 2021, 4:55 AM
#2164
noppie avatar

noppie

Zen Follower

Join Date:
Mar 2004
Posts:
210
Plugin Contributions:
0

Re: MultiSite Module Support Thread

This is the debug file

[23-Jun-2021 04:42:30 UTC] Request URI: /index.php?main_page=index&cPath=21_30, IP address: 24.113.223.101
#1 include() called at [/includes/templates/kandi/templates/tpl_modules_product_listing.php:10]
#2 require(/includes/templates/kandi/templates/tpl_modules_product_listing.php) called at [/includes/templates/kandi/templates/tpl_index_product_list.php:109]
#3 require(/includes/templates/kandi/templates/tpl_index_product_list.php) called at [/includes/modules/pages/index/main_template_vars.php:240]
#4 require(/includes/modules/pages/index/main_template_vars.php) called at [/includes/templates/kandi/common/tpl_main_page.php:181]
#5 require(/includes/templates/kandi/common/tpl_main_page.php) called at [/index.php:94]
--> PHP Deprecated: Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in /includes/modules/kandi/product_listing.php on line 145.

and this is line 145.. for the life of me i don't know where to put the ()

 $products_link = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . ( ($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ? zen_get_generated_category_path_rev($_GET['filter_id']) : $_GET['cPath'] > 0 ? zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id'])) . '&products_id=' . $listing->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>';

thank you in advanced

My Multi_Site Zen Carts
http://herasonlinemarket.com

23 Jun 2021, 2:58 PM
#2165
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,974
Plugin Contributions:
8

Re: MultiSite Module Support Thread

try:

$products_link = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . ( ($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ? zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > 0 ? zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' . $listing->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>';

best.

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

24 Jun 2021, 4:17 AM
#2166
noppie avatar

noppie

Zen Follower

Join Date:
Mar 2004
Posts:
210
Plugin Contributions:
0

Re: MultiSite Module Support Thread

no that did not work..thank you for trying..

My Multi_Site Zen Carts
http://herasonlinemarket.com

24 Jun 2021, 6:11 PM
#2167
noppie avatar

noppie

Zen Follower

Join Date:
Mar 2004
Posts:
210
Plugin Contributions:
0

Re: MultiSite Module Support Thread

Carlwhat
it is all working now.. thank you again

My Multi_Site Zen Carts
http://herasonlinemarket.com

24 Jun 2021, 8:45 PM
#2168
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,974
Plugin Contributions:
8

Re: MultiSite Module Support Thread

noppie:

Carlwhat
it is all working now.. thank you again

:thumbsup:

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

30 Jun 2021, 9:26 PM
#2169
carbonless avatar

carbonless

Zen Follower

Join Date:
Jan 2007
Location:
Illinois, USA
Posts:
329
Plugin Contributions:
0

Re: MultiSite Module Support Thread

Anyone working on a 1.5.7c version?

NTO: building a better network thru collaboration
www.needtoorder.com | www.coffeewitheinstein.com

30 Jun 2021, 10:50 PM
#2170
noppie avatar

noppie

Zen Follower

Join Date:
Mar 2004
Posts:
210
Plugin Contributions:
0

Re: MultiSite Module Support Thread

i am using 157c and the verison that i used is on this post #2148

My Multi_Site Zen Carts
http://herasonlinemarket.com

1 Jul 2021, 1:33 PM
#2171
carbonless avatar

carbonless

Zen Follower

Join Date:
Jan 2007
Location:
Illinois, USA
Posts:
329
Plugin Contributions:
0

Re: MultiSite Module Support Thread

Any issues to be aware of? I used to have a heavily modified version running and had to abandon from lack of updates as many core files were modified.

NTO: building a better network thru collaboration
www.needtoorder.com | www.coffeewitheinstein.com

1 Jul 2021, 2:42 PM
#2172
IDEASLady avatar

IDEASLady

Totally Zenned

Join Date:
Aug 2005
Location:
Trujillo Alto, Puerto Rico
Posts:
1,455
Plugin Contributions:
4

Re: MultiSite Module Support Thread

I believe DrByte was the one that updated it, it should work pretty good! I haven't been able to play with it but if there's people using it already should be a good sign.

IDEASLady
IDEAS Creative Studio

Your image... our business!

1 Jul 2021, 9:26 PM
#2173
noppie avatar

noppie

Zen Follower

Join Date:
Mar 2004
Posts:
210
Plugin Contributions:
0

Re: MultiSite Module Support Thread

My advise as being a long time zen cart user.. take your time.. i would download you cart and make test one and work from there.
I got it working.

My Multi_Site Zen Carts
http://herasonlinemarket.com

4 Oct 2021, 3:31 AM
#2174
mralikorn avatar

mralikorn

New Zenner

Join Date:
Sep 2010
Posts:
13
Plugin Contributions:
0

Re: MultiSite Module Support Thread

this is probly the lamest question but.. How do i Triger the diff sites? I have followed the instructions (I think) I have 2 domains the initial install on 1 and the other to Triger the second store. I have done a domain redirect but all that comes up is the first store. how do i set up domain 2 to triger site 2?

4 Oct 2021, 4:24 AM
#2175
noppie avatar

noppie

Zen Follower

Join Date:
Mar 2004
Posts:
210
Plugin Contributions:
0

Re: MultiSite Module Support Thread

MrAliKorn:

this is probly the lamest question but.. How do i Triger the diff sites? I have followed the instructions (I think) I have 2 domains the initial install on 1 and the other to Triger the second store. I have done a domain redirect but all that comes up is the first store. how do i set up domain 2 to triger site 2?

ok whos your hosting company.. I need to know this to help you. do you have cpanel? the place you uploaded your store

My Multi_Site Zen Carts
http://herasonlinemarket.com

4 Oct 2021, 1:05 PM
#2176
IDEASLady avatar

IDEASLady

Totally Zenned

Join Date:
Aug 2005
Location:
Trujillo Alto, Puerto Rico
Posts:
1,455
Plugin Contributions:
4

Re: MultiSite Module Support Thread

If you did all the settings and configurations correctly this is triggered either by a direct link (domain or subdomain), and/or with the sidebox of the module or a link from any EasyPages section.

IDEASLady
IDEAS Creative Studio

Your image... our business!

8 Oct 2021, 2:51 PM
#2177
mralikorn avatar

mralikorn

New Zenner

Join Date:
Sep 2010
Posts:
13
Plugin Contributions:
0

Re: MultiSite Module Support Thread

Thanks for the help guys.
SO https://www.Domain1.com is where the store is loaded (comes up fine). https://www.Domain2.com, https://www.domain3.com ect.. ?. when i put the address in for domain 2,3,4,ect Is it sent to where the store is parked on domain 1 via redirect? or do i have to install the store on all domains domains using the same database? Or am i just total missing how to install this correctly?

8 Oct 2021, 3:47 PM
#2178
IDEASLady avatar

IDEASLady

Totally Zenned

Join Date:
Aug 2005
Location:
Trujillo Alto, Puerto Rico
Posts:
1,455
Plugin Contributions:
4

Re: MultiSite Module Support Thread

No, you don't have to install ZC on all 3 domain (that's the magic and the reason to have Multisite)

  • Did you install 3 templates? (even if they are the same template, you need 3 templates, 1 for each domain);
  • Did you configure the configuration files (each domain/subdomain needs 1 separate file);
  • Finally, did you do the redirection of all the subdomains on cPanel?

IDEASLady
IDEAS Creative Studio

Your image... our business!

9 Oct 2021, 2:44 PM
#2179
mralikorn avatar

mralikorn

New Zenner

Join Date:
Sep 2010
Posts:
13
Plugin Contributions:
0

Re: MultiSite Module Support Thread

I use Brave host, There is a cPanel equivalent. Is it a simple Domain redirect (if so does it point to the host domain or something specific?) or is it a change the IPs of the Name servers thing. Its probably something simple, I am just not seeing how the other domains 1. get to the install 2. Triger the correct template I'm probably over thinking it.

9 Oct 2021, 5:27 PM
#2180
IDEASLady avatar

IDEASLady

Totally Zenned

Join Date:
Aug 2005
Location:
Trujillo Alto, Puerto Rico
Posts:
1,455
Plugin Contributions:
4

Re: MultiSite Module Support Thread

First = Create subdomain pointing to the store root:
In your SUBDOMAINS Panel
sub1.domain.com --> /public_html
If your store is in root, no need to add anything else to that link, if is in a subdirectory, then it should point to that directory. Example: /public_html/store

Second - Create the domain for that subdomain:
In your DOMAINS Panel
Site 1
It's already there and doesn't need any redirect

Site 2
domain2.com
Document Root = /public_html
Redirect --> to the root directory (no matter where the store is)

sub1.domain.com =
Document Root = /public_html
Again... if is in a subdirectory, then it should point to that directory. Example: /public_html/store

Third = Create/Verify the Redirection:
In your REDIRECTS Panel:
domain2.com
Redirect URL --> the sub1.domain.com

I hope that helps. Let me know if you got it working. :blink:

IDEASLady
IDEAS Creative Studio

Your image... our business!