Simpla cms related products on the product page
Related Products
$self_ids = array();
$self_products = array();
foreach($this->products->get_self_products($product->id) as $p)
by {
$self_ids[] = $p->related_id
$self_products[$p->related_id] = null;
The
/* sku_related_products */
if( $product->variant->sku ){
foreach($this->variants->get_sku_product_id($product->variant->sku, $product->id) as $ps)
by {
$self_ids[] = $ps
$self_products[$ps] = null
The
Unification of the Massive
$self_ids = array_unique ($self_ids)
The
/*/ sku_related_products */
if(!empty($self_ids )
by {
foreach($this->products->get_products(array('id'=>$self_ids, 'in_stock'=>1, 'visible'=>1)) as $p)
$self_products[$p->id] = $p;
$self_products_images = $this->products->get_images(array('product_id'=>array_keys($self_products)));
Foreach($self_products_images as $self_product_image)
if(isset($self_products[$self_product_image->product_id]))
$self_products[$self_product_image->product_id]->images[] = $self_product_image;
$self_products_variants = $this->variants->get_variants(array('product_id'=>array_keys($self_products), 'in_stock'=>1));
Foreach($self_products_variants as $self_product_variant)
by {
if(isset($self_products[$self_product_variant->product_id]))
by {
$self_products[$self_product_variant->product_id]->variants[] = $self_product_variant;
The
The
Foreach($self_products as $id=>$s)
by {
if(is_object($s )
by {
$s->image = &$s->images[0];
$s->variant = &$s->variants[0];
The
Other
by {
unset ($self_products [$id] )
The
The
$this->design->assign('self_products', $self_products);
The
The code is displayed on the color product page
Screenshots attached
It is necessary to make it out on the product page under each product.
Screenshot attached
Applications 2
Client's review of cooperation with Ivan P.
Simpla cms related products on the product pageEverything at the highest level! Fast and Quality
Freelancer's review of cooperation with Aleksandr Kurd
Simpla cms related products on the product pageA clear task! timely answer to the question to clarify in the course of the work. I recommend for cooperation.
Current freelance projects in the category Web Programming
Online lesson"I am looking for a technical specialist/programmer to set up a short online lesson for the field of cosmetology in the USA (Illinois). It is necessary to upload text/video to a ready-made platform (Teachable or similar / or simple WordPress) and set up protection: blocking the… Web Programming ∙ 38 minutes back ∙ 10 proposals |
Creating index.html in the style of the example
57 USD
Hello. I want index.html to be very similar to the AI-generated example. It needs to recreate this American old school style. Web Programming ∙ 3 hours 50 minutes back ∙ 70 proposals |
Make edits on the WP site.
89 USD
It is necessary to make edits on a website that is on WordPress. The site is related to casinos, so experience with this topic is welcome. The list of edits that need to be made: - Move 15 blocks from ACF to Gutenberg Block + check its display - Set up the correct display of… Web Programming ∙ 4 hours 24 minutes back ∙ 55 proposals |
Refinement of WordPress site (Elementor + WooCommerce) for Google Ads advertising launchWHAT NEEDS TO BE DONE The work is divided into blocks; you can take on everything or individual blocks: Block 1 — Speed Optimization (Mobile-First) The current PageSpeed score for the mobile version is 51/100. It needs to be raised to 80+. Target metrics: LCP < 2.5 s… Content Management Systems, Web Programming ∙ 4 hours 35 minutes back ∙ 29 proposals |
Development of a modern SEO website for a coffee food truck
1000 USD
Looking for an experienced developer to create a modern website for a mobile coffee shop in the USA, taking SEO requirements into account. The current website already exists, but a new site needs to be developed from scratch, focused on long-term promotion in Google. What is… Web Programming ∙ 14 hours 16 minutes back ∙ 110 proposals |